Skip to content

fix(GCS+gRPC): no hashes in Object resource#6963

Merged
coryan merged 2 commits intogoogleapis:mainfrom
coryan:cleanup-storage-no-hashes-in-object-resource
Jul 9, 2021
Merged

fix(GCS+gRPC): no hashes in Object resource#6963
coryan merged 2 commits intogoogleapis:mainfrom
coryan:cleanup-storage-no-hashes-in-object-resource

Conversation

@coryan
Copy link
Copy Markdown
Contributor

@coryan coryan commented Jul 9, 2021

The proto file says that neither the md5_hash nor the crc32c fields
should be set when uploading an Object:

https://github.com/googleapis/googleapis/blob/1eade8161f2ef102282869bc3eb18841807b2b46/google/storage/v1/storage_resources.proto#L691-L694
https://github.com/googleapis/googleapis/blob/1eade8161f2ef102282869bc3eb18841807b2b46/google/storage/v1/storage_resources.proto#L676-L679

Also improved the documentation on how to obtain these hashes for tests.

I disabled some tests that used to pass because the service does not ignore
the hashes in the Object resource. The documentation says it does (see
the links), so my tests were passing by accident and the service can change
at any time. Once I fix #4156 and #4157 these tests can be enabled again.

Part of the work for #6946, and will eventually help with #4156 and #4157


This change is Reviewable

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 9, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 9, 2021
@google-cloud-cpp-bot
Copy link
Copy Markdown
Contributor

Google Cloud Build Logs
For commit: 19c0aae5bbf640cd74042d3c7c2f731d8b66a3a6

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 9, 2021

Codecov Report

Merging #6963 (f1f5f92) into main (d9fc80b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #6963   +/-   ##
=======================================
  Coverage   94.58%   94.58%           
=======================================
  Files        1284     1284           
  Lines      114301   114301           
=======================================
+ Hits       108110   108112    +2     
+ Misses       6191     6189    -2     
Impacted Files Coverage Δ
google/cloud/storage/internal/grpc_client.cc 93.65% <ø> (-0.03%) ⬇️
...torage/internal/grpc_client_object_request_test.cc 100.00% <ø> (ø)
.../storage/tests/object_checksum_integration_test.cc 100.00% <100.00%> (ø)
...loud/storage/tests/object_hash_integration_test.cc 100.00% <100.00%> (ø)
.../cloud/storage/benchmarks/throughput_experiment.cc 74.50% <0.00%> (-0.50%) ⬇️
...cloud/pubsub/internal/subscription_session_test.cc 98.02% <0.00%> (+0.24%) ⬆️
...bigtable/examples/bigtable_hello_instance_admin.cc 83.51% <0.00%> (+2.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9fc80b...f1f5f92. Read the comment docs.

@google-cloud-cpp-bot
Copy link
Copy Markdown
Contributor

Google Cloud Build Logs
For commit: f1f5f9243482879a268cc2d745b883009779d786

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@coryan coryan marked this pull request as ready for review July 9, 2021 19:52
@coryan coryan requested a review from a team July 9, 2021 19:52
Copy link
Copy Markdown
Member

@scotthart scotthart left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @coryan)

@coryan coryan merged commit 13c1648 into googleapis:main Jul 9, 2021
@coryan coryan deleted the cleanup-storage-no-hashes-in-object-resource branch July 9, 2021 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement CRC32C checksum in GrpcResumableUploadSession

4 participants