CLDSRV-892: store part checksum in part shadow object#6154
Conversation
leif-scality
commented
Apr 16, 2026
- UploadPart
- Store part checksum in part shadow objet
- Verify MPU checksum config with received headers
- Handle dual checksum case (default MPU checksum + custom client checkum)
- Refactor
- dataStore now takes checksum object as argument instead of parsing the headers
- getChecksumDataFromHeaders returns null instead of a default checksum, it is now up to the caller to select a default
- Functional tests will be added by https://scality.atlassian.net/browse/S3C-11120 that will make ListParts return the checksum
Hello leif-scality,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 2 files with indirect coverage changes @@ Coverage Diff @@
## development/9.4 #6154 +/- ##
===================================================
- Coverage 84.98% 84.97% -0.02%
===================================================
Files 207 207
Lines 13694 13760 +66
===================================================
+ Hits 11638 11692 +54
- Misses 2056 2068 +12
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Review by Claude Code |
192091b to
d8d75da
Compare
Review by Claude Code |
d8d75da to
7956a1f
Compare
|
LGTM |
2ca1c1d to
b9b6b70
Compare
|
LGTM |
|
LGTM |
b9b6b70 to
3f5975c
Compare
|
LGTM |
| return checkHashMatchMD5(stream, hashedStream, dataRetrievalInfo, | ||
| checksumedStream.stream, log, cbOnce); | ||
| checksumedStream.stream, log, (err, dataInfo, hash, primaryChecksum) => { | ||
| if (err) {return cbOnce(err);} |
There was a problem hiding this comment.
| if (err) {return cbOnce(err);} | |
| if (err) { return cbOnce(err); } |
There was a problem hiding this comment.
lets not use such 1 liners, ideally it should fail our linter
Another reference for this one: https://github.com/scality/Vault/pull/2274#discussion_r3090254295
|
|
||
| before(async () => { | ||
| for (const algo of allAlgos) { | ||
|
|
There was a problem hiding this comment.
trailing whitespaces should be caught by linter
| try { | ||
| await s3.send(new UploadPartCommand({ | ||
| Bucket: bucket, Key: key, UploadId: uploadId, | ||
| PartNumber: partNum, Body: partBody, | ||
| [checksumField[mpuAlgo]]: wrongDigest[mpuAlgo], | ||
| })); | ||
| assert.fail('Expected BadDigest error'); | ||
| } catch (err) { | ||
| assert.strictEqual(err.name, 'BadDigest'); | ||
| } |
There was a problem hiding this comment.
for this kind of pattern, to avoid try /catch in tests we can use assert.rejects, assert.throws
There was a problem hiding this comment.
Done — converted all three test blocks to assert.rejects.
3f5975c to
e38fc58
Compare
|
LGTM |
|
Solid refactor. The dual-checksum design (primary for storage, secondary for client validation) is clean and well-tested. A few observations: |
|
LGTM |
|
ping |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
|
/approve |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue CLDSRV-892. Goodbye leif-scality. The following options are set: approve |