github-script
github-script copied to clipboard
Please consider retries for the Octokit client
Is your feature request related to a problem? Please describe.
I just ran into a problem where a call to the Github API unexpectedly returned a 404 error. This failed our workflow. The error was intermittent and wasn't reproducible when I re-ran the job.
Describe the solution you'd like
I'd like any API calls made by the github
client to be retried, preferably using the retry plugin
Describe alternatives you've considered
I've considered adding the retry logic to our workflow but this defeats the purpose of having a pre-authenticated API client.
This issue is stale because it has been open for 60 days with no activity. Remove the "Stale" label or comment on the issue, or it will be closed in 7 days.
This issue is stale because it has been open for 60 days with no activity. Remove the "Stale" label or comment on the issue, or it will be closed in 7 days.
This issue has been marked as stale and closed due to no activity on it.
Since not all consumers may want this behavior, we could support it behind an optional input
enable-retries:
description: Whether to use the retry plugin to retry GitHub requests
default: false
@joshmgross we're hitting rate-limiting in our GitHub action. Would definitely use retry plugin if it was available.
This issue is stale because it has been open for 60 days with no activity. Remove the "Stale" label or comment on the issue, or it will be closed in 7 days.
I'm not sure retry plugin would help for rate limiting, but similarly would be great to have an option to enable throttling plugin, as well.
Would like to see retry capability also
👍
See also #229
Until this is officially supported, we have achieved the same by using the wrap
hook, here's a great example from @gr2m: https://github.com/octokit/octokit.js/issues/1069#retry
@markmssd Thanks for this! Looks like this would solve our problem. I'd be in favor of closing this then.
👋 This is now available in v6.3.0
, thanks @luketomlinson for the implementation 🙇
See https://github.com/actions/github-script/tree/v6.3.0#retries for more information
I'll bump the v6
to point to v6.2.0
tomorrow.