Repository navigation
ci: the actionlint download falls back to the Go module proxy when GitHub's release host fails (#1574) - #1577
Merged
Merged
Conversation
…tHub's release host fails (#1574) The env config lint job fetched actionlint with one curl retry loop that gives up after about 30 s. On 2026-11-09 GitHub's release host answered HTTP 504 for over 20 minutes, and the job failed before it linted anything. A download that fails is now replaced by the same pinned version built from the Go module proxy, whose zip the Go checksum database vouches for. A tarball that downloads with the wrong sha256 still fails the job.
…ck, reverted next (#1574)
DrunkOnJava
marked this pull request as ready for review
November 9, 2026 06:23
3 tasks done
Merged
4 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 9, 2026
…rom crates.io (#1585) (#1586) ## Summary `ci.yml` installs `cargo-nextest`, `cargo-semver-checks`, `cargo-public-api`, `cargo-deny` and `cargo-audit` through a new composite action, `.github/actions/install-cargo-tool`. It runs `taiki-e/install-action` and, if that step fails, builds the same pinned version from crates.io with `cargo install --locked --force`, so a long 504 from GitHub's release host cannot fail the job (#1585). A version that does not exist, or a crate that does not build, still fails it. Closes #1585. ## Motivation On 2026-11-09 GitHub's release host (`release-assets.githubusercontent.com`) answered HTTP 504 for hours. It failed the sccache download on Windows five times in a row (#1572, #1573), then the actionlint download (#1574, #1577), and then `Install cargo-nextest` in `full / build + real files / macos-26 / stable`: `taiki-e/install-action` retried 11 times from 07:47:08Z to 07:48:04Z, got 504 each time, and failed the job ([run 42581131725](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42581131725) on #1581's head 5b06054, and again on its next head). Nothing was tested, so the red said nothing about the change. The action's own fallback, `cargo-binstall`, fetches from the same host, so it fails together with the download. crates.io's download host is a different one. ## Changes - `.github/actions/install-cargo-tool/action.yml` (new): inputs `crate` and `version`. Step one runs `taiki-e/install-action` (pinned as `ci.yml` pinned it, v2.90.2) with `continue-on-error`. Step two runs only if step one failed: it prints a warning naming #1585 and runs `cargo install --locked --force "$CRATE" --version "$VERSION"`. `--force` because a binary may already be in `~/.cargo/bin` without cargo's record of it (`Swatinem/rust-cache` restores one that `install-action` put there on an earlier run), which `cargo install` refuses to overwrite. The inputs reach the script through `env`, not through the expression. - `.github/workflows/ci.yml`: `cargo-nextest` in the test matrix, the i686 job and the corpus job, `cargo-semver-checks` and `cargo-public-api` (two steps now, one per tool), `cargo-deny` and `cargo-audit` use it, at the versions they had. - Not changed: shellcheck (not a cargo tool, and #1577 gave `env config lint` its own actionlint fallback), the `wasm-tools` action, and `scheduled-checks.yml`, `fuzz.yml` and `release-binaries.yml`, which still use `install-action` alone. ## Testing Unit tests: N/A. The check is a CI run with the download forced to fail. - `python3 -c 'import yaml; yaml.safe_load(...)'` on `ci.yml` and the action; actionlint with the repository's config on every workflow exits 0; `tools/ci/check-workflows.py` passes (74 uses of this repository's own actions, each input declared); zizmor reports only the pre-existing `dependabot-cooldown` warnings. - **On a runner, with the download forced to fail** by a temporary commit (892db01, the action asked `install-action` for version `0.9.1469` instead of `0.9.146`, which does not exist; reverted in the last commit, so this pull request changes `ci.yml` and the action alone). The first forced run ([42582243207](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42582243207)) found a defect: the i686 and corpus jobs failed on `error: binary 'cargo-nextest' already exists in destination`, the restored binary above, and `--force` fixed it. The second ([42582521323](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42582521323), head 3507a58) passed `full / CI passed` with every cargo tool built from crates.io after `install-action` failed: `cargo-nextest` on ubuntu, windows and macos-26 and in the i686 and corpus jobs, `cargo-deny`, `cargo-audit`, and `cargo-semver-checks` and `cargo-public-api`. The job log of `cargo deny` shows `install-action`'s `cargo-binstall` fatal error, then the warning `GitHub's release host did not serve cargo-deny 0.20.2 (#1585); building it from crates.io`, then the job passing. The jobs took longer by the build: `semver checks` 6m56s against 2m33s and `macos-26` 12m25s against 6m26s on #1518's head; the build runs only when the download fails. - **The normal path** (the download works, nothing is built) is this pull request's own `full / CI passed` on its final head. ## Audit-honesty checklist - [x] A wrong version, or a crate that does not build, still fails the job: the second step's exit status is the action's. - [x] The fallback builds the version `ci.yml` pins, `--locked` to the lockfile its authors released; the binary is not checked against a hash of its own, which a source build cannot offer. The download's own checksum check stays on the normal path. - [x] No emojis, private paths or PII. ## Legal and contribution hygiene - [x] Apache-2.0. No Autodesk source, internals or NDA material. ## Breaking changes None.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
env config lintjob installs actionlint with onecurl --retry 5 --retry-all-errorsfrom GitHub's release host. When that download fails, the job now builds the same pinned version from the Go module proxy instead of failing before it lints anything (#1574). A tarball that downloads with the wrong sha256 still fails the job.Closes #1574.
Motivation
On 2026-11-09 GitHub's release host answered HTTP 504 intermittently for over 20 minutes, longer than curl's default backoff lasts (about 30 s).
env config lintfailed on #1573's head a8da7f1 withcurl: (22) The requested URL returned error: 504(run 42570119660), and nothing was linted, so the red said nothing about the workflows. The same outage failed the sccache download inbuild + real files / windows-2025-vs2026five times in a row onmainat cdb503b (#1572, fixed in #1573), and held the v0.16.1 release for about an hour.Changes
.github/workflows/ci.yml, stepInstall actionlint(jobenv-config):curlruns as the condition of anif. When it succeeds, the sha256 check and the extraction run as before, and a wrong hash still exits the step.go install github.com/rhysd/actionlint/cmd/actionlint@v${ACTIONLINT_VERSION}withGOBINset to the same directory,GOPROXY=https://proxy.golang.organdGOSUMDB=sum.golang.org. The module zip is checked against the Go checksum database. The built binary is not pinned by a hash of its own, since a source build is not reproducible byte for byte across Go versions.GITHUB_PATHin both cases.Install shellcheckstep in the same job, which usestaiki-e/install-actionand went through during the outage.Testing
python3 -c 'import yaml; yaml.safe_load(...)'onci.yml; Homebrew's actionlint onci.ymlexits 0.GOPATH,GOCACHEandGOBINin a scratch directory): it built actionlint, andactionlint -versionprintedv1.7.12andinstalled by building from source. The binary and Homebrew's lint all of.github/workflows/*.ymlwith the same output (none, exit 0).ci.ymlalone): run 42572335974,fast / env config lint. curl tried six times and got 404, the step printed the warning naming ci: the actionlint download gives up after about 30 s, so an outage of GitHub's release host fails env config lint #1574, andgo installdownloaded actionlint v1.7.12 and its dependencies from the module proxy (the runner's Go is older than the 1.25.0 that version requires, so Go fetched go1.26.10 from the proxy first).actionlint -versionthen printedv1.7.12,installed by building from sourceandbuilt with go1.26.10 compiler for linux/amd64, theactionlint on every workflowstep ran, and the job passed. In the same job theInstall shellcheckdownload (a different step, unchanged) got HTTP 504 six times from 06:19:58Z to 06:20:29Z before it was served, so the outage was still on.Unit tests: N/A.
Audit-honesty checklist
Legal and contribution hygiene
Breaking changes
None.