Skip to content

CLDSRV-1087: Return RestoreStatus only for objects being restored or restored - #6399

Draft
anurag4DSB wants to merge 2 commits into
development/9.2from
bugfix/list-objects-restore-status
Draft

anurag4DSB wants to merge 2 commits into
development/9.2from
bugfix/list-objects-restore-status

Conversation

@anurag4DSB

@anurag4DSB anurag4DSB commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR: listings return RestoreStatus only for an object that is being restored or has a restored copy, as AWS does. Today every object gets IsRestoreInProgress=false, which breaks the AWS S3 connector for PyTorch and Mountpoint.

Context / Why

CLDSRV-1087, the same defect as S3C-11607.

  • Clients built on mountpoint-s3-client send x-amz-optional-object-attributes: RestoreStatus on every listing.
  • They reject a completed status that has no RestoreExpiryDate, so s3torchconnector 1.5.0 fails to list a prefix with "Missing field RestoreExpiryDate".
  • Reproduced on 9.2.36, 9.3.28, 9.4.13, 9.5.5 and development/9.6.

🧩 Approach

processOptionalAttributes(item)      // ListObjects, ListObjectsV2, ListObjectVersions
  case 'RestoreStatus':
-   always <RestoreStatus><IsRestoreInProgress>false</IsRestoreInProgress></RestoreStatus>
+   buildRestoreStatusXml(item.restoreStatus)
+     restore in progress            -> IsRestoreInProgress=true, no date
+     restored copy, valid expiry    -> IsRestoreInProgress=false + RestoreExpiryDate (ISO 8601)
+     anything else                  -> no element

There is no configuration, metadata or Arsenal change.

🔍 Review focus

  • 🔴 lib/api/bucketGet.js › buildRestoreStatusXml: lenient clients such as boto3 no longer see a restore status on ordinary objects. That matches AWS, and it is the behaviour change in this PR.

🧪 How to test

  1. CI: the new unit tests in tests/unit/api/bucketGet.js and functional tests in tests/functional/aws-node-sdk/test/bucket/get.js cover never archived, archived and never restored, restore in progress, restored, delete markers, and no header.
  2. S3MapDataset.from_prefix from s3torchconnector lists a prefix of ordinary objects on this build, and fails with "Missing field RestoreExpiryDate" on the base.

🔗 References

Draft: the branch name has no ticket key yet, and the forward-port to 9.4 to 9.6 is for Bert-E.

Listings asked for the RestoreStatus optional attribute returned
IsRestoreInProgress=false for every object, including objects that were
never archived. AWS returns the element only while a restore is in
progress or while a restored copy exists, and a completed restore always
carries RestoreExpiryDate. Clients that parse the element strictly failed
the whole listing.
The before hook of the optional attributes tests returned the result of
initMetadata while taking a callback. With MongoDB, metadata.setup returns
a promise, so mocha failed the hook as overspecified and skipped every test
of the block in the mongo jobs.

On S3C, no Transition lifecycle rule is supported, so no object is ever
archived, and faking an archive breaks the bucket cleanup: the metadata
update of a non-versioned object is sent with an empty versionId, which
gives the master a new version id that the deletion of the listed
versions leaves behind, and every later test of the file saw extra
objects. The tests that need an archive or restore state now run only
where cold storage is supported, and the two existing tests that set a
restored state expect no RestoreStatus element elsewhere.
@bert-e

bert-e commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Hello anurag4dsb,

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 26, 2026

Copy link
Copy Markdown
Contributor

Missing Jira issue

It is mandatory to specify a Jira issue in the source branch name
in order to merge into development/9.2. The issue key must follow
the prefix of the branch.

I could not find such an issue in bugfix/list-objects-restore-status.

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.

2 participants