Skip to content

CLDSRV-874: return checksum in GetObjectAttributes#6123

Merged
bert-e merged 1 commit intodevelopment/9.4from
improvement/CLDSRV-874-return-checksum-get-object-attributes
Apr 1, 2026
Merged

CLDSRV-874: return checksum in GetObjectAttributes#6123
bert-e merged 1 commit intodevelopment/9.4from
improvement/CLDSRV-874-return-checksum-get-object-attributes

Conversation

@leif-scality
Copy link
Copy Markdown
Contributor

No description provided.

@bert-e
Copy link
Copy Markdown
Contributor

bert-e commented Mar 31, 2026

Hello leif-scality,

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.

@bert-e
Copy link
Copy Markdown
Contributor

bert-e commented Mar 31, 2026

Incorrect fix version

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

  • None

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

  • 9.4.0

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

@claude
Copy link
Copy Markdown

claude bot commented Mar 31, 2026

  • Unguarded algorithms[checksum.checksumAlgorithm] lookup in buildAttributesXml can crash the request handler if metadata contains an unrecognized algorithm value
    • Add a null check on the algorithm lookup before accessing .getObjectAttributeXMLTag

Review by Claude Code

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.79%. Comparing base (e940463) to head (d396ffe).
⚠️ Report is 24 commits behind head on development/9.4.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
lib/api/apiUtils/integrity/validateChecksums.js 98.80% <ø> (ø)
lib/api/apiUtils/object/objectAttributes.js 100.00% <100.00%> (ø)
lib/api/objectGetAttributes.js 96.66% <100.00%> (-0.26%) ⬇️

... and 2 files with indirect coverage changes

@@                 Coverage Diff                 @@
##           development/9.4    #6123      +/-   ##
===================================================
+ Coverage            84.73%   84.79%   +0.06%     
===================================================
  Files                  207      207              
  Lines                13592    13597       +5     
===================================================
+ Hits                 11517    11530      +13     
+ Misses                2075     2067       -8     
Flag Coverage Δ
file-ft-tests 68.69% <78.94%> (+0.04%) ⬆️
kmip-ft-tests 28.09% <2.63%> (-0.01%) ⬇️
mongo-v0-ft-tests 69.99% <78.94%> (+0.18%) ⬆️
mongo-v1-ft-tests 69.82% <78.94%> (-0.02%) ⬇️
multiple-backend 36.47% <10.52%> (-0.01%) ⬇️
sur-tests 36.36% <2.63%> (+0.80%) ⬆️
sur-tests-inflights 37.36% <2.63%> (-0.03%) ⬇️
unit 71.02% <100.00%> (+0.01%) ⬆️
utapi-v2-tests 34.63% <10.52%> (-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.

@leif-scality leif-scality force-pushed the improvement/CLDSRV-874-return-checksum-get-object-attributes branch from d1176e1 to 533ba93 Compare March 31, 2026 14:24
@claude
Copy link
Copy Markdown

claude bot commented Mar 31, 2026

LGTM

Review by Claude Code

@leif-scality leif-scality force-pushed the improvement/CLDSRV-874-return-checksum-get-object-attributes branch from 533ba93 to 63c5751 Compare March 31, 2026 14:30
@maeldonn maeldonn self-requested a review March 31, 2026 14:31
@claude
Copy link
Copy Markdown

claude bot commented Mar 31, 2026

LGTM

Review by Claude Code

@bert-e
Copy link
Copy Markdown
Contributor

bert-e commented Mar 31, 2026

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers


const algorithms = Object.freeze({
crc64nvme: {
getObjectAttributesXMLTag: 'ChecksumCRC64NVME',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we export these strings as constants, if used in other projects as well, arsenal would be a good place.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are not going to be used in other projects

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://scality.atlassian.net/browse/ARSN-564 I moved the xml creation to cloudserver need to remove it from arsenal

Copy link
Copy Markdown

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 adds support for returning object checksums in the S3 GetObjectAttributes response, aligning the API behavior with checksum metadata already computed/stored during PUT operations.

Changes:

  • Implement Checksum attribute rendering in GetObjectAttributes XML responses based on object metadata.
  • Extend checksum algorithm registry with GetObjectAttributes XML tag names.
  • Update/add unit and functional tests to validate checksum behavior (present when requested and available; absent otherwise).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/api/objectGetAttributes.js Removes the previous NotImplemented behavior and passes logger through to XML attribute builder.
lib/api/apiUtils/object/objectAttributes.js Adds Checksum attribute XML generation based on stored checksum metadata + algorithm tag mapping.
lib/api/apiUtils/integrity/validateChecksums.js Adds getObjectAttributesXMLTag metadata per algorithm to drive XML output.
tests/unit/api/objectGetAttributes.js Updates existing test and adds checksum-focused unit coverage for GetObjectAttributes output.
tests/unit/api/apiUtils/object/objectAttributes.js Adds unit coverage for checksum XML rendering (including unknown/absent checksum cases).
tests/functional/aws-node-sdk/test/object/objectGetAttributes.js Updates functional expectations to validate checksum output and adds checksum-focused functional tests.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This file is using 2-space indentation. Please switch to 4 spaces to match our formatting rules

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@leif-scality leif-scality force-pushed the improvement/CLDSRV-874-return-checksum-get-object-attributes branch from 63c5751 to d396ffe Compare April 1, 2026 13:45
@leif-scality leif-scality requested a review from maeldonn April 1, 2026 13:46
@claude
Copy link
Copy Markdown

claude bot commented Apr 1, 2026

LGTM

Review by Claude Code

Copy link
Copy Markdown
Contributor

@maeldonn maeldonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@leif-scality
Copy link
Copy Markdown
Contributor Author

ping

@leif-scality
Copy link
Copy Markdown
Contributor Author

/approve

@bert-e
Copy link
Copy Markdown
Contributor

bert-e commented Apr 1, 2026

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/9.4

The following branches have NOT changed:

  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.8
  • development/9.0
  • development/9.1
  • development/9.2
  • development/9.3

Please check the status of the associated issue CLDSRV-874.

Goodbye leif-scality.

The following options are set: approve

@bert-e bert-e merged commit d396ffe into development/9.4 Apr 1, 2026
31 checks passed
@bert-e bert-e deleted the improvement/CLDSRV-874-return-checksum-get-object-attributes branch April 1, 2026 14:49
@leif-scality leif-scality restored the improvement/CLDSRV-874-return-checksum-get-object-attributes branch April 9, 2026 17:51
@leif-scality leif-scality deleted the improvement/CLDSRV-874-return-checksum-get-object-attributes branch April 9, 2026 17:53
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.

5 participants