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

New SDK #3103

Merged
merged 4 commits into from
Feb 3, 2025
Merged

New SDK #3103

merged 4 commits into from
Feb 3, 2025

Conversation

roman-khimov
Copy link
Member

Replaces #3023, #3054. Depends on #3097.

@roman-khimov roman-khimov added this to the v0.45.0 milestone Jan 30, 2025
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 24.51253% with 271 lines in your changes missing coverage. Please review.

Project coverage is 22.58%. Comparing base (9285b4f) to head (2528406).
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
pkg/services/object/server.go 10.68% 117 Missing ⚠️
pkg/services/container/server.go 20.00% 32 Missing and 4 partials ⚠️
pkg/services/object/acl/eacl/v2/headers.go 10.34% 25 Missing and 1 partial ⚠️
pkg/network/cache/multi.go 0.00% 15 Missing ⚠️
pkg/services/netmap/server.go 0.00% 13 Missing ⚠️
cmd/neofs-node/transport.go 0.00% 9 Missing ⚠️
cmd/neofs-node/reputation.go 0.00% 7 Missing ⚠️
cmd/neofs-node/netmap.go 0.00% 6 Missing ⚠️
cmd/neofs-cli/modules/util/acl.go 0.00% 5 Missing ⚠️
cmd/neofs-node/container.go 0.00% 5 Missing ⚠️
... and 15 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3103      +/-   ##
==========================================
+ Coverage   22.50%   22.58%   +0.08%     
==========================================
  Files         752      752              
  Lines       58375    58126     -249     
==========================================
- Hits        13136    13129       -7     
+ Misses      44346    44111     -235     
+ Partials      893      886       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

End-rey and others added 3 commits January 30, 2025 18:50
Make `Client` interface fit the SDK method:
`ReplicateObject(ctx context.Context, id oid.ID, src io.ReadSeeker, signer neofscrypto.Signer, signedReplication bool) (*neofscrypto.Signature, error)`.
Use `Action.DecodeString` instead of `eacl.ActionFromString`.
Use `Object.ReadFromV2` instead of `object.NewFromV2`.
Use `Type.String` instead of `Type.EncodeToString`.
Check some vars for nil.

Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Use `GetAttributes` and `SetAttributes` from SDK instead of api-go
`netmap.Attribute`.

Signed-off-by: Andrey Butusov <andrey@nspcc.io>
#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 <shaleva.ann@nspcc.ru>
@roman-khimov roman-khimov force-pushed the new-sdk branch 2 times, most recently from 0ffd0dc to 509c7e7 Compare January 30, 2025 16:07
This does the bare minimum to make it work. Conversions are simplified,
signatures are handled a bit differently. The expectation is that the
behaviour is the same. Notice that we still have api-go in go.mod for
control and tree services that use autogenerated code.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
pkg/core/object/fmt.go Show resolved Hide resolved
func (x *multiClient) Conn() *grpc.ClientConn {
var cc *grpc.ClientConn

_ = x.iterateClients(context.TODO(), func(c clientcore.Client) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will context be meaningful in the future?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. We need to get some connection, we're not making any real requests here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, just do not like context.TODO() in any "release" code

@roman-khimov roman-khimov merged commit 5279df2 into master Feb 3, 2025
22 checks passed
@roman-khimov roman-khimov deleted the new-sdk branch February 3, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants