Skip to content

ci: the actionlint download falls back to the Go module proxy when GitHub's release host fails (#1574) - #1577

Merged
DrunkOnJava merged 4 commits into
mainfrom
ci/1574-actionlint-go-fallback
Nov 9, 2026
Merged

DrunkOnJava merged 4 commits into
mainfrom
ci/1574-actionlint-go-fallback

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

The env config lint job installs actionlint with one curl --retry 5 --retry-all-errors from 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 lint failed on #1573's head a8da7f1 with curl: (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 in build + real files / windows-2025-vs2026 five times in a row on main at cdb503b (#1572, fixed in #1573), and held the v0.16.1 release for about an hour.

Changes

  • .github/workflows/ci.yml, step Install actionlint (job env-config):
    • The curl runs as the condition of an if. When it succeeds, the sha256 check and the extraction run as before, and a wrong hash still exits the step.
    • When it fails, the step prints a 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 and runs go install github.com/rhysd/actionlint/cmd/actionlint@v${ACTIONLINT_VERSION} with GOBIN set to the same directory, GOPROXY=https://proxy.golang.org and GOSUMDB=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.
    • The directory goes on GITHUB_PATH in both cases.
  • Not changed: the Install shellcheck step in the same job, which uses taiki-e/install-action and went through during the outage.

Testing

  • python3 -c 'import yaml; yaml.safe_load(...)' on ci.yml; Homebrew's actionlint on ci.yml exits 0.
  • The fallback command run on this Mac with an empty module cache (GOPATH, GOCACHE and GOBIN in a scratch directory): it built actionlint, and actionlint -version printed v1.7.12 and installed by building from source. The binary and Homebrew's lint all of .github/workflows/*.yml with the same output (none, exit 0).
  • On a runner, with the download forced to fail by a temporary commit (b085b55, the URL pointed at a path that does not exist; reverted in the last commit, so this pull request changes ci.yml alone): 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, and go install downloaded 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 -version then printed v1.7.12, installed by building from source and built with go1.26.10 compiler for linux/amd64, the actionlint on every workflow step ran, and the job passed. In the same job the Install shellcheck download (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.
  • The normal path (curl serves the tarball, the sha256 matches) is the job's step on this pull request's own head; a wrong hash exits the step before the extraction, as before.

Unit tests: N/A.

Audit-honesty checklist

  • A wrong checksum or a lint finding still fails the job; only a download that fails falls back.
  • The fallback's verification is the Go checksum database's check of the module zip, not a hash of the built binary; this body says so.
  • No emojis, private paths or PII.

Legal and contribution hygiene

  • Apache-2.0. No Autodesk source, internals or NDA material.

Breaking changes

None.

…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.
@DrunkOnJava
DrunkOnJava merged commit 50e22fc into main Nov 9, 2026
39 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/1574-actionlint-go-fallback branch November 9, 2026 06:55
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.
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.

ci: the actionlint download gives up after about 30 s, so an outage of GitHub's release host fails env config lint

1 participant