Make GCP SA token refresh non-blocking with warning on failure#1330
Merged
hectorcast-db merged 1 commit intomainfrom Mar 13, 2026
Merged
Make GCP SA token refresh non-blocking with warning on failure#1330hectorcast-db merged 1 commit intomainfrom
hectorcast-db merged 1 commit intomainfrom
Conversation
Previously, the GCP SA access token refresh was gated on ClientType.ACCOUNT. Now it always attempts the refresh but catches failures with a warning, since users may not have permissions to mint the SA token and this should not block authentication. Co-authored-by: Isaac
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
github-merge-queue bot
pushed a commit
to databricks/databricks-sdk-go
that referenced
this pull request
Mar 17, 2026
## 🥞 Stacked PR Use this [link](https://github.com/databricks/databricks-sdk-go/pull/1544/files) to review incremental changes. - [**stack/port/gcp-sa-token-non-blocking**](#1544) [[Files changed](https://github.com/databricks/databricks-sdk-go/pull/1544/files)] - [stack/port/test-environment-type](#1545) [[Files changed](https://github.com/databricks/databricks-sdk-go/pull/1545/files/bd038478c97820339e8964bfd74457dabfa945ad..2be31bf5c15ab0d33857e90e8504425f34489d63)] - [stack/port/host-metadata-integration-test](#1546) [[Files changed](https://github.com/databricks/databricks-sdk-go/pull/1546/files/2be31bf5c15ab0d33857e90e8504425f34489d63..b950d35820b3aefac7f9f3d12c837ddf5836ed80)] - [stack/port/remove-unified-flag](#1547) [[Files changed](https://github.com/databricks/databricks-sdk-go/pull/1547/files/b950d35820b3aefac7f9f3d12c837ddf5836ed80..221415789356aa846dfb0f346d690b67bd5c2aa4)] - [stack/port/gcp-sa-from-metadata](#1548) [[Files changed](https://github.com/databricks/databricks-sdk-go/pull/1548/files/221415789356aa846dfb0f346d690b67bd5c2aa4..8130b1f2566f65af5c40439ba1063b7f5f477835)] --------- ## Summary - Port of Python SDK PR databricks/databricks-sdk-py#1330 - Add `serviceToServiceVisitorWithFallback()` that logs a warning and skips the secondary header when the SA token source fails, instead of returning an error - `GoogleDefaultCredentials` now always attempts to create an SA token source regardless of config type, falling back gracefully on failure - `GoogleCredentials` also uses the fallback visitor ## Test plan - `TestServiceToServiceVisitorWithFallback_BothSucceed` - `TestServiceToServiceVisitorWithFallback_SecondaryFails_SkipsHeader` - `TestServiceToServiceVisitorWithFallback_PrimaryFails_ReturnsError` NO_CHANGELOG=true This pull request was AI-assisted by Isaac.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ClientType.ACCOUNTguard on GCP SA access token refresh in bothgoogle_credentialsandgoogle_idcredential providersTest plan
test_google_credentials_includes_sa_token_on_success— verifies SA token header is included when refresh succeedstest_google_credentials_warns_on_sa_token_failure— verifies warning is logged and SA token header is omitted on failuretest_google_id_includes_sa_token_on_success— verifies SA token header is included when refresh succeedstest_google_id_warns_on_sa_token_failure— verifies warning is logged and SA token header is omitted on failureThis pull request was AI-assisted by Isaac.
NO_CHANGELOG=true