Skip to content

Get metadata consistency policy from contract #1150

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

Merged
merged 1 commit into from
May 5, 2025

Conversation

smallhive
Copy link
Contributor

Closes #1148.

Closes #1148.

Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
@smallhive smallhive requested a review from roman-khimov as a code owner May 5, 2025 11:03
@roman-khimov roman-khimov requested a review from Copilot May 5, 2025 12:42
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the handling of container placement policies by introducing a composite PlacementPolicy type that separates the placement and metadata consistency aspects. Key changes include:

  • Updating usage of container placement policies to reference the Placement field rather than the full policy.
  • Changing the configuration and unmarshaling logic to incorporate a new Consistency field.
  • Adjusting related API interfaces and test mocks to use the new PlacementPolicy type.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/neofs/neofs.go Updates in CreateContainer to use the Placement and Consistency fields from Policy.
cmd/s3-gw/storage_policy_provider.go Refactors GetPlacementPolicy to unmarshal into the new PlacementPolicy type.
cmd/s3-gw/storage_policy.go Updates function signatures to use the new PlacementPolicy type.
cmd/s3-gw/app.go Introduces configuration handling for ContainerMetadataPolicy.
api/layer/neofs_mock.go Updates test mocks to accommodate the new PlacementPolicy structure.
api/layer/neofs.go Changes the PrmContainerCreate type to use the new PlacementPolicy type.
api/layer/layer.go Introduces the PlacementPolicy type and related constants.
api/handler/put.go Constructs PlacementPolicy values with explicit Version, Placement, and Consistency.
api/handler/api.go Updates interface definitions to return the new PlacementPolicy type.

@roman-khimov roman-khimov merged commit 54a6d02 into master May 5, 2025
18 checks passed
@roman-khimov roman-khimov deleted the 1148-accept-metadata-consistency branch May 5, 2025 13:03
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.

Accept metadata consistency policy from contract callback
2 participants