Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Enable async refreshes for OAuth tokens #1143

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

renaudhartert-db
Copy link
Contributor

@renaudhartert-db renaudhartert-db commented Feb 6, 2025

What changes are proposed in this pull request?

This PR enables async refreshes for cached token sources.

This PR also:

  • Fixes a race condition bug in the unit tests by adding a small delay to the test refresh.
  • Remove one test in AzureCLI that is not correct anymore due to how the code is structured. Refactoring this to guarantee that the test pass is not trivial and ultimately out of the scope of the new system — as the cached token source is the one providing the guarantee.

How is this tested?

Fix unit tests.

Copy link

github-actions bot commented Feb 7, 2025

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-go

Inputs:

  • PR number: 1143
  • Commit SHA: 33f9a012282ebe68fb4db513d63883d71dbf602b

Checks will be approved automatically on success.

@renaudhartert-db renaudhartert-db changed the title [Feature] Enable async refrshes for OAuth tokens [Feature] Enable async refreshes for OAuth tokens Feb 7, 2025
@renaudhartert-db renaudhartert-db added this pull request to the merge queue Feb 7, 2025
Merged via the queue into main with commit 8307a4d Feb 7, 2025
17 checks passed
@renaudhartert-db renaudhartert-db deleted the renaud.hartert/async-enable branch February 7, 2025 16:39
hectorcast-db added a commit that referenced this pull request Feb 11, 2025
### New Features and Improvements

 * Enable async refreshes for OAuth tokens ([#1143](#1143)).

### Internal Changes

 * Add support for asynchronous data plane token refreshes ([#1142](#1142)).
 * Introduce new TokenSource interface that takes a `context.Context` ([#1141](#1141)).

### API Changes:

 * Added `GetMessageQueryResultByAttachment` method for [w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI) workspace-level service.
 * Added `Id` field for [apps.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#App).
 * Added `LimitConfig` field for [billing.UpdateBudgetPolicyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#UpdateBudgetPolicyRequest).
 * Added `Volumes` field for [compute.ClusterLogConf](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ClusterLogConf).
 * Added .
 * Removed `ReviewState`, `Reviews` and `RunnerCollaborators` fields for [cleanrooms.CleanRoomAssetNotebook](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomAssetNotebook).

OpenAPI SHA: 99f644e72261ef5ecf8d74db20f4b7a1e09723cc, Date: 2025-02-11
hectorcast-db added a commit that referenced this pull request Feb 11, 2025
 * Enable async refreshes for OAuth tokens ([#1143](#1143)).

 * Add support for asynchronous data plane token refreshes ([#1142](#1142)).
 * Introduce new TokenSource interface that takes a `context.Context` ([#1141](#1141)).

 * Added `GetMessageQueryResultByAttachment` method for [w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI) workspace-level service.
 * Added `Id` field for [apps.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#App).
 * Added `LimitConfig` field for [billing.UpdateBudgetPolicyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#UpdateBudgetPolicyRequest).
 * Added `Volumes` field for [compute.ClusterLogConf](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ClusterLogConf).
 * Added .
 * Removed `ReviewState`, `Reviews` and `RunnerCollaborators` fields for [cleanrooms.CleanRoomAssetNotebook](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomAssetNotebook).

OpenAPI SHA: 99f644e72261ef5ecf8d74db20f4b7a1e09723cc, Date: 2025-02-11
github-merge-queue bot pushed a commit that referenced this pull request Feb 11, 2025
### New Features and Improvements

* Enable async refreshes for OAuth tokens
([#1143](#1143)).


### Internal Changes

* Add support for asynchronous data plane token refreshes
([#1142](#1142)).
* Introduce new TokenSource interface that takes a `context.Context`
([#1141](#1141)).


### API Changes:

* Added `GetMessageQueryResultByAttachment` method for
[w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI)
workspace-level service.
* Added `Id` field for
[apps.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#App).
* Added `LimitConfig` field for
[billing.UpdateBudgetPolicyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/billing#UpdateBudgetPolicyRequest).
* Added `Volumes` field for
[compute.ClusterLogConf](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#ClusterLogConf).
* [Breaking] Removed `ReviewState`, `Reviews` and `RunnerCollaborators`
fields for
[cleanrooms.CleanRoomAssetNotebook](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomAssetNotebook).

OpenAPI SHA: 99f644e72261ef5ecf8d74db20f4b7a1e09723cc, Date: 2025-02-11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants