Skip to content

Revert "Revert "Create a method to generate OAuth tokens (#644)" (#653)"#655

Merged
hectorcast-db merged 2 commits intomainfrom
oauth-token-fix
May 24, 2024
Merged

Revert "Revert "Create a method to generate OAuth tokens (#644)" (#653)"#655
hectorcast-db merged 2 commits intomainfrom
oauth-token-fix

Conversation

@hectorcast-db
Copy link
Copy Markdown
Contributor

This reverts commit 9c5fae7.

Changes

Introduce again the method to generate OAuth tokens, including fixes for impacted auth types

Tests

  • make test run locally
  • make fmt applied
  • relevant integration tests applied

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 24, 2024

This PR breaks backwards compatibility for databrickslabs/ucx downstream. See build logs for more details.

Running from downstreams #147

@hectorcast-db hectorcast-db requested a review from tanmay-db May 24, 2024 10:33
return {'Authorization': f'{token.token_type} {token.access_token}'}

return inner
def token() -> Token:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The difference from the original is this function. Previous code:

return OAuthCredentialsProvider(inner, inner.token)

That does not work because config.py tries to make a copy of inner which uses a "lock" (and cannot be copied). The function works as a wrapper, and allows this object to be copied without copying inner.

@hectorcast-db hectorcast-db added this pull request to the merge queue May 24, 2024
Merged via the queue into main with commit 2bafb95 May 24, 2024
@hectorcast-db hectorcast-db deleted the oauth-token-fix branch May 24, 2024 11:44
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