Skip to content

Commit

Permalink
internal: drop unused NeoFS SDK-related code
Browse files Browse the repository at this point in the history
#2477 is closed long time
ago, I suppose this code is irrelevant anymore.

Ref. nspcc-dev/neo-go#3757 (comment).

Signed-off-by: Anna Shaleva <[email protected]>
  • Loading branch information
AnnaShaleva committed Dec 16, 2024
1 parent 474d541 commit 09156fd
Showing 1 changed file with 1 addition and 16 deletions.
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 @@ import (
"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 @@ func GetSDKClient(ctx context.Context, addr network.Address) (*client.Client, er
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

0 comments on commit 09156fd

Please sign in to comment.