Skip to content

feature: handle expired token gracefully for artifact helper - #805

Merged
soxofaan merged 4 commits into
masterfrom
feature/artifacts_stale_token
Sep 9, 2025
Merged

soxofaan merged 4 commits into
masterfrom
feature/artifacts_stale_token

Conversation

@pvbouwel

@pvbouwel pvbouwel commented Sep 8, 2025

Copy link
Copy Markdown
Contributor

If a token is expired we can refresh it by doing another OpenEO interaction. By allowing 3 attempts for the STS service and by doing a very wide except clause we also make ourselves more robust against intermittent errors.

If a token is expired we can refresh it by doing another OpenEO interaction.
By allowing 3 attempts for the STS service and by doing a very wide except
clause we also make ourselves more robust against intermittent errors.

@soxofaan soxofaan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

some quick notes

Comment thread openeo/extra/artifacts/_s3sts/sts.py Outdated
Comment thread openeo/extra/artifacts/_s3sts/sts.py Outdated
Comment thread openeo/extra/artifacts/_s3sts/sts.py Outdated
Comment thread openeo/extra/artifacts/_s3sts/sts.py
@pvbouwel

pvbouwel commented Sep 9, 2025

Copy link
Copy Markdown
Contributor Author

Addressed comments and also moved the describe_account to be before the first attempt since it does make sense:

  • if token is expired on first call then we won't lose an attempt
  • it is better to have happy paths the same as retry paths

@pvbouwel
pvbouwel requested a review from soxofaan September 9, 2025 09:12
@soxofaan
soxofaan merged commit 8cafa08 into master Sep 9, 2025
17 checks passed
@soxofaan
soxofaan deleted the feature/artifacts_stale_token branch September 9, 2025 10:09
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