question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please consider retries for the Octokit client

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
joshmgrosscommented, Nov 2, 2021

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
2reactions
markmssdcommented, Apr 4, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

octokit/rest.js
import { retry } from "@octokit/plugin-retry"; import { throttling } from ... The simplest way to receive debug information is to set the...
Read more >
lib/gitlab/github_import/client.rb · master · GitLab.org / GitLab FOSS ...
HTTP client for interacting with the GitHub API. 6. #. 7. # This class is basically a fancy wrapped around Octokit while adding...
Read more >
octokit - npm
The Octokit client can be used to send requests to GitHub's REST API ... only retries once octokit.log.info(`Retrying after ${retryAfter} ...
Read more >
GitHub Automation with Octokit - Learn With Jason
You can do things like request retries. You can obviously keep state in terms of authentication. You can on some strategies require you...
Read more >
Octokit Alternatives - Ruby Third-party APIs | LibHunt
Do you think we are missing an alternative of Octokit or a ... Octokit.rb wraps the GitHub API in a flat API client...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found