Commit f3156e2
authored
Make GCP SA token refresh non-blocking with warning on failure (#718)
## 🥞 Stacked PR
Use this
[link](https://github.com/databricks/databricks-sdk-java/pull/718/files)
to review incremental changes.
-
[**hectorcast-db/stack/port-6-gcp-sa-nonblocking**](#718)
[[Files
changed](https://github.com/databricks/databricks-sdk-java/pull/718/files)]
-
[hectorcast-db/stack/port-7-integration-test-metadata](#719)
[[Files
changed](https://github.com/databricks/databricks-sdk-java/pull/719/files/098605a019d01e262cd9d81d0315be4b77a0fd55..69946cd4740e3226676dd7ff2dce4f0ecbaede68)]
-
[hectorcast-db/stack/port-8-remove-unified-flag](#720)
[[Files
changed](https://github.com/databricks/databricks-sdk-java/pull/720/files/69946cd4740e3226676dd7ff2dce4f0ecbaede68..af8d93a4758d730905a9d95833f05911c68e8b5c)]
---------
## Summary
Port of Go SDK
[#1544](databricks/databricks-sdk-go#1544).
Makes the GCP SA access token (`X-Databricks-GCP-SA-Access-Token`)
refresh non-blocking in both `GoogleIdCredentialsProvider` and
`GoogleCredentialsCredentialsProvider`. On failure, a warning is logged
and the header is skipped instead of throwing an exception. The token is
now always attempted regardless of client type (previously only for
ACCOUNT clients).
**Why:** On unified hosts, the config type may not perfectly distinguish
account vs workspace operations. Making the SA token optional ensures
GCP auth doesn't fail when the SA token isn't needed.
**Changes:**
- `GoogleIdCredentialsProvider`: removed `ClientType.ACCOUNT` guard,
catch `IOException` and log warning
- `GoogleCredentialsCredentialsProvider`: same pattern
`NO_CHANGELOG=true`
## Test plan
- [ ] Verify GCP auth works for account and workspace clients
- [ ] Verify warning is logged when SA token refresh fails1 parent cc5965f commit f3156e2
File tree
2 files changed
+10
-19
lines changed- databricks-sdk-java/src/main/java/com/databricks/sdk/core
2 files changed
+10
-19
lines changedLines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
79 | 72 | | |
| 73 | + | |
| 74 | + | |
80 | 75 | | |
81 | 76 | | |
82 | 77 | | |
| |||
Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
81 | 77 | | |
82 | 78 | | |
83 | 79 | | |
| |||
0 commit comments