Skip to content

Conversation

@shivam2680
Copy link
Collaborator

Description

Problem: When using con.setClientInfo("Auth_AccessToken", <new_token>) to update the access token, subsequent queries continued using the old token instead of the new one. This caused authentication failures when the new token was invalid or when the old token expired.

fix: Made databricksConfig mutable in DatabricksThriftAccessor and update it with new config (token) on con.setClientInfo("Auth_AccessToken", <new_token>) calls.

Testing

Unit tests

Additional Notes to the Reviewer

Copy link
Collaborator

@jayantsing-db jayantsing-db left a comment

Choose a reason for hiding this comment

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

u2m not working seems like a major bug. what versions we have u2m not working? curious how did this slip past testing?

@jayantsing-db
Copy link
Collaborator

u2m not working seems like a major bug

looks like a specific CUJ in U2M doesn't work and typical U2M works?

Copy link
Collaborator

@nikhilsuri-db nikhilsuri-db left a comment

Choose a reason for hiding this comment

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

LGTM, Can we write end to end test to verify this fix?

@samikshya-db
Copy link
Collaborator

@nikhilsuri-db - that is not possible at the moment.

@jayantsing-db looks like a specific CUJ in U2M doesn't work and typical U2M works?
The U2M scenario itself is complex : there are 48 variations (3clouds * proxy/nonproxy * discoveryURLUsage * refreshTokenUsage* tokenFed). We are closely working with SDK to address some of these differences even today (after a couple of iterations earlier) : databricks/databricks-sdk-java#525. I don't know if that answers your q though.

@shivam2680 shivam2680 enabled auto-merge (squash) October 17, 2025 19:37
@shivam2680 shivam2680 merged commit cfce051 into main Oct 17, 2025
12 of 13 checks passed
@shivam2680 shivam2680 deleted the shivam2680/token-refresh-fix branch October 17, 2025 19:49
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.

6 participants