Skip to content

Block versioning suspension and object lock apis in Pull Replication context - #6419

Open
SylvainSenechal wants to merge 3 commits into
development/9.7from
improvement/CLDSRV-1089/pull-replication-bucket-locks
Open

SylvainSenechal wants to merge 3 commits into
development/9.7from
improvement/CLDSRV-1089/pull-replication-bucket-locks

Conversation

@SylvainSenechal

@SylvainSenechal SylvainSenechal commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Issue: CLDSRV-1089
Arsenal related pr : scality/Arsenal#2771

Block versioning suspension and object lock apis in Pull Replication context
Also block PutObjectRetention / PutObjectLegalHold for the sink

@bert-e

bert-e commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Hello sylvainsenechal,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@scality scality deleted a comment from bert-e Dec 3, 2026
@bert-e

bert-e commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

Comment thread package.json Outdated
"@opentelemetry/instrumentation-ioredis": "~0.70.0",
"@opentelemetry/instrumentation-mongodb": "~0.75.0",
"@scality/arsenal": "^8.6.7",
"@scality/arsenal": "git+https://github.com/scality/Arsenal#01e627f1141b648ff72676c1984c9aab700e6653",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Arsenal is pinned to a raw commit SHA from git instead of a released version. Release Arsenal with the pull replication markers and pin to that version (e.g. ^8.6.8) before merging.

Comment thread yarn.lock Outdated
integrity sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug==

"@scality/arsenal@^8.6.0-0", "@scality/arsenal@^8.6.7":
"@scality/arsenal@^8.6.0-0", "@scality/arsenal@git+https://github.com/scality/Arsenal#01e627f1141b648ff72676c1984c9aab700e6653":

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This lockfile looks hand-edited and inconsistent. The utapi entry now lists "@scality/arsenal" "^8.6.0", but no key matches @scality/arsenal@^8.6.0: the key here is still ^8.6.0-0. Also, version "8.6.7" is kept for a git commit. yarn install --frozen-lockfile will likely say the lockfile needs updating. Regenerate it with yarn install, ideally after switching to a released Arsenal version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

TODO

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open: package.json now asks for @scality/arsenal@^8.7.5, but yarn.lock is no longer in the PR and still resolves ^8.6.7 to 8.6.7. yarn install --frozen-lockfile will fail. Run yarn install and commit the updated yarn.lock.

@codecov

codecov Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

Comment thread lib/api/bucketPutVersioning.js Outdated
return;
}
const isPullReplicationSource = Object.keys(bucket.getPullReplicationSources() || {}).length > 0;
if (versioningConfiguration.Status === 'Suspended' && isPullReplicationSource) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Debating a bit whether we should just block all putBucketVersioning api calls as soon as the bucket is marked as a replication source (instead of just suspended).

@SylvainSenechal
SylvainSenechal marked this pull request as ready for review December 3, 2026 17:23
@SylvainSenechal
SylvainSenechal requested review from a team, benzekrimaha and maeldonn December 3, 2026 17:23

@maeldonn maeldonn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Switching to async/await would make these tests easier to read

Comment thread tests/unit/api/bucketPutVersioning.js Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

UTAPI’s Arsenal ^8.6.0 requirement has no matching lockfile entry because yarn.lock still uses the ^8.6.0-0 selector.

No open issues 🎉

What changed in this PR

Protects CloudServer’s pull replication state using the bucket markers introduced by Arsenal PR #2771.

Changes:

  • Blocks versioning suspension on sources and all versioning changes on sinks.
  • Blocks sink updates to Object Lock configuration, retention, and legal hold.
  • Updates Arsenal and adds unit and functional coverage.
File Description
yarn.lock Updates Arsenal resolution and UTAPI dependency metadata.
tests/​unit/​api/​objectPutRetention.js Tests sink retention rejection.
tests/​unit/​api/​objectPutLegalHold.js Tests sink legal-hold rejection.
tests/​unit/​api/​bucketPutVersioning.js Tests source and sink versioning restrictions.
tests/​unit/​api/​bucketPutObjectLock.js Tests sink Object Lock configuration rejection.
tests/​functional/​aws-node-sdk/​test/​bucket/​pullReplicationMarkers.js Tests API restrictions and marker persistence.
package.json Pins Arsenal to the marker-support commit.
lib/​api/​objectPutRetention.js Rejects retention updates on sinks.
lib/​api/​objectPutLegalHold.js Rejects legal-hold updates on sinks.
lib/​api/​bucketPutVersioning.js Enforces replication versioning restrictions.
lib/​api/​bucketPutObjectLock.js Rejects Object Lock configuration updates on sinks.

Review effort: Balanced

@SylvainSenechal
SylvainSenechal force-pushed the improvement/CLDSRV-1089/pull-replication-bucket-locks branch 2 times, most recently from b954bc2 to bfc867f Compare December 4, 2026 15:29
@SylvainSenechal
SylvainSenechal changed the base branch from development/9.6 to development/9.7 December 4, 2026 15:29
@bert-e

bert-e commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@scality scality deleted a comment from bert-e Dec 4, 2026
@SylvainSenechal
SylvainSenechal force-pushed the improvement/CLDSRV-1089/pull-replication-bucket-locks branch from bfc867f to e6e4d3f Compare December 4, 2026 15:39
@SylvainSenechal

Copy link
Copy Markdown
Contributor Author

failed tests expected, need to yarn install when aresenal released

This branch has not been deployed

No deployments
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