Skip to content

fix(ci): retry mise install on transient GitHub API failures - #328

Closed
nsheaps wants to merge 1 commit into
mainfrom
fix/mise-install-retry
Closed

fix(ci): retry mise install on transient GitHub API failures#328
nsheaps wants to merge 1 commit into
mainfrom
fix/mise-install-retry

Conversation

@nsheaps

@nsheaps nsheaps commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

lint/build/test all started failing today with:

mise ERROR Failed to install aqua:anthropics/claude-code@2.1.128: builder error: relative URL without a base

Root cause

jdx/mise-action fetches whatever mise release is latest with no version pin. Between two CI runs on the same day, it picked up 2026.8.4 (previously 2026.8.3 was in use and worked). Reproduced locally with a fresh 2026.8.4 binary and MISE_VERBOSE=1:

DEBUG GET https://api.github.com/repos/anthropics/claude-code/releases?per_page=100
DEBUG GET https://api.github.com/repos/anthropics/claude-code/releases?per_page=100 403 Forbidden
WARN  Remote versions cannot be fetched for anthropics/claude-code: ...
...
Error: Failed to install aqua:anthropics/claude-code@2.1.128: builder error: relative URL without a base

When the GitHub releases-list API call for a tool fails, mise's aqua backend doesn't fall back gracefully — it crashes trying to build a download URL with nothing to build it from. 2026.8.3 didn't hit this failure mode for the same install. Unauthenticated/shared-IP calls to api.github.com from GitHub Actions runners are a known source of intermittent 403/429s, independent of which tool triggers them.

Fix

Rather than pin mise's version (which just defers the same class of problem to whenever this happens again on a future release, and we want to keep riding the latest mise), retry mise install itself — the triggering API call is exactly the kind of transient failure retries are for:

  • install: false on the jdx/mise-action step (still sets up the mise binary and PATH; only skips the auto-mise install)
  • A separate mise install step wrapped in nick-fields/retry@v3 (3 attempts, 15s backoff), applied to all three jobs in test.yaml that share this setup (lint, build, test)

Test plan

  • YAML syntax validated (yaml.safe_load)
  • CI run on this PR confirms mise install now succeeds (either on first try if the upstream API recovers, or via retry if it doesn't)

Generated by Claude Code

lint/build/test all started failing today with `mise ERROR Failed to
install aqua:anthropics/claude-code@2.1.128: builder error: relative
URL without a base`. Root-caused by reproducing locally with a fresh
mise 2026.8.4 binary and MISE_VERBOSE=1: the GitHub releases-list API
call for the tool fails, and mise's aqua backend doesn't fall back
gracefully, instead crashing while building a download URL from
nothing. mise 2026.8.3 (yesterday's version) didn't hit this failure
mode.

Rather than pin mise's version (which just defers the same class of
problem to the next upstream release, and this repo wants to keep
riding the latest mise), retry mise install itself: the underlying
GitHub API call is exactly the kind of transient failure retries are
for, and unauthenticated/shared-IP GitHub API calls from Actions
runners are known to intermittently 403/429 regardless of which tool
triggers them.

install: false on the mise-action step (still sets up the mise binary
and PATH), then a separate `mise install` wrapped in
nick-fields/retry@v3 (3 attempts, 15s backoff) across all three jobs
that share this setup.

nsheaps commented Aug 11, 2026

Copy link
Copy Markdown
Owner Author

Closing without merging. The diagnosis this PR was based on (transient api.github.com 403 during mise install) doesn't hold up: a later investigation using real CI verbose logs (see #327) found the actual aqua:anthropics/claude-code failure happened with zero network activity — a deterministic code path in mise's aqua backend building a URL with no url: field, not a transient API error. Retries wouldn't have fixed that.

main is green now via #327 (switched claude-code to the npm: backend with allow_builds, sidestepping the aqua backend entirely), with no evidence of recurring transient mise install failures for the other aqua-installed tools (jq, tilt) to justify adding retry logic speculatively.


Generated by Claude Code


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants