Release: do not let a pre-release tag move :latest (#4) #105
No reviewers
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED!105
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/release-prerelease-tags"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Prerequisite for the #4 dry run. Found by reading
release.ymlbefore its first ever execution — the repo has zero tags, so nothing in this workflow has run.Two defects, both only reachable via a pre-release tag
1.
:latestwas unconditional.docker/metadata-actionalready suppresses{{major}}.{{minor}}for pre-releases, which makes it easy to assume it handleslatesttoo. It does not — a raw tag has no semver awareness. Sov0.0.1-rc1would have retagged:latestto a release-candidate build, and anything deploying:latestwould silently pull it.2.
prerelease: falsewas hardcoded in the Forgejo release payload, so an-rctag would be published as a finished release.Both now key off a
-in the tag name.Why this had to land first
The plan for #4 is to prove the pipeline with a throwaway tag. Running that against the unfixed workflow would have demonstrated the bug by causing it — moving
:latestto a disposable RC. Nothing consumes:latesttoday, so the blast radius would have been nil, but it would still have been a self-inflicted wound on the exact artifact #104 wants prod to avoid depending on.What is still unverified
This PR doesn't prove the workflow works — it can't, because
release.ymlonly triggers onv*. Specifically still untested:REGISTRY_TOKEN, changed during #64 and never exercised here)awksecrets.GITHUB_TOKENrather thanREGISTRY_TOKENThat's what the dry-run tag is for, and it comes next.
🤖 Generated with Claude Code
Found by reading release.yml before its first ever execution -- the repo has zero tags, so nothing in this workflow has run. Two defects, both of which only bite on a pre-release tag: - `type=raw,value=latest` is unconditional, so `v0.0.1-rc1` would retag :latest to an RC build. docker/metadata-action already skips {{major}}.{{minor}} for pre-releases, but it does not skip a raw tag, so this needs an explicit guard. Anything deploying :latest would silently pull a release candidate. - `prerelease: false` is hardcoded in the Forgejo release payload, so an -rc tag would be published as a finished release. Both now key off a `-` in the tag name. This matters more than it looks: the plan for #4 is to prove the pipeline with a throwaway tag, and doing that against the unfixed workflow would have demonstrated the bug by causing it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>