-
Notifications
You must be signed in to change notification settings - Fork 73
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
Retry createBuild based on error messages #477
Conversation
CH-1139 Handle createBuild errors
Error in CLI:
Revert PR: https://github.com/chromaui/chromatic/pull/5679 Original PR: https://github.com/chromaui/chromatic/pull/5678 --- Also, use an
|
2bcf21f
to
1151b66
Compare
1151b66
to
7c63f42
Compare
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.
This LGTM but I do wonder about the previous behaviour. It did retry before (on 5xx) right? Was that automatic behaviour of the HTTPClient
?
bin-src/tasks/verify.js
Outdated
@@ -1,3 +1,4 @@ | |||
import retry from 'async-retry'; |
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.
Should this be here?
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.
It should not, good eye!
Yep! It would retry because this fetch would throw an error. Since we're throwing the error ourselves, it returns a 200 so the fetch succeeds. |
Connections to the Chromatic backend can get a 503 return error from Heroku after 30 seconds which are then retried by our HTTPClient. We want to lower our error rates to reduce noise in our monitoring by throwing errors before that occurs. Doing this returns a 200 from the fetch then we throw an error in our GraphQLClient. This allows known errors to retry again when creating a build!