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

feat(pubsub): implement per-call options for Subscriber #10043

Merged
merged 4 commits into from
Oct 13, 2022

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Oct 13, 2022

Part of the work for #7689


This change is Reviewable

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Oct 13, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: af2f4691a1a84a49db6b8cf906b7a33a69be2324

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

@codecov
Copy link

codecov bot commented Oct 13, 2022

Codecov Report

Base: 94.22% // Head: 94.23% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (5942541) compared to base (fb6ec82).
Patch coverage: 99.04% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10043   +/-   ##
=======================================
  Coverage   94.22%   94.23%           
=======================================
  Files        1525     1526    +1     
  Lines      141667   141758   +91     
=======================================
+ Hits       133485   133582   +97     
+ Misses       8182     8176    -6     
Impacted Files Coverage Δ
google/cloud/pubsub/subscriber_connection.h 0.00% <0.00%> (ø)
...le/cloud/pubsub/mocks/mock_subscriber_connection.h 100.00% <100.00%> (ø)
google/cloud/pubsub/subscriber.cc 100.00% <100.00%> (ø)
google/cloud/pubsub/subscriber_connection.cc 77.14% <100.00%> (-0.33%) ⬇️
google/cloud/pubsub/subscriber_connection_test.cc 97.81% <100.00%> (-0.51%) ⬇️
google/cloud/pubsub/subscriber_test.cc 99.13% <100.00%> (+1.91%) ⬆️
...le/cloud/storage/internal/curl_download_request.cc 89.29% <0.00%> (-0.34%) ⬇️
google/cloud/pubsub/samples/samples.cc 90.77% <0.00%> (+0.07%) ⬆️
...cloud/pubsub/internal/subscription_session_test.cc 97.98% <0.00%> (+0.16%) ⬆️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: b47aecaa8c71015560064e88a52227023b0d2ffe

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

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 01f3d37e2259ad5c03c6ad8986d69c6810606b6f

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

@coryan coryan marked this pull request as ready for review October 13, 2022 17:55
@coryan coryan requested a review from a team as a code owner October 13, 2022 17:55
Subscriber subscriber(mock, Options{}.set<TestOptionA>("override-a"));
ASSERT_STATUS_OK(subscriber
.Subscribe([](Message const&, AckHandler const&) {},
Options{}.set<TestOptionB>("override-b1"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps these should also be setting TestOptionA too, to check that call overrides client.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Subscriber::Subscriber(std::shared_ptr<SubscriberConnection> connection,
Options opts)
: connection_(std::move(connection)),
options_(google::cloud::internal::MergeOptions(std::move(opts),
Copy link
Contributor

Choose a reason for hiding this comment

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

Q. Do we like google::cloud:: qualifications when we're already in google::cloud?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@coryan coryan force-pushed the feat-pubsub-per-subscriber-options branch from 01f3d37 to 5942541 Compare October 13, 2022 21:15
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 5942541634db945bcd6fce3f74077a4120a59e92

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

@coryan coryan enabled auto-merge (squash) October 13, 2022 21:23
@coryan coryan merged commit 1892fe8 into googleapis:main Oct 13, 2022
@coryan coryan deleted the feat-pubsub-per-subscriber-options branch October 13, 2022 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants