-
Notifications
You must be signed in to change notification settings - Fork 253
Override an unversioned object originOp when moving it to a version #6036
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
base: development/9.0
Are you sure you want to change the base?
Override an unversioned object originOp when moving it to a version #6036
Conversation
This prevents triggering a possible s3:ObjectCreated:Put bucket notification when moving this object to a version, when deleting it (when creating a deletion marker). Issue: CLDSRV-816 Signed-off-by: Thomas Flament <[email protected]>
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 |
There was a problem hiding this 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 prevents triggering unintended s3:ObjectCreated:Put bucket notifications when moving an unversioned object to a versioned state during deletion (when creating a deletion marker). The change sets a specific originOp value to distinguish this internal operation from user-initiated PUT operations.
- Sets
originOpto's3:ObjectNullVersionStoredAsNewVersion'when storing null version metadata
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
@@ Coverage Diff @@
## development/9.0 #6036 +/- ##
================================================
Coverage 83.38% 83.38%
================================================
Files 189 189
Lines 12199 12200 +1
================================================
+ Hits 10172 10173 +1
Misses 2027 2027
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Tested locally and with the full workflow on an ARTESCA, working for both manual deletion and expiration workflows. |
| return undefined; | ||
| } | ||
|
|
||
| function _storeNullVersionMD(bucketName, objKey, nullVersionId, objMD, log, cb) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in which situation is this function called? i.e.
- if it called only when we have a "master-only" version, to "migrate it" to a proper version → fine
- if however it may be called in other cases, like when (over)writing an object (for exemple in version-suspended buckets ?), then we must keep the existing originOp in that case
Did you perform such kind of "impact analysis"? Are we sure this is only called to perform an extra put, for migration purpose, and never to create/replace the new version itself?
→ would be great to check the tests, and (if needed) update them to check that the proper originOp is set in each case (putObject, copyObject, putMultipart and backeatPutMetadata in the different combination of versioned mode & pre-existing object, ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, added some more tests.
This prevents triggering a possible s3:ObjectCreated:Put bucket notification when moving this object to a version, when deleting it (when creating a deletion marker).
Issue: CLDSRV-816