Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc(storage): document per-operation options #9247

Merged

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Jun 10, 2022

Fixes #7691


This change is Reviewable

@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Jun 10, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 9123a2e0593b374aa77f2cc21da2a1c60097d9b5

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

@codecov
Copy link

codecov bot commented Jun 10, 2022

Codecov Report

Merging #9247 (629f657) into main (5d88584) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #9247   +/-   ##
=======================================
  Coverage   94.57%   94.57%           
=======================================
  Files        1457     1458    +1     
  Lines      131845   131934   +89     
=======================================
+ Hits       124690   124779   +89     
  Misses       7155     7155           
Impacted Files Coverage Δ
google/cloud/storage/client.h 99.83% <ø> (ø)
...e/examples/storage_client_per_operation_samples.cc 100.00% <100.00%> (ø)
...cloud/pubsub/internal/subscription_session_test.cc 97.75% <0.00%> (-0.50%) ⬇️
...loud/bigtable/internal/connection_refresh_state.cc 100.00% <0.00%> (+2.77%) ⬆️

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 5d88584...629f657. Read the comment docs.

@coryan coryan marked this pull request as ready for review June 10, 2022 12:03
@coryan coryan requested a review from a team as a code owner June 10, 2022 12:03
google/cloud/storage/client.h Outdated Show resolved Hide resolved
Comment on lines +182 to +183
* parameters can be specified in any order. Specifying a request option that is
* not applicable to a member function results in a compile-time error.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this true? If so, I'm not sure it is a feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can have a discussion about whether we should change this, but this is not new behavior. Note that this is referring to the static options, so something like this would fail to compile:

  client.GetBucketMetadata("my-bucket",
     gcs::Generation(7) // compile-time error, buckets do not have generations
 );

while this would compile (and this is new behavior):

  client.GetBucketMetadata("my-bucket",
    g::Options{}.set<pubsub::RetryPolicyOption(...) // ignored
  );

Copy link
Contributor

Choose a reason for hiding this comment

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

That's cool. I was only thinking about the behavior for Options.

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: aa3c3f92af2ab86ac8fdebc17f3a534ea6b3fcc9

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

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 629f6570146062f1f831d93105c6f360fffd4cb4

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

@coryan coryan enabled auto-merge (squash) June 10, 2022 20:15
@coryan coryan merged commit 224aef3 into googleapis:main Jun 10, 2022
@coryan coryan deleted the feat-storage-per-operation-options-final branch June 10, 2022 20:24
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add storage support for per-operation options
3 participants