Repository navigation
ci: retry the Trunk download - #3563
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
| set -euo pipefail | ||
| # Pinned Trunk release, checksum-verified, as web-deploy.yml installs it. | ||
| curl -sSfL -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz | ||
| curl -sSfL --retry 5 --retry-all-errors -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz |
There was a problem hiding this comment.
The retry is right for the 618 case, but nothing bounds a stalled download. Without a connect or transfer timeout, one hung connection still holds the job until the runner's own timeout, and the retries never run. nightly.yml (line 97) already bounds its downloads with --connect-timeout and --max-time. A connect timeout is a small, safe addition here; a transfer cap needs a size check first, since the tarball is not small.
| curl -sSfL --retry 5 --retry-all-errors -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz | |
| curl -sSfL --retry 5 --retry-all-errors --connect-timeout 30 -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz |
Confidence: medium. I did not check how long a stalled transfer lasts on the hosted runners.
Category: quality
There was a problem hiding this comment.
Left for the release quality pass: the failures seen so far were all immediate 618 responses, not stalls.
Code reviewThe PR adds Bugs: None found. The retry changes timing, not results. Security: None found. The SHA-256 check still runs after the download and still gates the Performance: None found. Quality:
AGENTS.md: No rule broken. The change touches CI only, so the rules on Checked: Each of the four workflows against the others, the Change sizeCompared with main (merge base 564d60d to PR head 22da587).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Code reviewReviewed the 5 changed workflow/Dockerfile lines. Each adds BugsNone found. SecurityNone found. The download URL and the pinned SHA-256 values are unchanged. PerformanceNone found. The worst case is about 31 s of backoff per download, and only when the download keeps failing. Quality
AGENTS.mdNone found. The diff touches only download commands, so the "Never hold the window", "Never silent" and "Reach every surface" rules do not apply. The Trunk download is the same in all five places; a search of the repo found no sixth copy ( No inline comments were posted, since there are no new findings to attach to a line. Change sizeCompared: the whole PR against main (merge base 564d60d to PR head 725da56).
|
Summary
CI downloads Trunk from a GitHub release without retrying, and the request sometimes fails (
curl: (22) The requested URL returned error: 618), which fails the web jobs. It now retries up to five times, about half a minute in all, in the four workflows and the Dockerfile that download it.--retry-all-errorsis needed because--retryalone doesn't retry a 618. The checksum is still verified.Testing
Against a local server that answers 618 three times and then 200, the old command fails and the new one succeeds.
In the Dockerfile's base image, the new command downloads Trunk and its checksum passes.
UI evidence
No visible UI change.
Related issue
None.
Summary by CodeRabbit