Skip to content

docs(ci-testing): on-demand image tag race + explicit version bake#46

Merged
CybotTM merged 2 commits into
mainfrom
feat/retro-on-demand-image-provenance
Jul 16, 2026
Merged

docs(ci-testing): on-demand image tag race + explicit version bake#46
CybotTM merged 2 commits into
mainfrom
feat/retro-on-demand-image-provenance

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

Add "Pattern 6" to ci-testing.md: publishing an on-demand variant image (:profiling-<sha>) that carries its own build provenance has two traps — a multi-trigger tag race, and no version in a .git-less build.

Came from

/retro session on 2026-07-16 (timetracker release/deploy work).

  • Symptom: /ui/admin/status showed Branch/Tag: main and Version: 1.0.0+no-version-set for a tagged release.
  • Cause: (A) :profiling-<sha> was built by both the main push and the tag push; last-writer-wins clobbered the baked git-ref. (B) Composer\InstalledVersions::getPrettyVersion(root) has no version in a .git-less Docker build.
  • Required behavior: Build the on-demand variant on tags/workflow_dispatch only; bake the version via a build arg (COMPOSER_ROOT_VERSION) or a baked git-ref env (APP_BUILD_REF).

Change

  • references/ci-testing.md: new "Pattern 6: On-demand image tags — build on ONE trigger, and bake the version explicitly".

Test plan

A /retro session (2026-07-16) found a :profiling-<sha> image built on both
main-push and tag-push; last-writer-wins made the baked git-ref nondeterministic
(a release read ref=main). Separately, InstalledVersions::getPrettyVersion in a
.git-less Docker build returned 1.0.0+no-version-set. Add Pattern 6: build the
on-demand variant on tags/dispatch only, and bake the version explicitly
(COMPOSER_ROOT_VERSION or a baked APP_BUILD_REF).

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new documentation section, 'Pattern 6,' to the CI testing guide, which outlines best practices for handling on-demand image tags and versioning in Docker builds to avoid common pitfalls like tag races and missing version metadata. The reviewer suggested adding a concrete Dockerfile example to the documentation to better illustrate the proposed solution for baking version information into images.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread skills/docker-development/references/ci-testing.md Outdated
Gemini review on #46: make Trap B's baked-env solution concrete with the
Dockerfile ARG/ENV lines instead of describing it abstractly.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@sonarqubecloud

Copy link
Copy Markdown

@CybotTM
CybotTM merged commit 6952215 into main Jul 16, 2026
17 checks passed
@CybotTM
CybotTM deleted the feat/retro-on-demand-image-provenance branch July 16, 2026 20:29
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