feat(storage): setting default checksum#32411
Open
shubhangi-google wants to merge 2 commits intogoogleapis:mainfrom
Open
feat(storage): setting default checksum#32411shubhangi-google wants to merge 2 commits intogoogleapis:mainfrom
shubhangi-google wants to merge 2 commits intogoogleapis:mainfrom
Conversation
3 tasks
894976e to
8a69368
Compare
cpriti-os
requested changes
Feb 5, 2026
| # | ||
| # Acceptable values are: | ||
| # | ||
| # * `true` [Boolean] - Calculate and provide a checksum using the CRC32c hash. |
There was a problem hiding this comment.
So true and crc32c will do the same thing?
cpriti-os
requested changes
Feb 5, 2026
| # If no checksum type or specific value is provided, the default will be set to crc32c. | ||
| # If the checksum is set to false, it will be disabled. | ||
| if [checksum, crc32c, md5].all?(&:nil?) || checksum == true | ||
| crc32c = Google::Cloud::Storage::File::Verifier.crc32c_for(StringIO.new("Hello world")) |
There was a problem hiding this comment.
Should the string "Hello world" also be passed as a parameter for robustness?
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces a significant enhancement to the Google Cloud Storage Ruby client by establishing CRC32c as the default checksum for file uploads. This change ensures that data integrity is automatically verified for uploads where a checksum isn't explicitly specified, thereby improving the reliability of data handling.
Highlights
checksumparameter inbucket.rbhas been updated to clearly state thatcrc32cis now the default.Note: Opening this PR as older PR was getting corrupted