Rebuild with Go 1.27, track base images with Renovate, and cut a Release for every published Image #45
Labels
No labels
bug
enhancement
needs-info
needs-triage
ready-for-agent
ready-for-human
spec
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
vicoli-oss/docker-forgejo-mcp#45
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?
Problem Statement
The Image is a static Go binary, so Go's standard library (TLS, HTTP, …) ships inside it. Its build stage still uses Go 1.25, which is out of support (the supported releases are 1.27 and 1.26), so every Image we publish carries a standard library that no longer gets security fixes. Nobody noticed because Renovate only watches the Pin, not the base images the Image is built on.
Consumers also have no way to learn what changed when a new Image appears. The registry gains an
X.Y.Z-rNtag and the moving tags (3.2.0,3.2,3,latest) move, but there is no record of why: whether Upstream moved to a new Upstream Version, or a Rebuild picked up a toolchain or base-image fix. The commit history uses Conventional Commits, but nothing turns it into release notes, and nothing checks that a pull request's title, which becomes the squash commit on main, follows the convention.Solution
3.2.0-r2).feat/fix/perf/breaking commits since the previous Release.The tag scheme of ADR 0003 stays as it is: the Image has no version of its own besides the Upstream Version plus the Rebuild number.
User Stories
:3, I want the Go 1.27 Image to reach me by a normal pull, so that I get the fix without changing my configuration.3.2.0-r2to exist as a new immutable tag, so that3.2.0-r1stays exactly what it was.3.2.0-r2), so that I can match a Release to the tag I pull without translating version numbers.r10is never sorted beforer2and the notes always cover exactly what was merged since the last Image.Implementation Decisions
Slice 1: Go 1.27 Rebuild, glossary and ADR (lands first, on its own)
1.27-alpineGo image, pinned by its current index digest (Go 1.27.2 at the time of writing; look the digest up again when implementing). If the build or smoke test fails under 1.27, fall back to1.26-alpineand say so in the pull request.3.2.0-r2. The Upstream Version and commit don't change.fix: build the Image with Go 1.27, as Go 1.25 is out of support.Slice 2: Renovate tracks the base images
Slice 3: Releases
3.2.0-r2, novprefix, so it never looks like an Upstream tag). The tag targets the commit the Image was built from.feat,fix,perfand breaking changes. Commits scopedscripts,skills,renovate,agentsorciare skipped as repo-internal. No scope (orimage) means the change affects Consumers.chore(deps)and which the commit groups would otherwise hide. Renovate's commit style stays as it is.3.2.0-r1, and3.2.0-r2if slice 1 published first). Each Release's tag targets the commit in that Image's revision label. The oldest one's notes run from the start of the history.!for breaking changes. It reads the title from the event, with no extra tool. Add the edited event type to the pull request trigger if Forgejo honours it; otherwise document that a title fix needs a new push.image-scoped change shows up in Release notes. The README's tag section points Consumers to the Releases page.Testing Decisions
make release-notes: a dry run of the next Release for the current Pin. Check it against real history: notes after3.2.0-r1must contain the Go 1.27 fix and leave out thescripts-scoped commits (#43, #44), and the header must name v3.2.0, Rebuild 2, and "Upstream Version unchanged".make check-rebuild(base-image guard) andmake check-title TITLE=…(title check), each runnable locally. Check that valid input passes and invalid input fails with the intended message.Out of Scope
:3.CHANGELOG.mdfile, or any bot commit or pull request to main.Further Notes
3.2.0-r2is a prerelease and prerelease parts compare as text. That's why the previous Release is found by ancestry and why the publish script compares Rebuilds as number arrays.Delivered through #53, #54 and #55; tickets #46–#52 are closed.
Solution
3.2.0-r2is published with the moving tags on it. The glossary defines Release, and ADR 0005 records the release decisions.fix(deps): update base images(digest + minor for Go, no majors), whose notes ask to raise the Rebuild.make check-rebuildfails a PR that changes a base image (FROM,# syntax=, externalCOPY --from/RUN --mount=from=) without a new Image tag, and names the Pin edit. Shown failing in CI with a throwaway commit (run 6162), reverted.make release-notespreviews the next Release;make releasecreates it if missing and fails if an existing Release's tag is on another commit. git-cliff (digest-pinned) skips the internal scopesscripts,skills,renovate,agents,ci; the header comes from the Pin; the previous Release is found by ancestry. CI creates the Release right after publishing, with the automatic Actions token (no secret needed).3.2.0-r1on7f2e214: backfilled.3.2.0-r2on6c4b187: created by CI run 6177. The internal #31 line was removed from its notes by hand.make check-titleruns in CI, and a title-only edit re-runs it (run 6164 failed on a bad title, 6165 passed after restoring it).Differences from the spec
docs/agents/forgejo.md.fix(deps), notchore(deps), so their Release says why the Rebuild happened.make test(a plain bash script with a local API stub) and amake release-notesdry run on every PR, both in CI.3.2.0-r1, the only Image published before the automation.Open