Skip to content

fix(ci): wait for pushed images reliably, fixes #8609 - #8712

Merged
rfay merged 2 commits into
mainfrom
20260817_rfay_tests_must_wait
Aug 19, 2026
Merged

rfay merged 2 commits into
mainfrom
20260817_rfay_tests_must_wait

Conversation

@rfay

@rfay rfay commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Short Summary (TL;DR)

Several CI workflows (quickstart, perf-start-time, perf-linux, the Windows installer pipeline) never got the wait-for-images.sh step added by #8707, so they can race image-push.yml's async push.

The Issue

Multiple checks on #8705 failed after #8707 merged to main:

  • quickstart.yml and perf-start-time.yml (and perf-linux.yml, the Windows installer pipeline) build/start DDEV without waiting for image-push.yml's async push, so they raced a content-tagged image that hadn't landed on Docker Hub yet (ddev-dbserver-mariadb-11.8:... not found).
  • Increased the possible wait time.

How This PR Solves The Issue

  • Added missing Wait for pushed images step
  • Doubled wait-for-images.sh's default budget from 20 to 40 minutes, and bumped quickstart.yml's job timeout-minutes from 90 to 150 so the longer wait doesn't crowd out the quickstart-test suite that follows it.

This PR does not exercise the real failure mode it fixes. None of the paths this PR touches are inputs to any image's content hash, so every image in this PR's own CI run hits the fast path (tag already exists, no wait, no cross-platform hash comparison). Passing CI here confirms the containerized hashing reproduces today's committed tags and that the added wait steps don't break anything - it does not confirm the Windows hash-divergence bug is actually fixed, or that 40 minutes is enough headroom. That only gets a real test the next time a PR changes containers/ddev-dbserver (or another hashed image directory) and pushes through ddev-windows-mutagen and the GitHub image-consuming workflows for real - please watch the next such PR/push to main to confirm before considering this closed.

Manual Testing Instructions

  • The real test: watch the next PR/push that actually changes containers/ddev-dbserver (or webserver/traefik/ssh-agent/xhgui) all the way through ddev-windows-mutagen on Buildkite and the GitHub image-consuming workflows, and confirm no image-not-found or false-timeout failures.

@github-actions

github-actions Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

rfay and others added 2 commits August 18, 2026 14:34
 #8609

## Short Summary (TL;DR)

quickstart.yml, perf-start-time.yml, perf-linux.yml, and the Windows
installer test each build or start ddev without waiting for image-push.yml's
async push, so they can race a content-tagged image that hasn't landed on
Docker Hub yet. Add the same containers/wait-for-images.sh step that
test-reusable.yml, test-wsl2-reusable.yml, and the Buildkite test.sh/perf.sh
legs already use.

## The Issue

- Fixes #8609

