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

Introduce retry logic to upload #17

Closed
rlaakkol opened this issue Sep 13, 2018 · 2 comments
Closed

Introduce retry logic to upload #17

rlaakkol opened this issue Sep 13, 2018 · 2 comments
Labels
scheduled Work is starting on this feature/bug

Comments

@rlaakkol
Copy link

When we upload sourcemaps in our CI runs, we occasionally get the following error:

ERROR in BugsnagSourceMapPlugin (Bad Gateway (502) - 
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>502 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2>
</body></html>
)

It happens quite rarely, but it is pretty annoying to get failed CI runs because of it, so could you consider adding some kind of retry logic (with some sane backoff) to the upload phase?

@rlaakkol
Copy link
Author

Alternatively some kind of option to ignore upload failures could be a passable solution.

@bengourley bengourley added the scheduled Work is starting on this feature/bug label Sep 20, 2018
@bengourley
Copy link
Contributor

Thanks for the suggestion, this sounds like a very reasonable thing to do. I've added it to our internal backlog. Cheers @rlaakkol!

bengourley added a commit to bugsnag/bugsnag-sourcemaps that referenced this issue Nov 28, 2018
This adds a bit more tolerance to network outages etc. If a 40x status code is recieved from the API
it will not retry as this indicates a bad request – so no need to keep sening the same
request.

There were no end-to-end tests predating this feature so I added some.

Fixes bugsnag/webpack-bugsnag-plugins#17.
bengourley added a commit to bugsnag/bugsnag-sourcemaps that referenced this issue Nov 28, 2018
This adds a bit more tolerance to network outages etc. If a 40x status code is recieved from the API
it will not retry as this indicates a bad request – so no need to keep sening the same
request.

There were no end-to-end tests predating this feature so I added some.

Fixes bugsnag/webpack-bugsnag-plugins#17.
bengourley added a commit to bugsnag/bugsnag-sourcemaps that referenced this issue Nov 28, 2018
This adds a bit more tolerance to network outages etc. If a 40x status code is recieved from the API
it will not retry as this indicates a bad request – so no need to keep sening the same
request.

There were no end-to-end tests predating this feature so I added some.

Fixes bugsnag/webpack-bugsnag-plugins#17.
bengourley added a commit that referenced this issue Dec 4, 2018
The two modules bumped in this update now retry upon failed requests.

Fixes #17.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scheduled Work is starting on this feature/bug
Projects
None yet
Development

No branches or pull requests

2 participants