Bump microVersionId and add isReplica handling#6178
Conversation
Hello maeldonn,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 1 file with indirect coverage changes @@ Coverage Diff @@
## development/9.4 #6178 +/- ##
===================================================
+ Coverage 85.30% 85.33% +0.02%
===================================================
Files 208 209 +1
Lines 13919 13934 +15
===================================================
+ Hits 11874 11890 +16
+ Misses 2045 2044 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| const { instanceId, replicationGroupId } = config; | ||
|
|
||
| // eslint-disable-next-line no-param-reassign | ||
| objectMD.microVersionId = versioning.VersionID.generateVersionId(instanceId, replicationGroupId); |
There was a problem hiding this comment.
isn't there a method ObjectMD.updateMicroVersionId() in arsenal ? should it not be used instead?
(if we can't because of POJO, then I wonder if that function was really useful....)
There was a problem hiding this comment.
ObjectMD.updateMicroVersionId() is used by s3utils that holds ObjectMD instances. Cloudserver's call sites here all hold POJOs from metadata.getObjectMD, so we use the lower-level versioning.VersionID.generateVersionId (which is exactly what updateMicroVersionId calls internally). Both arsenal entry points are valid for their respective consumer shapes.
3b4110b to
6ba0ebe
Compare
|
6ba0ebe to
ce0ff8e
Compare
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
|
ce0ff8e to
28a3bfb
Compare
|
28a3bfb to
6080b1d
Compare
|
6080b1d to
9ba1db7
Compare
|
9ba1db7 to
1070ce3
Compare
| "@hapi/joi": "^17.1.1", | ||
| "@smithy/node-http-handler": "^3.0.0", | ||
| "arsenal": "git+https://github.com/scality/Arsenal#8.4.4", | ||
| "arsenal": "git+https://github.com/scality/Arsenal#2c429ab35a5ac82c3dafa5a0296a49a23a9c8a4a", |
There was a problem hiding this comment.
Arsenal is pinned to a raw commit hash (2c429ab35a5ac82c3dafa5a0296a49a23a9c8a4a) instead of a version tag. Per project conventions, git-based deps (arsenal, vaultclient, bucketclient, werelogs, utapi, scubaclient) must pin to a tag, not a branch or commit. This appears to reference the improvement/ARSN-578/micro-version-id feature branch.
Pin to a tagged release once the Arsenal changes are published.
— Claude Code
|
Prefer ReplicationInfo.isReplica over replicationInfo.status when producing x-amz-replication-status. The legacy status === 'REPLICA' branch is kept as a fallback so objects written before the feature still surface the correct value. Issue: CLDSRV-906
Bump microVersionId on every user write that changes object metadata other than replicationInfo, providing a unique revision identifier needed by upcoming cascaded CRR loop detection. Issue: CLDSRV-906
When a user updates tags, ACL, retention, or legal-hold on an object that arrived via replication (isReplica=true), the resulting object is no longer a replica - clear the flag so the x-amz-replication-status response header reflects the new state. Issue: CLDSRV-906
1070ce3 to
55a124a
Compare
| "@hapi/joi": "^17.1.1", | ||
| "@smithy/node-http-handler": "^3.0.0", | ||
| "arsenal": "git+https://github.com/scality/Arsenal#8.4.4", | ||
| "arsenal": "git+https://github.com/scality/Arsenal#2c429ab35a5ac82c3dafa5a0296a49a23a9c8a4a", |
There was a problem hiding this comment.
Arsenal is pinned to a commit hash (2c429ab) instead of a release tag. The PR description mentions this is the improvement/ARSN-578/micro-version-id branch. Git-based deps should pin to a tag, not a branch or bare commit, so that the dependency is a reviewed release.
— Claude Code
|
Cloudserver-side prep for cascaded CRR (design): bumps arsenal to the
improvement/ARSN-578/micro-version-idbranch, bumpsmicroVersionIdon every user-facing object metadata write through a singlebumpMicroVersionIdhelper (gated onreplicationInfopresence to keep storage tight, with aforceflag preserving the existing overwriting-version path), sourcesx-amz-replication-statusfrom the newReplicationInfo.isReplicafield with a legacystatus === 'REPLICA'fallback, and clearsisReplicaon direct user writes (tagging / ACL / retention / legal hold) so a modified replica stops looking like one. The backbeat-route side of the design (settingisReplica = trueon incoming replicas, cascade comparison, MultiBackend guard) lands in a follow-up ticket — until then the new fields are read but never set, so observable behavior is unchanged.Issue: CLDSRV-906