Skip to content

feat(spanner): expose builders for Admin clients#5776

Open
olavloite wants to merge 1 commit into
googleapis:mainfrom
olavloite:spanner-admin-clients
Open

feat(spanner): expose builders for Admin clients#5776
olavloite wants to merge 1 commit into
googleapis:mainfrom
olavloite:spanner-admin-clients

Conversation

@olavloite
Copy link
Copy Markdown
Contributor

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

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
@olavloite olavloite requested review from a team as code owners May 28, 2026 07:30
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the Spanner API. label May 28, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.87%. Comparing base (30d28f9) to head (061c1cf).

Files with missing lines Patch % Lines
src/spanner/src/client.rs 0.00% 11 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the Spanner API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spanner: admin clients should also respect SPANNER_EMULATOR_HOST

1 participant