This repository was archived by the owner on Mar 3, 2026. It is now read-only.
feat: Enable full object checksum validation on JSON path#2687
Merged
ddelgrosso1 merged 15 commits intomainfrom Jan 20, 2026
Merged
feat: Enable full object checksum validation on JSON path#2687ddelgrosso1 merged 15 commits intomainfrom
ddelgrosso1 merged 15 commits intomainfrom
Conversation
Adds validation for client-provided (pre-calculated) and client-calculated CRC32C and MD5 hashes when the final upload request is made via the JSON API path (status 200). This ensures consistency checks are performed even when the `Upload` stream is finalized, preventing silent data corruption if the server-reported hash (in the response body) mismatches the client's expected hash.
Adds the 'Validation of Client Checksums Against Server Response' test suite. Fixes test failures in client-provided hash scenarios by updating mock responses to ensure server-reported checksums match the client's expected values.
Refactors four duplicate test cases (CRC32C/MD5 success and failure) into a single, parameterized test block within the 'Validation of Client Checksums Against Server Response' suite. This improves test clarity and reduces code duplication by dynamically generating test scenarios for post-upload hash validation.
6 tasks
This commit introduces several stability fixes for the ResumableUpload class: 1. **Fixes Timeouts in Unit Tests:** Updates `makeRequestStream` mocks to fully drain the request body stream, resolving stream consumption deadlocks and timeouts in `#startUploading` unit tests. 2. **Fixes Multi-Part Hang:** Correctly finalizes the `pipeline` for partial chunks (`isPartialUpload=true`) by calling `pipelineCallback()` immediately after successful chunk upload, preventing indefinite hangs in multi-session tests. 3. **Fixes Single-Chunk Checksum Missing Header:** Applies the `X-Goog-Hash` header unconditionally in single-chunk mode if a validator is present, ensuring checksum validation is active even when `contentLength` is unknown.
ddelgrosso1
reviewed
Dec 10, 2025
ddelgrosso1
reviewed
Dec 10, 2025
shubham-up-47
previously approved these changes
Dec 17, 2025
Simplify `HashStreamValidator._flush` by utilizing `md5Digest` getter.
shubham-up-47
approved these changes
Dec 18, 2025
Contributor
Author
|
@ddelgrosso1 Just a quick reminder to take a look at this PR when you get a chance! |
Contributor
Author
|
Hi @ddelgrosso1, Just a quick reminder to take a look at this PR when you get a chance! |
ddelgrosso1
reviewed
Jan 7, 2026
ddelgrosso1
approved these changes
Jan 7, 2026
Contributor
Author
|
Hi @ddelgrosso1, Could you please merge this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Impact
Testing
Additional Information
Checklist
Fixes #