Skip to content

Conversation

@anupam-saini
Copy link
Contributor

Closes #234

  • Attempts to retry 2 more times if the initial call fails.
  • The retry is only triggered for AuthorizationExpiredError response.

rest_catalog._refresh_token() # pylint: disable=protected-access


_RETRY_ARGS = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, I like this 👍

@Fokko Fokko added this to the PyIceberg 0.7.0 release milestone Feb 7, 2024
Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @anupam-saini

@Fokko Fokko merged commit 82d8892 into apache:main Feb 20, 2024
sungwy pushed a commit to sungwy/iceberg-python that referenced this pull request Feb 20, 2024
* Refresh Auth token on expiry

* Check call count

* Add test to cover retry logic

* Update poetry.lock with tenacity

* Fix tests for Python <= 3.9
@anupam-saini anupam-saini deleted the as-token-refresh branch February 21, 2024 04:02
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.

Rest Catalog Refresh Access Token with stored CLIENT_ID and CLIENT_SECRET

3 participants