Repository navigation
ci: a cargo tool that GitHub's release host does not serve is built from crates.io (#1585) - #1586
Merged
Merged
Conversation
…rom crates.io (#1585) taiki-e/install-action retries a download for about a minute and its own fallback fetches from the same host, so a long 504 from that host failed cargo-nextest on macos-26 with nothing tested. install-cargo-tool tries the action and, if it fails, runs cargo install --locked at the same pinned version. ci.yml's cargo-nextest, cargo-semver-checks, cargo-public-api, cargo-deny and cargo-audit steps use it.
…llback runs (#1585); reverted in the next commit
…1585) The forced-failure run found it: a cargo-nextest in ~/.cargo/bin that install-action put there on an earlier run, and rust-cache restored, made cargo install refuse (binary already exists in destination).
3 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 9, 2026
…n a release-host outage, and the installs it does not cover (#1585) (#1588) ## Summary `docs/maintaining.md` gets a section on the cargo tools CI installs: `.github/actions/install-cargo-tool` (merged in #1586), what it does when GitHub's release host does not serve a tool's binary, how to add a tool, and the installs it does not cover (shellcheck, `scheduled-checks.yml`, `fuzz.yml`, `release-binaries.yml`, the `wasm-tools` action), where a long outage fails the job and the job is rerun with `gh run rerun --failed`. ## Testing Documentation only; `tools/ci/api-doc-ids.py` passes. ## Audit-honesty checklist - [x] The text states only what #1586 does and measured (run 42582521323), and names what it leaves as it was. - [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
ci.ymlinstallscargo-nextest,cargo-semver-checks,cargo-public-api,cargo-denyandcargo-auditthrough a new composite action,.github/actions/install-cargo-tool. It runstaiki-e/install-actionand, if that step fails, builds the same pinned version from crates.io withcargo 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 thenInstall cargo-nextestinfull / build + real files / macos-26 / stable:taiki-e/install-actionretried 11 times from 07:47:08Z to 07:48:04Z, got 504 each time, and failed the job (run 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): inputscrateandversion. Step one runstaiki-e/install-action(pinned asci.ymlpinned it, v2.90.2) withcontinue-on-error. Step two runs only if step one failed: it prints a warning naming CI: cargo tools fail the job when GitHub's release host returns 504 (cargo-nextest on macOS, run 42581131725) #1585 and runscargo install --locked --force "$CRATE" --version "$VERSION".--forcebecause a binary may already be in~/.cargo/binwithout cargo's record of it (Swatinem/rust-cacherestores one thatinstall-actionput there on an earlier run), whichcargo installrefuses to overwrite. The inputs reach the script throughenv, not through the expression..github/workflows/ci.yml:cargo-nextestin the test matrix, the i686 job and the corpus job,cargo-semver-checksandcargo-public-api(two steps now, one per tool),cargo-denyandcargo-audituse it, at the versions they had.env config lintits own actionlint fallback), thewasm-toolsaction, andscheduled-checks.yml,fuzz.ymlandrelease-binaries.yml, which still useinstall-actionalone.Testing
Unit tests: N/A. The check is a CI run with the download forced to fail.
python3 -c 'import yaml; yaml.safe_load(...)'onci.ymland the action; actionlint with the repository's config on every workflow exits 0;tools/ci/check-workflows.pypasses (74 uses of this repository's own actions, each input declared); zizmor reports only the pre-existingdependabot-cooldownwarnings.install-actionfor version0.9.1469instead of0.9.146, which does not exist; reverted in the last commit, so this pull request changesci.ymland the action alone). The first forced run (42582243207) found a defect: the i686 and corpus jobs failed onerror: binary 'cargo-nextest' already exists in destination, the restored binary above, and--forcefixed it. The second (42582521323, head 3507a58) passedfull / CI passedwith every cargo tool built from crates.io afterinstall-actionfailed:cargo-nexteston ubuntu, windows and macos-26 and in the i686 and corpus jobs,cargo-deny,cargo-audit, andcargo-semver-checksandcargo-public-api. The job log ofcargo denyshowsinstall-action'scargo-binstallfatal error, then the warningGitHub'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 checks6m56s against 2m33s andmacos-2612m25s against 6m26s on feat(ifc): Revit 2017 to 2023 steel beams are drawn as their type's I section (#1190) (RE-365) #1518's head; the build runs only when the download fails.full / CI passedon its final head.Audit-honesty checklist
ci.ymlpins,--lockedto 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.Legal and contribution hygiene
Breaking changes
None.