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

node/placement: use predefined error for empty netmap #2916

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

carpawell
Copy link
Member

nspcc-dev/neofs-sdk-go#615 was merged, and it is now possible to use the error. Commit includes SDK update without new API adoption.

@roman-khimov
Copy link
Member

Well, we need to fix deprecation warnings anyway, otherwise linter would become useless for some time.

@carpawell
Copy link
Member Author

Oh, changing SDK significantly for months... Let this PR be a reminder, I do not expect it to adopt SDK.

@carpawell carpawell marked this pull request as draft August 14, 2024 16:39
@roman-khimov
Copy link
Member

Current set of changes is rather small, these are easy to fix.

SDK somehow generates a random checksum (with a random type too) every time now,
so the old tests should be ready for it (do not use test SDK package in fact).
Closes #2917, and improves test granularity a little.

Signed-off-by: Pavel Karpy <[email protected]>
@carpawell carpawell force-pushed the fix/dirty-error-comparasing branch 2 times, most recently from 5bed985 to f3cb1ea Compare August 20, 2024 13:48
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 3.63636% with 53 lines in your changes missing coverage. Please review.

Project coverage is 23.50%. Comparing base (d9ccb57) to head (5eeff3f).
Report is 6 commits behind head on master.

Files Patch % Lines
cmd/neofs-cli/modules/util/acl.go 2.77% 35 Missing ⚠️
cmd/neofs-cli/internal/common/eacl.go 0.00% 7 Missing ⚠️
cmd/neofs-cli/modules/bearer/create.go 0.00% 3 Missing ⚠️
pkg/morph/client/container/eacl.go 0.00% 3 Missing ⚠️
cmd/neofs-cli/modules/acl/extended/create.go 0.00% 2 Missing ⚠️
cmd/neofs-cli/modules/container/set_eacl.go 0.00% 1 Missing ⚠️
cmd/neofs-node/object.go 0.00% 1 Missing ⚠️
pkg/innerring/processors/container/process_eacl.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2916      +/-   ##
==========================================
- Coverage   23.51%   23.50%   -0.01%     
==========================================
  Files         776      776              
  Lines       45318    45326       +8     
==========================================
  Hits        10656    10656              
- Misses      33815    33823       +8     
  Partials      847      847              

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

@carpawell carpawell marked this pull request as ready for review August 20, 2024 13:52
@carpawell
Copy link
Member Author

Ok, fixed. But I was surprised how inconvenient is now SDK for eacl tables constructing in the apps like our CLI.

nspcc-dev/neofs-sdk-go#615 was merged, and it is now
possible to use the error. Commit includes SDK update _without_ new API
adoption.

Signed-off-by: Pavel Karpy <[email protected]>
cmd/neofs-cli/modules/util/acl.go Outdated Show resolved Hide resolved
cmd/neofs-cli/modules/bearer/create.go Outdated Show resolved Hide resolved
cmd/neofs-cli/modules/util/acl.go Outdated Show resolved Hide resolved
validateAndFixEACLVersion(table)
PrintVerbose(cmd, "Parsed JSON encoded EACL table")
return table
}

if err = table.Unmarshal(data); err == nil {
table, err = eacl.Unmarshal(data)
Copy link
Contributor

Choose a reason for hiding this comment

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

what was wrong with previous code?

Copy link
Member Author

Choose a reason for hiding this comment

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

Table should be created using one of the constructors.

updated docs say so

Copy link
Contributor

Choose a reason for hiding this comment

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

u already have an instance

@cthulhu-rider cthulhu-rider merged commit 7baa16c into master Aug 21, 2024
19 of 22 checks passed
@cthulhu-rider cthulhu-rider deleted the fix/dirty-error-comparasing branch August 21, 2024 16:10
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