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

Check the account alongside the public key #2883

Merged
merged 4 commits into from
Aug 12, 2024

Conversation

smallhive
Copy link
Contributor

Copy link

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 19.56522% with 37 lines in your changes missing coverage. Please review.

Project coverage is 23.54%. Comparing base (c4fda9d) to head (f8ccf59).
Report is 1 commits behind head on master.

Files Patch % Lines
pkg/services/object/acl/v2/classifier.go 0.00% 12 Missing ⚠️
pkg/services/object/acl/acl.go 0.00% 5 Missing ⚠️
pkg/services/container/morph/executor.go 40.00% 2 Missing and 1 partial ⚠️
cmd/neofs-cli/modules/container/set_eacl.go 0.00% 2 Missing ⚠️
cmd/neofs-lens/internal/storage/sanity.go 0.00% 2 Missing ⚠️
pkg/services/object/acl/v2/request.go 0.00% 2 Missing ⚠️
cmd/neofs-cli/modules/container/get_eacl.go 0.00% 1 Missing ⚠️
cmd/neofs-cli/modules/object/get.go 0.00% 1 Missing ⚠️
cmd/neofs-cli/modules/object/head.go 0.00% 1 Missing ⚠️
cmd/neofs-cli/modules/object/range.go 0.00% 1 Missing ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2883      +/-   ##
==========================================
+ Coverage   23.53%   23.54%   +0.01%     
==========================================
  Files         776      776              
  Lines       45302    45273      -29     
==========================================
- Hits        10660    10658       -2     
+ Misses      33792    33769      -23     
+ Partials      850      846       -4     

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

@cthulhu-rider cthulhu-rider added the blocked Can't be done because of something label Jul 4, 2024
Copy link
Contributor

@cthulhu-rider cthulhu-rider left a comment

Choose a reason for hiding this comment

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

looks good, but lets fix the format accurately

pkg/services/object/acl/v2/classifier.go Outdated Show resolved Hide resolved
@cthulhu-rider
Copy link
Contributor

Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

Looks OK and green.

@roman-khimov roman-khimov removed the blocked Can't be done because of something label Aug 8, 2024
@roman-khimov roman-khimov added this to the v0.43.0 milestone Aug 8, 2024
)
WithEACLTable(&table)

if sa := reqInfo.SenderAccount(); sa != nil && !sa.IsZero() {
Copy link
Contributor

Choose a reason for hiding this comment

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

can it ever be nil? seems like we can get rid of a pointer

Copy link
Member

Choose a reason for hiding this comment

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

missing sender is a strange thing to me, an error should appear earlier, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before this change, the account wasn't represented at all. It was only key []byte. According to the code, at this point, it can't be nil, but in the future - nobody knows.

Do you suggest removing the pointer?

pkg/services/container/morph/executor.go Outdated Show resolved Hide resolved
Copy link
Member

@carpawell carpawell left a comment

Choose a reason for hiding this comment

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

Can you wrap some too long lines in the commit body? We have some rules about it: https://github.com/nspcc-dev/.github/blob/master/git.md
Otherwise, ok.

@@ -18,7 +18,7 @@ require (
github.com/nspcc-dev/neo-go v0.106.3
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240305074711-35bc78d84dc4
github.com/nspcc-dev/neofs-contract v0.20.0
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12.0.20240807160341-3528eb5bb1cc
Copy link
Member

Choose a reason for hiding this comment

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

oh, i really dont like we are updating SDK at this moment (it is being changed a lot now) in one of the pre-release PR, but if we need it to be done, ok

)
WithEACLTable(&table)

if sa := reqInfo.SenderAccount(); sa != nil && !sa.IsZero() {
Copy link
Member

Choose a reason for hiding this comment

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

missing sender is a strange thing to me, an error should appear earlier, no?

Copy link
Contributor

@cthulhu-rider cthulhu-rider left a comment

Choose a reason for hiding this comment

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

nice overall

@smallhive i left several suggestions up to u

Signed-off-by: Evgenii Baidakov <[email protected]>
Linter message: staticcheck SA1019: eaclSDK.NewTableFromV2 is deprecated: BUG: container ID length is not checked. Use [Table.ReadFromV2] instead.

Signed-off-by: Evgenii Baidakov <[email protected]>
The object can't be a slice with only zeros.

Signed-off-by: Evgenii Baidakov <[email protected]>
@roman-khimov roman-khimov merged commit 1c1cae7 into master Aug 12, 2024
21 of 22 checks passed
@roman-khimov roman-khimov deleted the account-based-eacl-targets branch August 12, 2024 15:51
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.

4 participants