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

Added retry on chunk download on any error #179

Merged
merged 3 commits into from
Apr 28, 2023

Conversation

danielRicaud
Copy link
Contributor

No description provided.

@danielRicaud danielRicaud self-assigned this Apr 26, 2023
@danielRicaud danielRicaud requested a review from a team as a code owner April 26, 2023 19:53
@github-actions
Copy link

If these changes look good, signoff on them with:

git pull && git commit --amend --signoff && git push --force-with-lease origin

If they aren't any good, please remove them with:

git pull && git reset --hard HEAD~1 && git push --force-with-lease origin

Signed-off-by: Daniel Ricaud <dricaud@virtru.com>
@danielRicaud danielRicaud force-pushed the feature/add-retry-on-any-error branch from 9020900 to c8b8e11 Compare April 26, 2023 19:57
axiosRetry(axios, {
retries: 3,
retryDelay: axiosRetry.exponentialDelay,
retryCondition: () => true,
Copy link
Member

Choose a reason for hiding this comment

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

We probably don't want to retry on every failure. Do you know what the default condition is?

Also, does this affect all global axios requests? We might want to start using axios.create to allow more fine-grained control - and avoid accidentally altering behavior outside of what we intend

Copy link
Member

Choose a reason for hiding this comment

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

Also it looks like you can set these parameters on a given request (at least, if paired with axios.create, although IDK if that is required or just in the example code), so we maybe want to be more selective about this specific change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously it'd only retry indempodent requests and now it also included POST/PATCH along with the indempodent methods. It also now retries timeout related errors like ECONNABORTED that would previously not be retried.

image

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@danielRicaud danielRicaud merged commit 5ff35ef into main Apr 28, 2023
@danielRicaud danielRicaud deleted the feature/add-retry-on-any-error branch April 28, 2023 20:14
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