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

Adding support for retry with backoff #502

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

GreenGremlin
Copy link

@GreenGremlin GreenGremlin commented Jun 24, 2022

Fixes #73

This PR adds a new option maxRetries which defaults to 0. When a value greater than 0 is passed, the plugin will retry failed uploads, up to the number of maxRetries passed. Each retry is delayed by an exponentially increasing backoff to ensure retries don't inundate a potentially strained server.

@GreenGremlin
Copy link
Author

@florrain it looks like you're currently the only member of thredup. Is there any chance you would be able to take a look at this PR?

@GreenGremlin
Copy link
Author

GreenGremlin commented Jun 28, 2022

@waltjones you appear to be one of the primary contributors to rollbar-cli. so I'm taking a shot in the dark. This project seems to be abandoned. Is there any chance Rollbar might consider either taking over the project, if someone at thredup is willing to transfer it, or maintaining a fork of it?

@brandondoran
Copy link
Collaborator

@GreenGremlin thanks for the PR. This project isn't abandoned. We will have a look and catch up on some PRs and issues.

@GreenGremlin
Copy link
Author

@brandondoran awesome! Thank you!

async uploadSourceMapWithRetry(compilation, asset, depth = 0) {
try {
// eslint-disable-next-line no-console
console.info(`Uploading ${asset.sourceMap} to Rollbar`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would you mind wrapping this in a if (!this.silent) check for consistency?

Copy link
Author

Choose a reason for hiding this comment

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

Ah, yes! Updated.

@GreenGremlin
Copy link
Author

@brandondoran this PR is ready for another look

@GreenGremlin
Copy link
Author

@brandondoran bumping this, in case it fell through the cracks

@jstrater
Copy link

jstrater commented Oct 6, 2022

Thanks for putting this together, @GreenGremlin and @brandondoran! This is really going to help users cut down on build failures.

@imconfused218
Copy link

This would be a great addition! Lots of build failures lately that this could easily fix. @brandondoran Any chance you can take another pass? 🙏

@GreenGremlin
Copy link
Author

@brandondoran is there any chance you might be able to give this PR another look?

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.

Add retries for http requests
4 participants