Skip to content

fix(status): show the release version on the admin status page#645

Merged
CybotTM merged 1 commit into
mainfrom
fix/status-version-from-tag
Jul 16, 2026
Merged

fix(status): show the release version on the admin status page#645
CybotTM merged 1 commit into
mainfrom
fix/status-version-from-tag

Conversation

@CybotTM

@CybotTM CybotTM commented Jul 16, 2026

Copy link
Copy Markdown
Member

/ui/admin/status showed Version: 1.0.0+no-version-set and Branch/Tag: main for a deployed release, so the running version wasn't legible. Two coupled causes:

  1. Version field reads Composer's root version, which is 1.0.0+no-version-set in the Docker build (no COMPOSER_ROOT_VERSION, no .git).
  2. Ref showed main because the profiling image :profiling-<sha> was built by both the main-push and the tag run — same tag, last writer wins, and main-push won.

Changes

  • Profiling image builds only on a tag push or manual dispatch (was: every non-PR event). This removes the race, so a deployed release's :profiling-<sha> always carries its release tag in APP_BUILD_REF.
  • The Version field prefers that baked APP_BUILD_REF (a version tag → stripped of the leading v) and falls back to Composer's root version otherwise.

Verification

GetStatusActionTest::testVersionPrefersTheBuildRefTag — with APP_BUILD_REF=v9.9.9, app.version is 9.9.9 and build.ref is v9.9.9. Full unit suite + PHPStan L10 + cs-fixer green locally.

Note: the Update-Prüfung fehlgeschlagen line is separate — the client-side check reaches api.github.com from the admin's browser, which the NR network appears to block/rate-limit (the endpoint returns 200 from outside). Not addressed here.

Deploy note

After this lands, :profiling-<sha> is produced by the tag build only; the hot-deploy runbook (deploy :profiling-<main-HEAD-sha>, which equals the tag's commit) is unchanged.

Two coupled changes so /ui/admin/status reports the deployed release instead
of "1.0.0+no-version-set" / branch "main":

- The profiling image (the prod hot-deploy target) is now built only on a tag
  push or manual dispatch, not on every main-push. Both runs pushed the same
  :profiling-<sha> tag, so a main-push build could stamp ref=main over the
  release tag's build (last-writer-wins). Tag/dispatch-only makes the deployed
  image's APP_BUILD_REF deterministically the release tag.
- The Application version field now prefers that baked APP_BUILD_REF (a version
  tag, e.g. v6.3.4 -> 6.3.4) over Composer's root version, which reads
  1.0.0+no-version-set in a CI build with no tag/VCS context.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Copilot AI review requested due to automatic review settings July 16, 2026 11:53
@sonarqubecloud

Copy link
Copy Markdown

@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 refactors the version retrieval logic in GetStatusAction. It extracts the environment reading logic into a private helper method buildEnv and introduces a new appVersion method to parse the release version from the APP_BUILD_REF environment variable (stripping the leading 'v' if present), falling back to Composer's root version. Additionally, a new test testVersionPrefersTheBuildRefTag has been added to verify this behavior. There are no review comments, so I have no feedback to provide.

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.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CybotTM
CybotTM merged commit 8bee888 into main Jul 16, 2026
17 of 18 checks passed
@CybotTM
CybotTM deleted the fix/status-version-from-tag branch July 16, 2026 12:05
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.

2 participants