Skip to content

Retry network errors/transient HTTP errors in GitHub API requests - #128

Merged
ww-oai merged 1 commit into
mainfrom
ww/retry
Aug 13, 2026
Merged

Retry network errors/transient HTTP errors in GitHub API requests#128
ww-oai merged 1 commit into
mainfrom
ww/retry

Conversation

@ww-oai

@ww-oai ww-oai commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

This adds @octokit/plugin-retry, which we use to retry transient HTTP and network errors when making GitHub API requests.

This should address transient errors like this one:

https://github.com/astral-sh/uv/actions/runs/31519664724/job/93874168058?pr=19979

Excerpted:

 Checking write access for actor 'woodruffw' on astral-sh/uv
  GET /repos/astral-sh/uv/collaborators/woodruffw/permission - 500 with id UNKNOWN in 226ms
  Actor 'woodruffw' is not permitted to run this action: Failed to verify permissions for 'woodruffw': other side closed
  /home/runner/work/_actions/openai/codex-action/52fe01ec70a42f454c9d2ebd47598f9fd6893d56/dist/main.js:27910
            throw new Error(message);
                  ^
  
  Error: Actor 'woodruffw' is not permitted to run this action: Failed to verify permissions for 'woodruffw': other side closed
      at _Command.<anonymous> (/home/runner/work/_actions/openai/codex-action/52fe01ec70a42f454c9d2ebd47598f9fd6893d56/dist/main.js:27910:17)

(Note that the HTTP 500 is a red herring -- Octokit synthesizes a fake HTTP 500 when it encounters an underlying network error.)

The core change here is just two lines, i.e. augmenting the Octokit instance with the plugin and then using it. I've also added tests backstopping the change.

Note: I picked @octokit/plugin-retry because it's an official part of the Octokit SDK that GitHub provides.

Signed-off-by: William Woodruff <ww@openai.com>
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@ww-oai

ww-oai commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

I have read the CLA Document and I hereby sign the CLA

@ww-oai
ww-oai merged commit c385816 into main Aug 13, 2026
2 of 3 checks passed
@ww-oai
ww-oai deleted the ww/retry branch August 13, 2026 19:12
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants