fix: support locational endpoints#3402
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3402 +/- ##
==========================================
+ Coverage 96.19% 96.22% +0.03%
==========================================
Files 115 115
Lines 4573 4587 +14
==========================================
+ Hits 4399 4414 +15
+ Misses 174 173 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
coryan
left a comment
There was a problem hiding this comment.
I did not think about whether we should do the same thing for gRPC based clients. The answer is probably.
I agree.
It would be easy enough to refactor host_from_endpoint and the related tests.
https://cloud.google.com/storage/docs/regional-endpoints
So maybe we should do that now?
|
And I forgot these: https://cloud.google.com/storage/docs/locational-endpoints |
Definitely. I will merge this PR because it adds functionality and isn't obviously wrong. Then probably send a refactor PR. Then send another PR that adds support to the gRPC client (with integration tests). |
Part of the work for googleapis#3375. (The other half is gRPC). When a client is configured to use a locational / regional endpoints, use them as the host, instead of the default host (global). The client library detects these automatically. Adds an integration test that fails without the corresponding changes to the `gaxi` client.
Part of the work for #3375. (The other half is gRPC).
When a client is configured to use a locational / regional endpoints, use them as the host, instead of the default host (global).
The client library detects these automatically. (Whereas, in C++, we decided to expose an
AuthorityOption). If you have more test cases for custom endpoints, I will happily add them.Adds an integration test that fails without the corresponding changes to the
gaxiclient.I did not think about whether we should do the same thing for gRPC based clients. The answer is probably. It would be easy enough to refactor
host_from_endpointand the related tests.