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(generator): support explicit routing headers #9368

Merged

Conversation

dbolduc
Copy link
Member

@dbolduc dbolduc commented Jun 28, 2022

Fixes #9121

The first and last commits are interesting. The middle two are not.

We do not pass our variables through service_method_vars. It is easier to work with the data directly.


This change is Reviewable

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: bf411cc415badb361ddebc95920a68f6ec84f637

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

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #9368 (a6af996) into main (ec741cb) will decrease coverage by 0.08%.
The diff coverage is 55.91%.

@@            Coverage Diff             @@
##             main    #9368      +/-   ##
==========================================
- Coverage   94.68%   94.60%   -0.09%     
==========================================
  Files        1480     1480              
  Lines      135483   135757     +274     
==========================================
+ Hits       128285   128431     +146     
- Misses       7198     7326     +128     
Impacted Files Coverage Δ
...gration_tests/golden/golden_kitchen_sink_client.cc 80.00% <0.00%> (-8.32%) ⬇️
...egration_tests/golden/golden_kitchen_sink_client.h 100.00% <ø> (ø)
...ion_tests/golden/golden_kitchen_sink_connection.cc 41.02% <0.00%> (-4.69%) ⬇️
...tion_tests/golden/golden_kitchen_sink_connection.h 100.00% <ø> (ø)
...lden_kitchen_sink_connection_idempotency_policy.cc 72.72% <0.00%> (-16.17%) ⬇️
...tegration_tests/golden/golden_thing_admin_client.h 100.00% <ø> (ø)
...den/internal/golden_kitchen_sink_auth_decorator.cc 70.12% <0.00%> (-10.47%) ⬇️
...lden/internal/golden_kitchen_sink_auth_decorator.h 100.00% <ø> (ø)
...en/internal/golden_kitchen_sink_connection_impl.cc 76.13% <0.00%> (-14.41%) ⬇️
...den/internal/golden_kitchen_sink_connection_impl.h 77.77% <ø> (ø)
... and 19 more

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 ec741cb...a6af996. Read the comment docs.

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 27d67fd66a2976962873adbc1f39923828d142ae

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

Copy link
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

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

Do you want to add tests for the async cases? Or streaming?

@dbolduc dbolduc marked this pull request as ready for review June 28, 2022 19:34
@dbolduc dbolduc requested a review from a team as a code owner June 28, 2022 19:34
@dbolduc dbolduc force-pushed the feat-generator-explicit-routing-headers branch from 27d67fd to a6af996 Compare June 30, 2022 03:00
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: a6af996c4f1f7927cb2b06f4931a35dfbc48e536

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

@dbolduc
Copy link
Member Author

dbolduc commented Jun 30, 2022

Do you want to add tests for the async cases? Or streaming?

I dropped the routing annotation on a streaming read and unary rpc where we generate async versions of the functions. IsContextMDValid revealed that if no routing matches were found, I wasn't sending any metadata at all. Yay for testing? Boo for self esteem.

Copy link
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

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

I think we still need to figure out streaming writes and streaming read-write RPCs, but those are (a) very rare, and (b) already broken I think.

@dbolduc dbolduc merged commit d19d731 into googleapis:main Jun 30, 2022
@dbolduc dbolduc deleted the feat-generator-explicit-routing-headers branch June 30, 2022 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support routing_parameters in the generator
3 participants