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

Refactor/Reorganize object/acl #1111

Merged
merged 2 commits into from
Mar 5, 2022
Merged

Refactor/Reorganize object/acl #1111

merged 2 commits into from
Mar 5, 2022

Conversation

carpawell
Copy link
Member

@carpawell carpawell commented Jan 26, 2022

Alternative to #1095 solution of the #596.

Since it was decided to keep logic that works with requests in the repo (and not move it to SDK) it is impossible to remove v2 package in object/acl service since something has to work with v2 requests anyway (implement interface in object pipeline in other words). So that PR reorganizes the structure of that directory to be similar to other packages in service/object: there are v2 packages in acl and acl/eacl dirs now. They parse all v2-versioned structs into neofs-sdk-go abstractions and pass them to the corresponding acl/eacl packages. v2 packages are the only packages that do import neofs-api-go library. eacl and acl provide public functions that only accepts sdk structures.

Valid only after nspcc-dev/neofs-sdk-go#128 and rebasing.

@codecov
Copy link

codecov bot commented Feb 11, 2022

Codecov Report

Merging #1111 (e8a62ff) into master (7ccd162) will decrease coverage by 0.11%.
The diff coverage is 7.36%.

❗ Current head e8a62ff differs from pull request most recent head bed2e83. Consider uploading reports for the commit bed2e83 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1111      +/-   ##
==========================================
- Coverage   35.64%   35.52%   -0.12%     
==========================================
  Files         284      288       +4     
  Lines       18055    18008      -47     
==========================================
- Hits         6435     6397      -38     
+ Misses      11129    11126       -3     
+ Partials      491      485       -6     
Impacted Files Coverage Δ
pkg/services/object/acl/basic_helper.go 34.78% <ø> (ø)
pkg/services/object/acl/eacl/v2/localstore.go 0.00% <0.00%> (ø)
pkg/services/object/acl/eacl/v2/opts.go 36.84% <0.00%> (ø)
pkg/services/object/acl/v2/classifier.go 0.00% <0.00%> (ø)
pkg/services/object/acl/v2/errors.go 0.00% <0.00%> (ø)
pkg/services/object/acl/v2/opts.go 0.00% <0.00%> (ø)
pkg/services/object/acl/v2/request.go 0.00% <0.00%> (ø)
pkg/services/object/acl/v2/service.go 0.00% <0.00%> (ø)
pkg/services/object/acl/v2/util.go 7.54% <7.54%> (ø)
pkg/services/object/acl/eacl/v2/headers.go 39.79% <26.66%> (-0.41%) ⬇️
... and 33 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ccd162...bed2e83. Read the comment docs.

@carpawell carpawell marked this pull request as ready for review February 11, 2022 12:31
@carpawell carpawell linked an issue Feb 11, 2022 that may be closed by this pull request
@carpawell carpawell marked this pull request as draft February 28, 2022 13:50
@carpawell carpawell marked this pull request as ready for review February 28, 2022 14:24
@carpawell carpawell marked this pull request as draft March 1, 2022 14:29
@carpawell carpawell marked this pull request as ready for review March 4, 2022 21:00
Make all operations that related to `neofs-api-go` library be placed in `v2`
packages. They parse all v2-versioned structs info `neofs-sdk-go`
abstractions and pass them to the corresponding `acl`/`eacl` packages. `v2`
packages are the only packages that do import `neofs-api-go` library. `eacl`
and `acl` provide public functions that only accepts `sdk` structures.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
`objectSDKAddress` -> `addressSDK`.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@alexvanin alexvanin merged commit cf17686 into nspcc-dev:master Mar 5, 2022
@carpawell carpawell deleted the refactor/clean-ToV2-casts-from-eacl-service branch March 5, 2022 08:34
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Mar 5, 2022
Make all operations that related to `neofs-api-go` library be placed in `v2`
packages. They parse all v2-versioned structs info `neofs-sdk-go`
abstractions and pass them to the corresponding `acl`/`eacl` packages. `v2`
packages are the only packages that do import `neofs-api-go` library. `eacl`
and `acl` provide public functions that only accepts `sdk` structures.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Mar 5, 2022
`objectSDKAddress` -> `addressSDK`.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Make all operations that related to `neofs-api-go` library be placed in `v2`
packages. They parse all v2-versioned structs info `neofs-sdk-go`
abstractions and pass them to the corresponding `acl`/`eacl` packages. `v2`
packages are the only packages that do import `neofs-api-go` library. `eacl`
and `acl` provide public functions that only accepts `sdk` structures.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
`objectSDKAddress` -> `addressSDK`.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
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.

Remove ToV2 casts in service/acl
3 participants