Skip to content

Conversation

@delthas
Copy link

@delthas delthas commented Dec 18, 2025

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

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]>
@bert-e
Copy link
Contributor

bert-e commented Dec 18, 2025

Hello delthas,

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
/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 TBA
/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.

@delthas delthas requested a review from Copilot December 18, 2025 13:15
@bert-e
Copy link
Contributor

bert-e commented Dec 18, 2025

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.

Copy link

Copilot AI left a 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 originOp to 's3:ObjectNullVersionStoredAsNewVersion' when storing null version metadata

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.38%. Comparing base (60b7aa4) to head (7b6feeb).
⚠️ Report is 5 commits behind head on development/9.0.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/api/apiUtils/object/versioning.js 97.10% <100.00%> (+0.01%) ⬆️
@@               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           
Flag Coverage Δ
ceph-backend-test 65.96% <100.00%> (-0.02%) ⬇️
file-ft-tests 66.81% <100.00%> (+<0.01%) ⬆️
kmip-ft-tests 26.98% <0.00%> (-0.01%) ⬇️
mongo-v0-ft-tests 68.14% <100.00%> (+<0.01%) ⬆️
mongo-v1-ft-tests 68.13% <100.00%> (+<0.01%) ⬆️
multiple-backend 35.68% <100.00%> (+<0.01%) ⬆️
quota-tests 33.10% <0.00%> (+0.03%) ⬆️
quota-tests-inflights 34.18% <0.00%> (-0.01%) ⬇️
unit 67.59% <100.00%> (+<0.01%) ⬆️
utapi-v2-tests 33.34% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@delthas delthas requested review from a team, SylvainSenechal and benzekrimaha December 18, 2025 14:25
@delthas
Copy link
Author

delthas commented Dec 18, 2025

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) {
Copy link
Contributor

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, ...)

Copy link
Author

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.

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