fix: continue sponsor data fetch when one source fails#995
fix: continue sponsor data fetch when one source fails#995sethamus wants to merge 3 commits intoeslint:mainfrom
Conversation
✅ Deploy Preview for new-eslint ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for fr-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for ja-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for zh-hans-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for es-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for de-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for hi-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for pt-br-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR updates the fetch:sponsors data-fetch script to be resilient to individual upstream sponsor-source failures so that one rejected fetch doesn’t abort the entire run (addressing #949).
Changes:
- Wrapes Open Collective, GitHub Sponsors, and thanks.dev fetches with per-promise
.catch()handlers duringPromise.all(). - Logs per-source fetch failures and falls back to empty sponsor/donation data for the failing source.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
nzakas
left a comment
There was a problem hiding this comment.
Thanks for looking at this. I also agree that we should retain existing data.
In addition, we should still ideally have the CI job marked as failed after writing the file. Otherwise, we could silently be missing data for months and not know until someone logs at the logs.
|
I believe I’ve addressed all the feedback here. |
Prerequisites checklist
AI acknowledgment
What is the purpose of this pull request?
This PR fixes the sponsor data fetch flow so a failure from one upstream source does not cause the entire
fetch:sponsorsscript to fail.What changes did you make? (Give an overview)
Updated
tools/fetch-sponsors.jsso the Open Collective, GitHub Sponsors, and thanks.dev fetches each handle their own failure during thePromise.all()call. If one source rejects, the script now logs the error and falls back to empty data for that source, allowing the rest of the sponsor data to still be written.Related Issues
Fixes #949
Is there anything you'd like reviewers to focus on?