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

Simplify recurrent request handling (except Object service) #3081

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

cthulhu-rider
Copy link
Contributor

one more cut from #3057, continues #3079

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 23.09091% with 846 lines in your changes missing coverage. Please review.

Project coverage is 22.21%. Comparing base (c627b53) to head (c5b0800).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
pkg/services/container/server.go 24.55% 240 Missing and 12 partials ⚠️
pkg/services/object/server.go 46.40% 166 Missing and 13 partials ⚠️
cmd/neofs-node/container.go 0.00% 104 Missing ⚠️
pkg/services/netmap/server.go 0.00% 95 Missing ⚠️
cmd/neofs-node/reputation.go 0.00% 54 Missing ⚠️
pkg/services/session/server.go 0.00% 54 Missing ⚠️
pkg/services/accounting/server.go 0.00% 52 Missing ⚠️
cmd/neofs-node/netmap.go 0.00% 32 Missing ⚠️
pkg/services/util/sign.go 36.84% 10 Missing and 2 partials ⚠️
cmd/neofs-node/config.go 0.00% 6 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3081      +/-   ##
==========================================
+ Coverage   22.12%   22.21%   +0.09%     
==========================================
  Files         794      772      -22     
  Lines       59563    59025     -538     
==========================================
- Hits        13176    13112      -64     
+ Misses      45483    45027     -456     
+ Partials      904      886      -18     

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

This will simplify subsequent refactoring with the abandonment of
`github.com/nspcc-dev/neofs-api-go/v2` module: gRPC handlers are
going to completely replace current `Server` interface definitions from
`pkg/services` space.

Signed-off-by: Leonard Lyubich <[email protected]>
This inlines components previously defined as neofs-api-go `Server`
interfaces wrapping each other one-by-one into the gRPC server handlers.
The object service is big, and kept for now: it's going to be changed as
well soon.

In addition to reducing packages, components and code, this will make it
easier to deprecate `github.com/nspcc-dev/neofs-api-go/v2` module in the
near future.

Signed-off-by: Leonard Lyubich <[email protected]>
@cthulhu-rider cthulhu-rider force-pushed the avoid-apigo-drop-subsvcs branch from df258d3 to c5b0800 Compare January 14, 2025 13:37
@cthulhu-rider cthulhu-rider marked this pull request as ready for review January 15, 2025 09:08
}

// CurrentEpoch returns the latest cached epoch.
func (c *cfg) CurrentEpoch() uint64 { return c.networkState.CurrentEpoch() }
Copy link
Member

Choose a reason for hiding this comment

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

why GetNetworkMap but CurrentEpoch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a simple getter while GetNetworkMap can fail. I didnt think about this much tbh

apicontainer "github.com/nspcc-dev/neofs-api-go/v2/container"
protocontainer "github.com/nspcc-dev/neofs-api-go/v2/container/grpc"
apirefs "github.com/nspcc-dev/neofs-api-go/v2/refs"
refs "github.com/nspcc-dev/neofs-api-go/v2/refs/grpc"
Copy link
Member

Choose a reason for hiding this comment

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

should this be protorefs? just to make it meaningful according to the other aliases

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is no refs package in SDK root level, so we can do w/o alias (considering that apigo will leave)

@cthulhu-rider cthulhu-rider merged commit 1d699a9 into master Jan 15, 2025
21 of 22 checks passed
@cthulhu-rider cthulhu-rider deleted the avoid-apigo-drop-subsvcs branch January 15, 2025 15:37
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.

3 participants