Skip to content

Conversation

@coryan
Copy link
Contributor

@coryan coryan commented Dec 4, 2021

A lot of useful metadata information is included the the metadata
headers for a GCS download over REST, and as an initial Object proto
for gRPC. This information is needed to perform consistent reads from
versioned objects (or detect inconsistent reads from objects without
versioning). I will need this information as part of the changes for
Arrow too.

Fixes #7677


This change is Reviewable

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 4, 2021
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Dec 4, 2021
@coryan coryan added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed cla: yes This human has signed the Contributor License Agreement. api: storage Issues related to the Cloud Storage API. labels Dec 4, 2021
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: f31658cdc4b6bb29e802185cfb3b2a372b74ebb2

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

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 4, 2021
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 402cd0c60c01c96a2b9aa03b29b56fd3c77d013b

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

@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Dec 5, 2021
@coryan coryan force-pushed the feature-storage-expose-metadata-info branch from 402cd0c to 17bae99 Compare December 5, 2021 13:10
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 17bae99eb9c31975360c73b1b0ecfaba1e033925

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

@coryan coryan force-pushed the feature-storage-expose-metadata-info branch from 17bae99 to 34dec08 Compare December 7, 2021 15:07
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 34dec08e2865d08214097146b71e80a142047c2d

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

@coryan coryan force-pushed the feature-storage-expose-metadata-info branch from 34dec08 to e4a1f93 Compare December 7, 2021 16:18
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: e4a1f9300f520a2b943d2bd14437af5aa2935497

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

@coryan coryan force-pushed the feature-storage-expose-metadata-info branch from e4a1f93 to a51f215 Compare December 7, 2021 17:51
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: a51f21597819964a8e93e9d5790ecf31801e9bca

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

@coryan coryan force-pushed the feature-storage-expose-metadata-info branch from a51f215 to 0e01d08 Compare December 7, 2021 20:09
@coryan coryan removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 7, 2021
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 0e01d084a5ba3fcba150a9f803c348448354c59b

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

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 8e57de5e5fafb29a1055f2700411fd2822a04e5b

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

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: c08521dc84a71694519fb256170b73820c389c01

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

@codecov
Copy link

codecov bot commented Dec 7, 2021

Codecov Report

Merging #7694 (c08521d) into main (cc5834b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head c08521d differs from pull request most recent head 3e5ea1e. Consider uploading reports for the commit 3e5ea1e to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7694   +/-   ##
=======================================
  Coverage   95.29%   95.30%           
=======================================
  Files        1256     1256           
  Lines      113697   113785   +88     
=======================================
+ Hits       108350   108442   +92     
+ Misses       5347     5343    -4     
Impacted Files Coverage Δ
google/cloud/storage/internal/object_read_source.h 66.66% <ø> (ø)
...le/cloud/storage/internal/curl_download_request.cc 90.10% <100.00%> (+0.84%) ⬆️
.../cloud/storage/internal/grpc_object_read_source.cc 100.00% <100.00%> (ø)
...le/cloud/storage/internal/object_read_streambuf.cc 97.93% <100.00%> (+0.08%) ⬆️
...gle/cloud/storage/internal/object_read_streambuf.h 100.00% <100.00%> (ø)
google/cloud/storage/object_read_stream.h 100.00% <100.00%> (ø)
...rage/tests/object_read_headers_integration_test.cc 95.18% <100.00%> (+8.51%) ⬆️
...ud/spanner/integration_tests/client_stress_test.cc 86.18% <0.00%> (+0.65%) ⬆️
...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 cc5834b...3e5ea1e. Read the comment docs.

A lot of useful metadata information is included the the metadata
headers for a GCS download over REST, and as an initial `Object` proto
for gRPC. This information is needed to perform consistent reads from
versioned objects (or detect inconsistent reads from objects without
versioning).  I will need this information as part of the changes for
Arrow too.
@coryan coryan force-pushed the feature-storage-expose-metadata-info branch from c08521d to 3e5ea1e Compare December 9, 2021 13:08
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 3e5ea1ee1e5feac12dc6d7e7ab27ddc826ca22bf

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

@coryan coryan marked this pull request as ready for review December 9, 2021 14:49
@coryan coryan requested a review from a team as a code owner December 9, 2021 14:49
@coryan
Copy link
Contributor Author

coryan commented Dec 9, 2021

After too many iterations this is now ready. PTaL.


auto is = client->ReadObject(bucket_name(), object_name,
Generation(insert->generation()));
EXPECT_EQ(insert->generation(), is.generation().value_or(0));
Copy link
Member

Choose a reason for hiding this comment

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

why are the .value_or()s necessary?

Copy link
Member

Choose a reason for hiding this comment

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

Nevermind, I see it now.

@coryan coryan merged commit 9abc956 into googleapis:main Dec 9, 2021
@coryan coryan deleted the feature-storage-expose-metadata-info branch December 9, 2021 17:52
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 Cloud Storage API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include metadata attributes on successful object downloads

3 participants