Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal: drop unused NeoFS SDK-related code #3054

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions cmd/neofs-cli/internal/client/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
"github.com/nspcc-dev/neofs-node/pkg/network"
"github.com/nspcc-dev/neofs-sdk-go/client"
"github.com/spf13/viper"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

var errInvalidEndpoint = errors.New("provided RPC endpoint is incorrect")
Expand Down Expand Up @@ -61,20 +59,7 @@
return nil, fmt.Errorf("can't create SDK client: %w", err)
}

if err := c.Dial(prmDial); err != nil { //nolint:contextcheck // SetContext is used above.
// Here is a hack helping IR healthcheck to work. Current API client revision
// calls NetmapService.EndpointInfo RPC which is a part of the NeoFS API
// protocol. Inner ring nodes don't serve NeoFS API services, so they respond
// with Unimplemented code. We ignore this error here:
// - if nodes responds, then dial was successful
// - even if we connect to storage node which MUST provide NeoFS API services,
// subsequent EndpointInfo method will return Unimplemented error anyway
// This behavior is going to be fixed on SDK side.
//
// Track https://github.com/nspcc-dev/neofs-node/issues/2477
if status.Code(err) == codes.Unimplemented {
return c, nil
}
if err := c.Dial(prmDial); err != nil {

Check warning on line 62 in cmd/neofs-cli/internal/client/sdk.go

View check run for this annotation

Codecov / codecov/patch

cmd/neofs-cli/internal/client/sdk.go#L62

Added line #L62 was not covered by tests
return nil, fmt.Errorf("can't init SDK client: %w", err)
}

Expand Down
Loading