Skip to content

Make build sequence numbers safe to re-run, and document them - #247

Open
bootc wants to merge 2 commits into
OpenVoxProject:mainfrom
bootc:fix/sequence-tag-followup
Open

bootc wants to merge 2 commits into
OpenVoxProject:mainfrom
bootc:fix/sequence-tag-followup

Conversation

@bootc

@bootc bootc commented Nov 21, 2026

Copy link
Copy Markdown
Member

Short description

Follow-up to #244 (build-numbered tags, #167), fixing problems found in review after it merged.

Re-runs and partial failures. The build number was recomputed from the registry inside the manifest job. Every re-run or manual dispatch therefore minted a new number: the merge push and a dispatch of the same commit already produced both 8.18.0-0 and 8.18.0-1. A failure between the Ubuntu and Alpine pushes, or between ghcr.io and docker.io, left the tags out of step. "Re-run failed jobs" then skipped to the next number.

The number is now computed once, by build_sequence.sh in the setup job, before anything is pushed. Every manifest leg and both registries use it. "Re-run failed jobs" reuses it, because GitHub keeps the outputs of jobs that succeeded.

Silent fallback to -0. The step ran without pipefail, so if jq failed the number fell back to 0 and re-pointed the existing -0 tags. The script now runs under set -euo pipefail and fails if the tag list can't be read. It also matches versions with jq string operations rather than an unescaped regex. As a further check, the manifest step refuses to overwrite a -N tag that a different commit built.

Traceability. Each -N image index now carries an org.opencontainers.image.revision annotation, and the step writes the published tags to the job summary.

Tests. tests/build_sequence_test.sh covers the numbering rules: legacy tags ignored, numeric ordering, Alpine-only numbers, regex-like versions, and malformed tag lists failing rather than returning 0. It runs in the CI "Test image" step. That step is the only hook the modulesync template offers, so it runs once per matrix leg; it takes well under a second.

Docs. The README "Version schema" still described the -v<container.version> and -main tags, and the Docker Hub description is generated from it. The section now documents <openvox.version>-<build>. MIGRATION.md gets an entry for anyone pinned to the old tags: those tags no longer update, and pulling them gives no warning.

Not in this PR: tag-push builds. A v* git tag push still triggers Build and Publish and rebuilds all 8 images, but since #244 it publishes nothing. The README now says that git tags don't publish images. Removing the trigger needs a change to voxpupuli/container_modulesync_configs, because its template always emits on.push.tags and publish_tag_patterns: [] renders an empty tags:, which actionlint rejects.

The workflow changes are made in .sync.yml. build_container.yml and ci.yml were rendered from the current upstream templates, with this repo's existing action pins kept.

Checklist

I have:

🤖 Generated with Claude Code

bootc and others added 2 commits November 21, 2026 09:12
The build sequence step added in OpenVoxProject#244 recomputes the next number from
the registry inside the manifest job. That causes three problems:

- A re-run of the same commit, or a manual dispatch, mints a new
  number, as happened with 8.18.0-0 and 8.18.0-1.
- A partial failure (Docker Hub down, run cancelled between the
  Ubuntu and Alpine pushes) leaves -N without -N-alpine, or ghcr.io
  and docker.io out of step, and "Re-run failed jobs" then picks N+1.
- Without pipefail, a jq failure leaves the number empty, falls back
  to 0, and silently re-points the existing -0 tags.

Move the calculation into build_sequence.sh and run it once in the
setup job, before anything is pushed. Every manifest leg and both
registries then use the same number, and "Re-run failed jobs" reuses
it because GitHub keeps the setup job's outputs. The script runs
under "set -euo pipefail", fails if the tag list cannot be read,
matches versions with jq string operations instead of an unescaped
regex, and counts -N-alpine tags so an Alpine-only number is never
reused.

Before pushing, the manifest step refuses to overwrite a -N tag that
was built from a different commit. Each -N index now carries an
org.opencontainers.image.revision annotation, which the check reads
and which records where an image came from. The step also writes the
published tags to the job summary.

tests/build_sequence_test.sh covers the numbering rules and the
failure cases. It runs in the CI image test step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Chris Boot <bootc@boo.tc>
OpenVoxProject#244 replaced the <openvox.version>-main and
<openvox.version>-v<container.version> tags with
<openvox.version>-<build>, but the README still documented the old
scheme, and the Docker Hub description is generated from the README.

Update the version schema: say what the build number counts, that only
main publishes images, and how to find the commit behind a build. Add a
MIGRATION.md entry for anyone pinned to the old tags. Those tags still
exist but no longer update, so the pull neither fails nor warns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Chris Boot <bootc@boo.tc>
@bootc
bootc requested a review from a team as a code owner November 21, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant