Support Days=0 lifecycle expiration: bump arsenal and add functional tests#6192
Support Days=0 lifecycle expiration: bump arsenal and add functional tests#6192delthas wants to merge 5 commits into
Conversation
Hello delthas,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 |
| "@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#f5d43abeb8139ec8835ef0354888ff13ddb14d8b", |
There was a problem hiding this comment.
Arsenal is pinned to a commit hash, not a released tag. The PR description acknowledges this, but flagging per policy: git-based deps must pin to a tag before merge.
— Claude Code
❌ 365 Tests Failed:
View the top 3 failed test(s) by shortest run time
View the full list of 270 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
f6b1245 to
a934286
Compare
a934286 to
c7099f8
Compare
|
DarkIsDude
left a comment
There was a problem hiding this comment.
@delthas CI is broken
Yes thats due to scality/Arsenal#2651 #6198 Reviews welcome :D |
c7099f8 to
d6ba793
Compare
b97e579 to
d40b90d
Compare
Pure formatting pass (no logic change) on the functional test file and the bucketPutLifecycle API handler touched by the Days=0 work, so the prettier CI check (which runs on whole files modified by the PR) passes. Isolating the reformat keeps the functional commits reviewable. Issue: CLDSRV-928
The arsenal LifecycleConfiguration constructor now takes a werelogs logger as its second argument and logs when a rule is configured with a 0-day action time. Pass the request logger so that audit line is correlated to the request. Issue: CLDSRV-928
Cover the new Days=0 ("empty this bucket") capability in PutBucketLifecycle:
- Expiration Days=0 accepted and round-trips via GetBucketLifecycle
- NoncurrentVersionExpiration NoncurrentDays=0 accepted
- AbortIncompleteMultipartUpload DaysAfterInitiation=0 accepted
- negative Expiration Days rejected (must be nonnegative)
- Expiration Days exceeding MAX_DAYS rejected (MalformedXML)
These pass once the arsenal dependency is bumped to the version including
ARSN-597.
Issue: CLDSRV-928
d40b90d to
a90e4c5
Compare
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
The following reviewers are expecting changes from the author, or must review again: |
Point arsenal at the ARSN-597 commit (8b8d0ae0983d28e6bbfca12c8512add839fcd996) rather than a released tag, since the version is not cut yet. ARSN-597 targets the 8.5 line (dev/8.5, 8.5.3), which 9.4 already tracks, so this delivers Days=0 support (the explicit "empty this bucket" lifecycle signal) plus the 0-day audit logging the previous commit wires up, and makes the functional tests added earlier pass. To amend once ARSN-597 is released: replace the commit pin with the released arsenal version (>= 8.5.4) and re-run yarn install. Issue: CLDSRV-928
CodeQL's "Callback-style function (async migration)" query flags the waterfall step callbacks in this handler once it is modified by the PR. Convert the handler to async/await, promisifying the callback-based helpers (parseXML, standardMetadataValidateBucket, metadata.updateBucket), following the established pattern in bucketGet / objectGetLegalHold: a thin callback wrapper delegates to the async implementation and forwards CORS headers via err.additionalResHeaders on error. Issue: CLDSRV-928
a90e4c5 to
2ff1690
Compare
What
CloudServer side of the
Days = 0lifecycle support. Two commits:tests/functional/aws-node-sdk/test/bucket/putBucketLifecycle.js):ExpirationDays: 0accepted and round-trips via GetBucketLifecycleNoncurrentVersionExpirationNoncurrentDays: 0andAbortIncompleteMultipartUploadDaysAfterInitiation: 0acceptedExpirationDaysrejected (must be nonnegative) and> MAX_DAYSrejected (MalformedXML)Why
Days = 0is an explicit "empty this bucket" lifecycle signal. Because it was rejected everywhere until now, it is unambiguous (unlikeDays = 1, used by legitimate short-retention buckets) and lets backbeat (BB-779) skip building costly lifecycle indexes for buckets being drained. CloudServer delegates all lifecycle validation to arsenal, so the only changes here are the dependency bump and the tests.The arsenal dependency is pinned to the ARSN-597 commit
f5d43abeb8139ec8835ef0354888ff13ddb14d8b(arsenal PR scality/Arsenal#2648), not a released tag, because the version is not cut yet. Before merge: amend the bump to the released arsenal version (>= 8.4.8) and re-runyarn install. Draft until then.Related
Issue: CLDSRV-928