feat(spanner): expose builders for Admin clients#5776
Conversation
Adds convinience builders for Spanner Admin clients. These builders automatically connect to the Spanner emulator instead of real Spanner, when the SPANNER_EMULATOR_HOST environment variable has been set. This makes these clients behave the same as the data client, and is consistent with the Spanner clients in the other programming languages. Fixes googleapis#4973
There was a problem hiding this comment.
Code Review
This pull request integrates the google-cloud-spanner-admin-instance-v1 crate into the Spanner client and updates the integration tests to use the official admin clients instead of raw HTTP requests. Specifically, it introduces instance_admin_builder on the Spanner client, refactors the builder configuration logic into a helper method, and updates the emulator provisioning and cleanup routines in tests to utilize InstanceAdmin and DatabaseAdmin clients. I have no feedback to provide as there are no review comments.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5776 +/- ##
==========================================
- Coverage 97.88% 97.87% -0.02%
==========================================
Files 226 226
Lines 56449 56459 +10
==========================================
+ Hits 55256 55257 +1
- Misses 1193 1202 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds convinience builders for Spanner Admin clients. These builders automatically connect to the Spanner emulator instead of real Spanner, when the SPANNER_EMULATOR_HOST environment variable has been set. This makes these clients behave the same as the data client, and is consistent with the Spanner clients in the other programming languages.
Fixes #4973