Skip to content

ci: retry the Trunk download - #3563

Merged
Mavrick-F merged 2 commits into
opengeos:mainfrom
Mavrick-F:fix/ci-download-retry
Dec 1, 2026
Merged

Mavrick-F merged 2 commits into
opengeos:mainfrom
Mavrick-F:fix/ci-download-retry

Conversation

@Mavrick-F

@Mavrick-F Mavrick-F commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

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-errors is needed because --retry alone 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

  • Chores
    • Automated build and deployment workflows now retry downloads up to five times, including when errors occur. Existing download verification remains in place.

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Trunk downloads now retry up to five times, including on errors, in four GitHub Actions workflows and the Dockerfile. Existing checksum verification remains unchanged.

Changes: Trunk download retries

Layer / File(s) Summary
Configure Trunk download retries
.github/workflows/ci.yml, .github/workflows/docs-preview.yml, .github/workflows/release.yml, .github/workflows/web-deploy.yml, Dockerfile
Each workflow and the Dockerfile configures up to five retries for the Trunk download, including on errors.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Suggested reviewers: giswqs

Merge Risk: Minimal · up to 725da

This change makes Trunk downloads in CI, release, deploy and Docker builds retry on transient GitHub failures. It does not change runtime behavior, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "ci: retry the Trunk download" matches the main change. The PR adds retries to the Trunk download in the four workflows and the Dockerfile. The title is short, specific, and uses a conventio…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description covers the Summary section with the problem (Trunk download fails intermittently with curl error 618), the fix (retries up to five times with --retry-all-errors across four workflows a…
Full details: Title check

Explanation

The title "ci: retry the Trunk download" matches the main change. The PR adds retries to the Trunk download in the four workflows and the Dockerfile. The title is short, specific, and uses a conventional commit prefix. It does not list every workflow, which is acceptable.

Full details: Description check

Explanation

The description covers the Summary section with the problem (Trunk download fails intermittently with curl error 618), the fix (retries up to five times with --retry-all-errors across four workflows and the Dockerfile), and that checksum verification remains. The Testing section describes a local-server test and a Dockerfile base-image check. The UI evidence section correctly states 'No visible UI change.' The Related issue section says 'None.' All template sections are present and filled in. Minor gap: the Testing section does not name a repo command such as 'cargo xtask ci', but the template only gives this as an example.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit watched the downloads start,
Five retries hopped into the cart.
The checksums stayed in place,
Trunk reached the build with grace.
The rabbit nibbled, pleased and bright.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: db3667c2-7e33-4bd3-8fc5-4ba590c12c43
Commits

Reviewing files that changed from the base of the PR and between 22da587 and 725da56.

Files selected for processing: 1

  • Dockerfile

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Comment thread .github/workflows/ci.yml
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left for the release quality pass: the failures seen so far were all immediate 618 responses, not stalls.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Code review

The PR adds --retry 5 --retry-all-errors to the Trunk download in four workflows: ci.yml, docs-preview.yml, release.yml and web-deploy.yml. The checksum check is unchanged, and -o overwrites the file on each attempt, so a failed attempt cannot leave a partial archive that passes. I checked all four copies and they match. The change is correct for the stated 618 failure.

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 tar step.

Performance: None found.

Quality:

  • ci.yml:100 (inline comment posted): nothing bounds a stalled connection, so the retries never run and the job waits for the runner's own timeout. nightly.yml:97 already sets --connect-timeout and --max-time on its downloads. Suggested --connect-timeout 30. Confidence: medium.
  • Twin the change missed: Dockerfile:34 downloads the same Trunk tarball with plain curl -sSfL, no retry, and it is not in the PR's four workflows. It is a container build rather than CI, so it may not need this change. Confidence: medium that it is in scope.
  • Side effect, not a defect: --retry-all-errors also retries permanent errors such as a 404 from a mistyped version. A bad pin now fails after about 30 seconds of retries rather than at once. Acceptable.

AGENTS.md: No rule broken. The change touches CI only, so the rules on unwrap, the cancel lists, wasm, the i18n catalogues and the command surface do not apply. The Dockerfile twin is the one thing to confirm.

Checked: Each of the four workflows against the others, the nightly.yml precedent, and the Dockerfile twin. Prior review threads: none on this PR, so no earlier concerns were left alone.

Change size

Compared with main (merge base 564d60d to PR head 22da587).

Measure Value
Files changed 4 (0 added, 4 modified, 0 removed, 0 renamed)
Size before 56.2 KB
Size after 56.3 KB
Total size change +116 B
Path Before After Change
.github/workflows/ci.yml 28.7 KB 28.9 KB +29 B
.github/workflows/release.yml 16.1 KB 16.2 KB +29 B
.github/workflows/web-deploy.yml 7.1 KB 7.1 KB +29 B
.github/workflows/docs-preview.yml 4.3 KB 4.3 KB +29 B

@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-3563/
Web app https://preview.rustgis.app/pr-3563/app/
Commit 725da56

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 preview label (once per commit).

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Code review

Reviewed the 5 changed workflow/Dockerfile lines. Each adds --retry 5 --retry-all-errors to the Trunk curl download, and the SHA-256 check that follows is unchanged.

Bugs

None found. --retry-all-errors is needed for the HTTP 618 case the PR describes, since plain --retry only covers transient errors such as 408, 429, 5xx and timeouts. The checksum still runs after the download, so a retried or corrupted file still fails. Confidence: high. I could not test against the live server (no network access here).

Security

None found. The download URL and the pinned SHA-256 values are unchanged.

Performance

None found. The worst case is about 31 s of backoff per download, and only when the download keeps failing.

Quality

  • Already raised, left alone (1 concern): the existing thread on .github/workflows/ci.yml:100 asks for --connect-timeout because a stalled connection would hold the job and skip the retries. The PR author replied that it is left for the release quality pass. The code has not changed since, so I did not post it again.
  • Not raised as a new comment: nightly.yml:97 uses different retry flags (--retry 3 --retry-max-time 600 --connect-timeout 30 --max-time 300). The five new sites do not match it. This is a consistency point, so it can wait for the release quality pass. Confidence: medium.

AGENTS.md

None 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 (nightly.yml downloads other files, not Trunk). The ci.yml comment at line 97 still says "checksum-verified", which remains true.

No inline comments were posted, since there are no new findings to attach to a line.

Change size

Compared: the whole PR against main (merge base 564d60d to PR head 725da56).

Measure Value
Files changed 5 (0 added, 5 modified, 0 removed, 0 renamed)
Size before 60.0 KB (61,420 B)
Size after 60.1 KB (61,565 B)
Total size change +145 B
Path Before After Change
.github/workflows/ci.yml 28.7 KB 28.7 KB +29 B
.github/workflows/release.yml 16.1 KB 16.1 KB +29 B
.github/workflows/web-deploy.yml 7.1 KB 7.1 KB +29 B
.github/workflows/docs-preview.yml 4.3 KB 4.3 KB +29 B
Dockerfile 3.8 KB 3.8 KB +29 B

@Mavrick-F
Mavrick-F added this pull request to the merge queue Dec 1, 2026
Merged via the queue into opengeos:main with commit 252535d Dec 1, 2026
25 checks passed
@Mavrick-F
Mavrick-F deleted the fix/ci-download-retry branch December 1, 2026 22:17
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.

1 participant