-
Notifications
You must be signed in to change notification settings - Fork 130
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
Make shopify theme dev
more resilient to HTTP errors with the Admin API
#4606
Conversation
Thanks for your contribution! Depending on what you are working on, you may want to request a review from a Shopify team:
|
Coverage report
Test suite run success1943 tests passing in 876 suites. Report generated by 🧪jest coverage report action from 707b901 |
🚀 Thank you! This looks great. I left a quick question about the retry time |
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.
Great! I think the dev server is going to be much more resilient to random errors with this 🎉
@Shopify/app-inner-loop Could you please review this PR?(this is important to the next minor release, and it seems like the auto-merge is not working). Thank you! |
WHY are these changes introduced?
Related to #4576, #4598, and #4599
Retry requests for some HTTP errors. This PR doesn't propose to refresh the session because we're already refreshing it every 30 minutes, the Admin session token expires in 2 hours, and we're getting a fresh token when we start the session.
WHAT is this pull request doing?
This PR updates the Admin REST API client to retry requests when they encounter certain HTTP errors. The Ruby CLI was more permissive regarding execution abortion, so we're adopting this approach as a middle-term to: fail when errors really happen but also be resilient and retry in some scenarios.
How to test your changes?
shopify theme push -d
e806941bd7538a0325593da4c02663c599f18e64
in your local CLI (it will trigger an error every time we update a file)layout/theme.liquid
fileshopify theme push -d --verbose
Post-release steps
N/A
Measuring impact
How do we know this change was effective? Please choose one:
Checklist