Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sdk download retry logic #140

Merged
merged 7 commits into from
Oct 18, 2024
Merged

Conversation

runesoerensen
Copy link
Contributor

@runesoerensen runesoerensen commented Oct 17, 2024

This PR adds simple retry logic when SDK downloads fail due to an I/O error, to better handle unexpected connection issues during downloads.

We may want to add additional logic in the future (to retry for instance HTTP 429 and HTTP 503 responses), or limit the I/O error retries to just connection resets or unexpected EOF. I've also only allowed one retry after 1 second, which we may also want to increase.

The bullet_stream crate was bumped to 0.3.0 to leverage schneems/bullet_stream#10.

@runesoerensen runesoerensen added skip changelog Skip the check-changelog check enhancement New feature or request and removed skip changelog Skip the check-changelog check labels Oct 17, 2024
@runesoerensen runesoerensen marked this pull request as ready for review October 17, 2024 13:08
@runesoerensen runesoerensen requested a review from a team as a code owner October 17, 2024 13:08
Copy link
Member

@Malax Malax left a comment

Choose a reason for hiding this comment

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

FWIW: I have some prior art for a more sophisticated solution should you ever need one: https://github.com/heroku/buildpacks-jvm/blob/b27cc75c2c5dac1841dd262edf3aadc8feb63ab5/shared-test/src/lib.rs

@runesoerensen runesoerensen merged commit 878d786 into main Oct 18, 2024
5 checks passed
@runesoerensen runesoerensen deleted the add-sdk-download-retry-logic branch October 18, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants