-
Notifications
You must be signed in to change notification settings - Fork 132
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
fix: retry on download errors #274
Conversation
Good idea, though this never gives up and doesnt back off incrementallly.. Any library we might be able to use maybe? 🤔 |
to avoid failing because of issues like connection reset
It just tries once, one second later, but I've used now hashicorp/go-retryablehttp. |
retries and other errors
@yannh added a test with a real http server to test the retries test output
|
pkg/registry/http_test.go
Outdated
schemaPathTemplate: testCase.schemaPathTemplate, | ||
strict: testCase.strict, | ||
// create a temporary directory for the cache | ||
tmpDir, err := os.MkdirTemp("", "kubeconform-cache") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about creating a cache folder here... Esp as we test the HTTP client?
Hi @carlossg , thanks a lot for the contribution. Your tests are quite a bit more complex than what we had before, but they look good. I iterated on them a little bit, can you let me know what you think? Thanks! |
much better thanks |
Acceptance tests are failing, not sure why - they run locally just fine. Unsure if related to this PR 🤔 it ll take me some time to troubleshoot. |
I reverted it, it seems to print debug log in some cases. I ll review this later today/this week 🙇 |
to avoid failing because of issues like connection reset