Release image: a pre-release tag moves :latest, and an rc spelled without a dot replaces the stable :X.Y #418
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#418
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, comparing howscripts/release_tools.pyand.forgejo/workflows/image.ymltreat a pre-release tag.Checked again on 2026-10-01 against
mainat0a5cad587: still present.The release tooling accepts pre-release tags and marks their Forgejo release as a pre-release. The image workflow does not distinguish them: it pushes the same three tags as for a stable release,
latestincluded. The compose files and the Installing Postulo page tell operators to follow a minor tag, and for one spelling of release candidate the image workflow overwrites exactly that minor tag.version_of_taginscripts/release_tools.py:58-61acceptsv\d+\.\d+\.\d+(?:[-+.][0-9A-Za-z.]+)?;publishinscripts/release_tools.py:240sets"prerelease": "-" in version or "+" in version; the Work out the tags step in.forgejo/workflows/image.yml:85-89always writes${image}:${version},${image}:${version%.*},${image}:latest;image_tagsinscripts/release_tools.py:64-70, andverify_image(:309-342), which requires all three tags.v0.4.0-rc.1the image is pushed as0.4.0-rc.1,0.4.0-rcandlatest, solatestis the release candidate. Forv0.4.1-rc1,${version%.*}is0.4, so the candidate replaces the stable:0.4image as well.tests/test_release_tools.py:213assertsimage_tags("1.0.0-rc.1") == ("1.0.0-rc.1", "1.0.0-rc", "latest"), which fixes this behaviour in place rather than questioning it. A+buildtag is accepted too, although a Docker tag cannot contain+, so its push would fail.docker/compose.ymlanddocker/compose.postgres.ymlpin…/postulo:X.Y, and the wiki's upgrade path isdocker compose pull. An operator followinglatest, or the stable minor when the rc has no dot, would be moved onto a release candidate by an ordinary pull, while the Forgejo release page correctly calls it a pre-release. No pre-release has been tagged yet (tags so far arev0.1.0tov0.3.0), so nobody has been affected, but the tooling explicitly accepts one.is_prerelease(version)inrelease_tools.py, and use it everywhere. For a pre-release,image_tagsreturns only the version, soverify_imagechecks only that tag.image.ymltakes its tag list fromrelease_tools.pyinstead of computing its own with${version%.*}, so the workflow and the script cannot disagree.version_of_tagrefuses+(or the+part is dropped from the image tag). If pre-releases are not wanted at all, makeversion_of_tagaccept onlyvX.Y.Zand drop theprereleaseexpression.Done when
tests/test_release_tools.py:image_tags("0.4.0-rc.1")andimage_tags("0.4.1-rc1")contain neitherlatestnor0.4, andversion_of_tag("v0.4.0+build.1")raisesReleaseError. Both fail today. The existing assertion at line 213 is replaced.