Skip to content

Retry the copa and oras release downloads - #271

Closed
berfinyuksel wants to merge 1 commit into
5.xfrom
fix/retry-tool-downloads
Closed

berfinyuksel wants to merge 1 commit into
5.xfrom
fix/retry-tool-downloads

Conversation

@berfinyuksel

Copy link
Copy Markdown
Contributor

Follow-up to #269 and #270: the next flaky network call in the release run.

Problem

In the scheduled release run on 2026-11-25, three of the 16 build jobs failed in "Install Copa". A plain curl -fsSL of the copa release from github.com got 503 at 02:44:37, 02:44:38 and 02:46:10 UTC, while other jobs of the same run downloaded the same file fine at 02:45:02 and 02:45:49. So the errors were sporadic, and one more try would very likely have worked.

Run: https://github.com/pimcore/docker/actions/runs/45533837822 (attempt 1)

Copa is installed after the plain images are pushed, so no image was lost through this. But each of these jobs ended red, its hardened scan and gate did not run, and the run had to be re-run by hand.

Change

Run the release downloads through the existing with-retry.sh (3 attempts, 10 s then 20 s backoff):

  • copa archive and checksums in release.yml
  • oras archive and checksums in install-oras.sh (same kind of download from github.com, used by the build jobs and by process-tags)

The checksum verification is unchanged. A download that still fails after the retries fails the step exactly as before.

Verification

  • .github/scripts/tests/run.sh passes locally (211 assertions). New: install-oras.sh retries a download that fails once and still verifies and installs; a download that always fails is attempted three times and fails with curl's exit code. These failed before the change.
  • Real curl through the wrapper against a local server: 503 once then 200 gives exit 0 after one retry; 503 every time gives exit 22 after three attempts.
  • The two copa lines exactly as in the workflow, run locally: download works and the checksum matches.
  • actionlint 1.7.7 passes locally.

Not covered by this PR's checks: the "Install Copa" step itself only runs in release runs.

Not in this PR

The fourth failed job of that run broke inside the image build: the imagick build could not download a tarball from github.com ("Connection died"), and that job's missing arch is why 40 php8.2 / v3.8 tags were skipped. A retry there means changing the docker build line, which #267 also changes, so that is left for a separate decision.

🤖 Generated with Claude Code

In the scheduled release on 2026-11-25 three build jobs failed in
"Install Copa": github.com answered 503 to a plain `curl -fsSL`, while
other jobs fetched the same file seconds earlier and later.

Run the copa downloads (release.yml) and the oras downloads
(install-oras.sh) through the existing with-retry.sh (3 attempts, 10s then
20s backoff). The checksum check is unchanged, and a download that still
fails after the retries fails the step as before.

Tests: install-oras.sh retries a download that fails once and still
installs; a download that always fails is attempted three times and fails.

Co-Authored-By: Claude <noreply@anthropic.com>
@berfinyuksel berfinyuksel added the Skip Milestone Check Exempts this PR from the mandatory milestone requirement label Nov 26, 2026
Copilot AI lite review requested due to automatic review settings November 26, 2026 09:46

Copilot AI left a comment

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.

🟢 Approval recommended

No active review issues are reported, and the changes include regression coverage for retry recovery, checksum verification, installation behavior, and permanent download failures.

No open issues 🎉

What changed in this PR

This pull request hardens release artifact downloads against transient GitHub failures by applying the existing retry wrapper to Copa and ORAS downloads while preserving checksum verification and failure behavior.

Changes:

  • Wraps Copa archive and checksum downloads in release.yml with with-retry.sh.
  • Wraps ORAS archive and checksum downloads in install-oras.sh using a script-relative helper path.
  • Adds test stubs and regression coverage for transient and permanent download failures.
File Description
.github/​workflows/​release.yml Retries Copa release archive and checksum downloads.
.github/​scripts/​tests/​stubs/​sudo Provides a test stub that records installation calls without modifying the system.
.github/​scripts/​tests/​stubs/​curl Simulates successful, transient, and permanent curl download failures.
.github/​scripts/​tests/​run.sh Tests retry recovery, checksum verification, installation behavior, and permanent download failures.
.github/​scripts/​install-oras.sh Retries ORAS archive and checksum downloads using the sibling retry helper.

Review effort: Lite

@berfinyuksel

Copy link
Copy Markdown
Contributor Author

closing this, not needed. the copa download failed in 1 of 79 scheduled runs and no image was lost, the oras download never failed. #269 and #270 cover the failures that actually happen, so no extra code for this.

@berfinyuksel
berfinyuksel deleted the fix/retry-tool-downloads branch November 26, 2026 11:08
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Skip Milestone Check Exempts this PR from the mandatory milestone requirement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants