[Fix] Initiate a new OAuth external browser login flow in case of refresh token exception
What changes are proposed in this pull request?
This PR change the OAuth token cache that when the cached oauth token cannot be refreshed, we still wanna go trigger a new OAuth login flow instead of just throwing an exception. This help customers who use OAuth U2M, when their cached access token expire they have a way to continue rather than stuck with exception.
How is this tested?
Manual test from dbt-databricks.
Anything I can do to get this prioritized? We've been stuck on 0.17.0 for more than a year, and this is the last piece needed for us to finish our migration to fully relying on SDK for dbt-databricks auth and being able to use latest versions of SDK.
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-py
Inputs:
- PR number: 823
- Commit SHA:
61f0ddaa186d303f1489433696fc657f6ee41822
Checks will be approved automatically on success.
@eric-wang-1990, I see you've re-assigned the PR to me but I cannot find any additional test in the code. Did you forget to commit the tests or is it that you need guidance to write them?
Just saw this, yeah I did not find any existing test about this cached token and I am not very familiar with this sdk codebase so I do not know where to add it. Can we land this fix first and then you guys can write the tests? Since dbt upgrade version is depending on this.
Hi, we need this fix too, as we are currently using a workaround by try-excepting and deleting the cached token file. If tests are necessary and I can assist, you would need to point me in the right direction :)