Repository navigation
Block versioning suspension and object lock apis in Pull Replication context - #6419
SylvainSenechal wants to merge 3 commits into
Conversation
Hello sylvainsenechal,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
| "@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", |
There was a problem hiding this comment.
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.
| 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": |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
| return; | ||
| } | ||
| const isPullReplicationSource = Object.keys(bucket.getPullReplicationSources() || {}).length > 0; | ||
| if (versioningConfiguration.Status === 'Suspended' && isPullReplicationSource) { |
There was a problem hiding this comment.
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).
maeldonn
left a comment
There was a problem hiding this comment.
Switching to async/await would make these tests easier to read
There was a problem hiding this comment.
🔵 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
b954bc2 to
bfc867f
Compare
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
bfc867f to
e6e4d3f
Compare
|
failed tests expected, need to yarn install when aresenal released |
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