#8707 added content-hash image tags built and pushed asynchronously by
image-push.yml, and added a wait-for-images.sh step to test-reusable.yml and
wsl2-test.sh to avoid racing that push. It missed quickstart.yml,
perf-start-time.yml, perf-linux.yml, and the Windows installer pipeline.
PR #8705's perf-start-time run failed with `ddev-dbserver-mariadb-11.8:...:
not found`, and two quickstart runs on PRs rebased past the same commit
failed identically inside `ddev start` for `dummy-project` (output
swallowed by `>/dev/null 2>&1`, so it just looked like a bare `Error 1`).

## How This PR Solves The Issue

Adds a `Wait for pushed images` step (`containers/wait-for-images.sh`) to
quickstart.yml, perf-start-time.yml, and perf-linux.yml, and the equivalent
inline call to installer-test.sh, all placed the same way as the existing
callers: after public-variables/DOCKER_ORG is available, before anything
that pulls or builds a DDEV image. Audited every other GitHub Actions
workflow and Buildkite pipeline: the rest either route through
test-reusable.yml/test-wsl2-reusable.yml/test.sh/perf.sh (already covered)
or never pull a pre-built image tag (cross-compile jobs, the image-build/push
jobs themselves, docs/lint jobs).

## Manual Testing Instructions

- `actionlint .github/workflows/quickstart.yml .github/workflows/perf-start-time.yml .github/workflows/perf-linux.yml` - no new findings (one pre-existing shellcheck warning in quickstart.yml predates this change).
- `bash -n .buildkite/installer-test.sh` - syntax OK.
- Re-run the quickstart and perf-start-time workflows on a PR rebased past an image-only commit; both should now block on wait-for-images.sh instead of failing with an image-not-found error.

## Automated Testing Overview

No new tests - this only reorders CI steps to reuse the existing,
already-tested containers/wait-for-images.sh script.

## Release/Deployment Notes

CI-only change. Adds up to ~20 minutes of wait time (only when a relevant
image actually changed and hasn't finished pushing yet; fast path is a
single registry check per image otherwise).
PR #8705's apache-fpm/docker-rootless/nginx-fpm/no-bind-mounts/podman-rootless/
race-detection checks all failed waiting for ddev-dbserver-mysql-9.7:71f82087a2
and gave up at the 20-minute default. The actual push completed 2 minutes
later at 05:22:38, and the approval itself was prompt (~1 minute after the
build finished) - the time was consumed by image-build-push.yml's own build
fan-out (~17 minutes) plus the push of a large image (~2.5 minutes). A
20-minute budget left effectively no margin for the normal case, let alone a
slower approval.

Bumped WAIT_FOR_IMAGES_ATTEMPTS' default from 40 to 80 (still 30s apart), and
quickstart.yml's job timeout-minutes from 90 to 150 to give the now-longer
wait step room without crowding out the quickstart-test suite that follows it
(that suite alone can already run 60-90 minutes).

Confirmed wait_for_images_test.sh sets WAIT_FOR_IMAGES_ATTEMPTS/_SLEEP
explicitly in every case, so the new default doesn't slow down the test
suite. make staticrequired is clean.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@rfay
rfay force-pushed the 20260817_rfay_tests_must_wait branch from c5ae69d to 09cb7a6 Compare August 18, 2026 20:35
@rfay
rfay marked this pull request as ready for review August 18, 2026 20:38
@rfay
rfay requested a review from a team as a code owner August 18, 2026 20:38
@rfay
rfay requested a review from stasadev August 18, 2026 20:38

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

@rfay
rfay merged commit 76b8bf5 into main Aug 19, 2026
69 of 72 checks passed
@rfay
rfay deleted the 20260817_rfay_tests_must_wait branch August 19, 2026 03:57
rfay added a commit to ddev-test/ddev that referenced this pull request Aug 24, 2026
* fix(ci): wait for pushed images reliably, fixes ddev#8609 (ddev#8712)

Co-authored-by: Claude Sonnet 5 <[email protected]>

* test(mutagen): Minor test cleaup (ddev#8719)

* fix(images): gate fork image builds on approval earlier, skip it for authorized authors [skip ci]

Moves the maintainer approval for a fork PR's image build/push from after the build finishes to right after detect knows a build is needed, and skips it entirely when the PR author already has push access to the repo.

Follow-up to ddev#8707. Two rough edges in the fork-PR image build/push flow:

1. The approval gate lived in image-push.yml, triggered via workflow_run only after the entire (often multi-minute, multi-arch) fork build finished. A maintainer had no visibility into the pending approval until well after it was actually knowable.
2. A maintainer's own fork PR (author_association OWNER/MEMBER/COLLABORATOR) still had to wait on the same approval as an unknown external contributor, even though they already have push access.

- image-build-push.yml's detect job gains an `is_authorized` output (from `github.event.pull_request.author_association`) alongside the existing `is_fork`.
- A new `approve` job runs right after detect, gated on the `image-push` environment, only when the PR is from a fork and the author is not authorized. The `build` job now depends on it.
- image-push.yml no longer has its own approval gate — by the time an artifact exists to push, image-build-push.yml's `approve` job already required sign-off.
- Updated the workflow header comments and the two docs pages (building-contributing.md, release-management.md) that described the old flow.
- Added a bullet to CLAUDE.md's Comments section: write comments as a plain description of the current design, not framed relative to what changed.

- `actionlint .github/workflows/image-build-push.yml .github/workflows/image-push.yml` passes clean.
- Open a PR from an external fork that touches `containers/**`: confirm the `image-push` environment approval request appears as soon as the "Image build" workflow's `detect` job completes, not after `build` finishes.
- Open a PR from a maintainer's own fork: confirm no approval is requested and the image still builds and pushes via the existing fork-safe split.
- Open a same-repo PR or push to main: confirm behavior is unchanged (no gate, direct build-and-push).

No new automated tests — this is GitHub Actions workflow orchestration, validated with actionlint and manual PR runs as described above.

No user-facing behavior change. Affects only the internal container image build/push CI flow for ddev/ddev.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

* Emit some info about auth choice [skip ci]

* don't skip the push when authorized [skip ci]

* first try pr as rfay

* build(ci): Try it again, but this time rebased

* try it again

---------

Co-authored-by: Randy Fay <[email protected]>
Co-authored-by: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Smoother Docker image build/push/consume workflow using content-addressed tags

2 participants