Skip to content

Conversation

@Dhriti07
Copy link
Contributor

@Dhriti07 Dhriti07 commented Nov 11, 2025

Adding ability to provide custom crc32c for the Upload Request for MPU.
Refer: 3348

@Dhriti07 Dhriti07 requested a review from a team as a code owner November 11, 2025 09:20
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/java-storage API. labels Nov 11, 2025
@Dhriti07 Dhriti07 changed the title Adding custom checksum for upload part request feat: Adding custom checksum for upload part request Nov 11, 2025
@BenWhitehead BenWhitehead changed the title feat: Adding custom checksum for upload part request feat: add UploadPartRequest.crc32c property and requisite plumbing Nov 11, 2025
@BenWhitehead
Copy link
Collaborator

I've rephrased the title of this PR to be more clear about what the feature is, as the title will appear as-is in the changelog/release notes.

@BenWhitehead BenWhitehead merged commit 6f4d255 into main Nov 12, 2025
25 checks passed
@BenWhitehead BenWhitehead deleted the custom-checksum branch November 12, 2025 17:50
}

/**
* Returns the CRC32C checksum of the part to upload.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add the encoding related information. It should be clear to the user what encoding it needs to do on the crc32c value.

}
}

private void addChecksumHeader(@Nullable String crc32c, HttpHeaders headers) {
Copy link
Contributor

Choose a reason for hiding this comment

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

crc32c won't be null given the 2 flows calling it are sending non-null value. @nullable is not required.

}

private void addChecksumHeader(@Nullable String crc32c, HttpHeaders headers) {
if (crc32c != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this check is also redundant

Dhriti07 added a commit that referenced this pull request Nov 13, 2025
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
*/
@BetaApi
public Builder crc32c(@Nullable String crc32c) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar setup is required in the completeMultipartUpload as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/java-storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants