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 wait between retries when there are download errors #65

Merged
merged 3 commits into from
Sep 4, 2023

Conversation

dliappis
Copy link
Contributor

@dliappis dliappis commented Sep 1, 2023

Currently gvm makes three attempts at retrying a failed download, but it doesn't wait in between.

This commit adds rudimentary wait time between download attempts. It also increases the number
of retries to 5.

In a future refactoring we could use go-retryablehttp1 (we'd still need to guard for errors with io.Copy) but keeping the
improvement short for now, hoping to reduce download related CI failures.

Footnotes

  1. https://pkg.go.dev/github.com/hashicorp/go-retryablehttp#section-readme

Currently gvm makes three attempts at retrying a failed download, but it
doesn't wait in between.

This commit adds rudimentary wait time between downloads.

In a future refactoring we could use `go-retryablehttp`[^1] (we'd still need
to guard for errors with `io.Copy`) but keeping the improvement short for
now, hoping to reduce download related CI failures.
Copy link
Owner

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

LGTM. Can you please add an entry to CHANGELOG.md.

@dliappis
Copy link
Contributor Author

dliappis commented Sep 4, 2023

LGTM. Can you please add an entry to CHANGELOG.md.

Thanks for the quick review! Added in d9cfa89

@andrewkroh andrewkroh merged commit ad4c3cd into andrewkroh:main Sep 4, 2023
7 checks passed
@andrewkroh
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants