Skip to content

Retry image pushes on transient registry errors - #270

Merged
berfinyuksel merged 1 commit into
5.xfrom
fix/retry-image-push
Nov 23, 2026
Merged

berfinyuksel merged 1 commit into
5.xfrom
fix/retry-image-push

Conversation

@berfinyuksel

Copy link
Copy Markdown
Contributor

Follow-up to #269, same cause one step earlier.

Problem

The scheduled release run on 2026-11-23 failed in one build job (arm64, v4.2, PHP 8.4): a single layer upload to ghcr.io was answered with 500 Internal Server Error. The parallel pushes of the same image went through seconds later, so the registry was only briefly unhappy.

Run: https://github.com/pimcore/docker/actions/runs/45101019343

docker push runs once per tag with no retry. The step failed, the job never recorded its tags, and process-tags skipped all 40 v4.2 / php8.4 logical tags ("only one arch pushed this run"). They stay on the previous build until the next run.

Change

Run both docker push calls in release.yml (plain and hardened) through the existing with-retry.sh (3 attempts, 10 s then 20 s backoff), the helper the same job already uses for Trivy. A push that still fails after the retries fails the step exactly as before.

Verification

The push only runs in release runs, so this PR's checks cover the workflow lint only. Checked locally with the exact command against a temporary local registry:

  • registry up: all tags pushed, no retries, exit 0
  • registry down for the first attempt and back during the backoff: retried, all tags pushed, exit 0
  • registry down the whole time: gives up after 3 attempts, exit 123 as today

actionlint 1.7.7 and .github/scripts/tests/run.sh pass locally.

Trade-off

A push that cannot succeed now takes about 30 s longer to fail.

🤖 Generated with Claude Code

The scheduled release on 2026-11-23 lost the arm64 v4.2 build because one
layer upload to ghcr.io got a 500. `docker push` ran once, the step failed,
and process-tags skipped all 40 v4.2 / php8.4 logical tags for that run.

Run both `docker push` calls (plain and hardened) through the existing
with-retry.sh (3 attempts, 10s then 20s backoff). A push that still fails
after the retries fails the step as before.

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

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

The workflow changes apply the existing retry helper to both plain and hardened image-push paths while preserving parallelism and failure behavior, with no active review issues identified.

No open issues 🎉

What changed in this PR

Updates the release workflow to retry transient registry failures during plain and hardened image pushes using the existing retry helper.

Changes:

  • Wraps plain image pushes with with-retry.sh.
  • Wraps hardened image pushes with with-retry.sh.
  • Preserves parallelism and failure behavior after all retry attempts are exhausted.
File Description
.github/​workflows/​release.yml Adds retry handling to plain and hardened Docker image pushes.

Review effort: Lite

@berfinyuksel
berfinyuksel merged commit dcbdd5e into 5.x Nov 23, 2026
9 of 10 checks passed
@berfinyuksel
berfinyuksel deleted the fix/retry-image-push branch November 23, 2026 14:21
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 23, 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