From 5dac1854c277a1c10991c0700aa798784cfab90b Mon Sep 17 00:00:00 2001 From: Ilker Manap Date: Wed, 30 Sep 2026 01:00:11 +0200 Subject: [PATCH] Publish small fixes as release candidates of the next version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every fix so far became its own patch release, and the natural alternative — v0.10.3-a — sorts before v0.10.3 by SemVer's rules: a hyphen marks a pre-release, so every tool that orders versions would take the fix for the older one. A release candidate of the next version, v0.10.4-rc.1, sorts after v0.10.3 and before v0.10.4, which is what it is. CI already builds any v* tag. Its release notes now come from a "## Unreleased" section in CHANGELOG.md, where changes gather until the version they belong to is released, and the release is marked as a pre-release. Onboarding, in Go and in the shell script, counts a candidate as a release and downloads it rather than copying the operator's binary. Co-Authored-By: Claude Opus 5.5 (1M context) --- CHANGELOG.md | 22 ++++++++++++++++++++++ deploy/bootstrap/onboard-node.sh | 2 +- internal/onboard/onboard.go | 5 ++++- internal/onboard/releasetag_test.go | 14 ++++++++++++++ scripts/gitea/release_notes.py | 26 +++++++++++++++++++------- 5 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 internal/onboard/releasetag_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index ac8a7b1..963f6b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,28 @@ is only released once its **exit criterion** is met, not when its code lands. Until v1.0.0 the minor version is the breaking one: configuration formats and Go APIs change between minors without a deprecation period. +## Unreleased + +Changes since v0.10.3, published as release candidates (v0.10.4-rc.N) until +there are enough for v0.10.4. + +### Restarting replicas + +`llmgw ctl restart REPLICA... | --model M | --all` replaces replicas with new +ones. Each replacement is started beside the replica it replaces, which keeps +serving until the new one is ready; replicas of one model go one at a time. +Where no second copy fits anywhere, the old replica is stopped after the drain +grace period and the new one starts in its place. This is how running engines +pick up the keys introduced in v0.10.3, an edited profile, or a new engine +version. + +### Releases + +Small fixes are published as release candidates of the next version — +v0.10.4-rc.1, rc.2 — which sort after v0.10.3 and before v0.10.4. Their release +notes come from this section, and they are marked as pre-releases. Onboarding +treats a release candidate as a release and downloads it. + ## v0.10.3 — 2026-09-30 Security fixes from a review of v0.10.2. Three of them were confirmed on the diff --git a/deploy/bootstrap/onboard-node.sh b/deploy/bootstrap/onboard-node.sh index 98464cc..36e951d 100755 --- a/deploy/bootstrap/onboard-node.sh +++ b/deploy/bootstrap/onboard-node.sh @@ -143,7 +143,7 @@ $SSH "set -e # that is not a release (a developer's, with commits past the tag) has no such # file, and is copied as before. TAG="$("$BINARY" --version 2>/dev/null | awk '{print $NF}')" -if printf '%s' "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then +if printf '%s' "$TAG" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$'; then say "installing llmgw $TAG from the release" $SSH "set -e arch=\$(dpkg --print-architecture) diff --git a/internal/onboard/onboard.go b/internal/onboard/onboard.go index 67e8170..6500814 100644 --- a/internal/onboard/onboard.go +++ b/internal/onboard/onboard.go @@ -332,7 +332,10 @@ func certNames(path string) ([]string, error) { // --- binary --- -var releaseTag = regexp.MustCompile(`^v\d+\.\d+\.\d+$`) +// releaseTag is a version CI published: v0.10.4, or a release candidate of +// it, v0.10.4-rc.2. Anything else — a build with commits past its tag — has no +// release to download. +var releaseTag = regexp.MustCompile(`^v\d+\.\d+\.\d+(-rc\.\d+)?$`) func (r *Runner) binary(ctx context.Context, res *Result) error { v := r.Opts.Version diff --git a/internal/onboard/releasetag_test.go b/internal/onboard/releasetag_test.go new file mode 100644 index 0000000..a1b364d --- /dev/null +++ b/internal/onboard/releasetag_test.go @@ -0,0 +1,14 @@ +package onboard + +import "testing" + +func TestAReleaseCandidateIsARelease(t *testing.T) { + for v, want := range map[string]bool{ + "v0.10.4": true, "v0.10.4-rc.1": true, "v0.10.4-rc.12": true, + "v0.10.3-5-gad6d2d3": false, "v0.10.4-rc": false, "v0.10.3-a": false, "dev": false, + } { + if got := releaseTag.MatchString(v); got != want { + t.Errorf("%s: %v", v, got) + } + } +} diff --git a/scripts/gitea/release_notes.py b/scripts/gitea/release_notes.py index 2165e18..d8e46c5 100755 --- a/scripts/gitea/release_notes.py +++ b/scripts/gitea/release_notes.py @@ -10,6 +10,11 @@ it, it does not replace it. Idempotent: a release whose body already matches is left alone, a version with no release is skipped, and nothing is created or deleted. +A release candidate — v0.10.4-rc.2 — takes the "## Unreleased" section, which +is where changes gather until the version they belong to is released, and is +marked as a pre-release. The final v0.10.4 takes its own section once +"Unreleased" has been renamed to it. + Usage: GITEA_TOKEN= scripts/gitea/release_notes.py [--tag v0.8.1] [--dry-run] @@ -32,7 +37,8 @@ DEFAULT_REPO = "ilker/llmgw" # "## v0.8.1 — 2026-09-28". The dash is whatever was typed; the version is what # matters. -HEADING = re.compile(r"^## (v\d+\.\d+\.\d+)\b.*$", re.M) +HEADING = re.compile(r"^## (v\d+\.\d+\.\d+|Unreleased)\b.*$", re.M) +CANDIDATE = re.compile(r"^v\d+\.\d+\.\d+-rc\.\d+$") def sections(changelog): @@ -77,11 +83,16 @@ def main(): with open(args.changelog, encoding="utf-8") as f: notes = sections(f.read()) if args.tag: - if args.tag not in notes: + section = "Unreleased" if CANDIDATE.match(args.tag) else args.tag + if section not in notes: # A tag with no section is a release somebody forgot to describe. # Failing says so where it is seen; an empty page says nothing. - sys.exit(f"{args.changelog} has no section for {args.tag}") - notes = {args.tag: notes[args.tag]} + sys.exit(f"{args.changelog} has no section for {args.tag} (looked for {section!r})") + notes = {args.tag: notes[section]} + else: + # Syncing everything: "Unreleased" belongs to whichever candidate is + # newest, which only a tag says. + notes.pop("Unreleased", None) base = f"{args.instance.rstrip('/')}/api/v1/repos/{args.repo}/releases" for tag, body in notes.items(): @@ -92,11 +103,12 @@ def main(): if rel is None: print(f"skip {tag} (no release)") continue - if (rel.get("body") or "").strip() == body.strip(): + pre = bool(CANDIDATE.match(tag)) + if (rel.get("body") or "").strip() == body.strip() and bool(rel.get("prerelease")) == pre: print(f"same {tag}") continue - request("PATCH", f"{base}/{rel['id']}", token, {"body": body}) - print(f"set {tag}") + request("PATCH", f"{base}/{rel['id']}", token, {"body": body, "prerelease": pre}) + print(f"set {tag}" + (" (pre-release)" if pre else "")) if __name__ == "__main__":