Skip to content

Conversation

@emmyzhou-db
Copy link
Contributor

@emmyzhou-db emmyzhou-db commented Jun 17, 2025

What changes are proposed in this pull request?

This PR introduces a new environment variable DATABRICKS_ENABLE_EXPERIMENTAL_ASYNC_TOKEN_REFRESH to enable asynchronous token refresh in the Databricks SDK for Java. This feature improves performance by allowing token refresh operations to happen in the background, reducing latency for API calls.

This change activates the asynchronous refresh capability that was previously added in #455. When enabled, stale tokens will trigger a background refresh while expired tokens will still block until a new token is fetched.

How to Enable Async Token Refresh

Set the environment variable:

export DATABRICKS_ENABLE_EXPERIMENTAL_ASYNC_TOKEN_REFRESH=true

This setting will be automatically picked up by the SDK and applied to all token refresh operations.

How is this tested?

Manual verification that existing unit tests and integration tests pass with both async refresh disabled and enabled.

@github-actions
Copy link

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-java

Inputs:

  • PR number: 465
  • Commit SHA: a1ac804c17f4fe83f17f759db1b610aaefd9a6a0

Checks will be approved automatically on success.

@emmyzhou-db emmyzhou-db added this pull request to the merge queue Jun 18, 2025
Merged via the queue into main with commit 33efa34 Jun 18, 2025
15 checks passed
@emmyzhou-db emmyzhou-db deleted the emmyzhou-db/add-async-refresh-support branch June 18, 2025 11:12
deco-sdk-tagging bot added a commit that referenced this pull request Jun 18, 2025
## Release v0.54.0

### New Features and Improvements
* [Experimental] Add support for asynchronous token refresh ([#464](#465)).
  Enable this feature by setting the environment variable:
  ```bash
  export DATABRICKS_ENABLE_EXPERIMENTAL_ASYNC_TOKEN_REFRESH=true
  ```
  Note: This feature and its configuration are experimental and may be removed in future releases.
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.

4 participants