Skip to content

CLDSRV-1008 return object lock state even if bucket is not lock-enabled - #6386

Open
francoisferrand wants to merge 1 commit into
development/9.6from
improvement/CLDSRV-1008
Open

francoisferrand wants to merge 1 commit into
development/9.6from
improvement/CLDSRV-1008

Conversation

@francoisferrand

@francoisferrand francoisferrand commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

GetObjectRetention and GetObjectLegalHold used to fail as soon as the bucket was not lock-enabled, even if the object actually had lock information. Meanwhile GET/HEAD already return it through the x-amz-object-lock-* headers, so the two views disagreed.

This matters on DR sites: the replicated lock state is enforced from object metadata, but the DR bucket is deliberately not lock-enabled, and backup clients still need to read that state.

So now, whatever is set on the object gets returned: its retention, or its legal hold (ON or OFF). When nothing is set, the existing InvalidRequest on a non-lock bucket is unchanged.

Issue: CLDSRV-1008

@bert-e

bert-e commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Hello francoisferrand,

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 ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/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.
/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.

@bert-e

bert-e commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue CLDSRV-1008 contains:

  • 9.5.2

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.6.0

Please check the Fix Version/s of CLDSRV-1008, or the target
branch of this pull request.

Comment thread lib/api/bucketGetObjectLock.js Resolved
@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.86%. Comparing base (c89adac) to head (005068e).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/api/objectGetLegalHold.js 93.80% <100.00%> (+0.05%) ⬆️
lib/api/objectGetRetention.js 90.59% <100.00%> (+0.16%) ⬆️
@@               Coverage Diff                @@
##           development/9.6    #6386   +/-   ##
================================================
  Coverage            90.86%   90.86%           
================================================
  Files                  208      208           
  Lines                39275    39278    +3     
================================================
+ Hits                 35686    35689    +3     
  Misses                3589     3589           
Flag Coverage Δ
checksums-disabled-tests 46.28% <0.00%> (-0.01%) ⬇️
file-ft-tests 75.80% <100.00%> (+0.02%) ⬆️
file-ft-tests-null-compat 76.28% <100.00%> (-0.01%) ⬇️
kmip-ft-tests 43.92% <0.00%> (-0.01%) ⬇️
mongo-v0-ft-tests 76.84% <100.00%> (-0.05%) ⬇️
mongo-v1-ft-tests 76.88% <100.00%> (+0.05%) ⬆️
multiple-backend 44.50% <0.00%> (-0.01%) ⬇️
s3c-ft-tests-v0 71.63% <100.00%> (+<0.01%) ⬆️
s3c-ft-tests-v0-null-compat 71.69% <100.00%> (+<0.01%) ⬆️
s3c-ft-tests-v1 71.65% <100.00%> (+<0.01%) ⬆️
sur-tests 45.03% <0.00%> (-0.01%) ⬇️
sur-tests-inflights 48.38% <0.00%> (-0.03%) ⬇️
unit 80.82% <100.00%> (+<0.01%) ⬆️
utapi-v2-tests 45.20% <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.

@francoisferrand
francoisferrand requested review from a team, DarkIsDude and maeldonn November 19, 2026 22:32
GetObjectRetention and GetObjectLegalHold errored out whenever the
bucket was not lock-enabled, even when the object actually carried lock
information, while GET/HEAD already exposed it through the
x-amz-object-lock-* headers.

On a DR site, the replicated lock state is enforced from object metadata
while the bucket is deliberately not lock-enabled, and backup clients
still need to read it. So return whatever is set on the object; when
nothing is set, keep the existing errors.

Issue: CLDSRV-1008

This branch has not been deployed

No deployments
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.

3 participants