-
Notifications
You must be signed in to change notification settings - Fork 516
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
enhance(server): retry rari fetch if ECONNREFUSED #12513
Conversation
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
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.
Nice, lgtm
Rename function and reference curl option.
Summary
Problem
When starting the local server, the rari backend isn't immediately ready yet, so the first requests may fail with HTTP 500 (
ECONNREFUSED
).This also happens when restarting rumba (e.g. using
entr
) while runningyarn start:rari-external
.Noticed here: https://github.com/mdn/content/actions/runs/12952244081/job/36129406021#step:7:35
Solution
Improve the user experience with a retry mechanism using exponential backoff in case of
ECONNREFUSED
errors.How did you test this change?
yarn start:rari-external
in yari.cargo run serve
in rari.Before, I would get a JSON error with "fetch failed", now it waits until rari is ready.