Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Fix for infinite axios-retry on 5xx responses and axios client option leakage#255

Merged
pooyaj merged 4 commits intosegmentio:masterfrom
yujidude:axiosFix
Oct 26, 2020
Merged

Fix for infinite axios-retry on 5xx responses and axios client option leakage#255
pooyaj merged 4 commits intosegmentio:masterfrom
yujidude:axiosFix

Conversation

@yujidude
Copy link
Contributor

This merge seeks to address two issues:

  1. Fix the infinite retry bug associated with axios 0.19.0
  2. Prevent axios-retry options from leaking into other codebases that are using axios

To address the first concern I've updated the current version of axios to 0.19.2 which contains the necessary fixes for avoiding infinite retries within axios when the HTTP response is within the 5xx range.

As per the second concern, I've configured the Analytics class to instead use it's own axios client, thereby preventing client options from leaking into other axios instances.

Unit tests have been added to validate that the retries are in fact working and that option leakage is no longer occuring.

@yujidude
Copy link
Contributor Author

yujidude commented Oct 19, 2020

Resolves #239, resolves #223.

@yujidude
Copy link
Contributor Author

Hi @ivolo @travisjeffery @f2prateek - I noticed that the three of you appear to be the top committers to this repository and I was interested in getting your thoughts on this particular pull request. I believe this PR will resolve a few outstanding issues and I'd love to help with a potential fix. Is there anything additional that you'd like to see in this PR for it to receive approval?

@f2prateek f2prateek requested review from lubird and pooyaj October 26, 2020 03:36
@f2prateek
Copy link
Contributor

cc @lubird @pooyaj

Copy link
Contributor

@pooyaj pooyaj left a comment

Choose a reason for hiding this comment

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

Thanks for sending the PR! Looks great ✨

@pooyaj pooyaj merged commit 1197154 into segmentio:master Oct 26, 2020
@pooyaj
Copy link
Contributor

pooyaj commented Oct 26, 2020

@yujidude I published 3.4.0-beta.3 to npm!

@yujidude
Copy link
Contributor Author

Fantastic! Thank you again for the review!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite loop due to axios 0.19.x and axios-retry

3 participants