~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Releases publish the image and the binary, from change files

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:release/images

Monolith gets releases: change files, a Release <version> pull kept open by knope, and on landing the image and the binary published and the commit tagged. The guides already promised both, and the registry had no tags. It also points the README and the contributing guide at the documentation's public site, now that the repository is public.

Claude Opus 5.5 · high

What changes

Releases. knope.toml, .changeset/ and CHANGELOG.md, as knotless has them. release-pull.yml, daily when main has change files, runs knope release on main's tip and keeps one Release <version> pull open on release/next; queueing it is the release. release.yml, once a version lands and the gates pass at it, publishes the image as the package monolith (knotless.dev/chadtmiller.com/monolith:<version>) and pds-<version>-x86_64-linux.tar.gz with its .sha256 as the package pds, each with the version's changelog, then tags v<version>. Both run on runner.knotless.dev, with RELEASE_PASSWORD sealed to it for pushes to main alone.

The image without a container engine. The runner's jobs have none, so .knotless/image.sh makes an OCI layout from the built binary: the Dockerfile's last stage on debian:trixie-slim for linux/amd64, resolved when it runs, one layer more holding pds, /data and the user, and the Dockerfile's user, environment, volume, port, entry point and command. Its labels and annotations name the version, the commit and the base by digest. The layer's files and dates are the commit's time, so the same binary on the same base makes the same image.

The Dockerfile. Its user's group is now 10001, as the released image's is, where useradd --system gave a system gid.

Docs. contributing.md, "Releases": change files, the two workflows and the upgrade data written after a tag. deploying.md and getting-started.md: the image's tags, labels and user; examples no longer name 0.1.0, never published. AGENTS.md and .knotless/review.md: a change those who run or call the server see adds a change file. The first change file is this one's: the next release is 0.2.0.

Why

/xrpc/_health answers the version as the reference does (spec/OPERATIONS.md), and the reference's moves with its releases (grain's answers 0.4.5027); Monolith's has been 0.1.0 since the start. getting-started.md and deploying.md named an image and a binary that were never published (/v2/chadtmiller.com/monolith/tags/list answers no tags). The staged server on the grain box builds from source beside production on every deploy; with releases it pulls a version.

How it was checked

  • .knotless/image.sh in a linux/amd64 Debian container, given the pds binary of the image deployed on the grain box: the layout built twice gave the same manifest. Pushed to a local registry with crane and pulled with Docker, its config has user pds, entry point pds, command serve, volume /data, port 2583, the three PDS_* variables and the labels; run, it answered _health, ran as uid and gid 10001 and wrote its data directory in /data.
  • release.yml and release-pull.yml asked for on this branch: the dry runs, building and printing, publishing and pushing nothing.

Shortcomings

  • Publishing and tagging run first when the Release 0.2.0 pull lands: knotless release publish --oci is exercised there, not here.
  • One platform, linux/amd64, as getting-started.md asks of the server.
  • harness/upgrade/ is still written again by hand after a tag.

Review

.knotless/image.sh against the Dockerfile's last stage: they must stay alike.

Approved

This adds releases. Change files and knope, with release-pull.yml keeping a Release <version> pull open. release.yml publishes the image and the binary and tags the commit. .knotless/image.sh builds the OCI layout without a container engine. The Dockerfile's user, the docs, AGENTS.md and review.md are updated to match. I found nothing that must change before it merges.

  • Stale-trigger risk in release.yml. Its push trigger is "main, Cargo.toml touched", and the version it publishes is whatever Cargo.toml says. 0.1.0 was never published. So if any pull lands on main before Release 0.2.0 and edits Cargo.toml, for example a dependency bump, the workflow publishes 0.1.0 from that commit with empty notes and tags it v0.1.0. Queueing Release 0.2.0 soon after this lands avoids it. Alternatively, skip the publish when the version has no CHANGELOG.md section.
  • Spec and docs. Nothing here changes server behaviour, so no spec/ change is needed. The docs say what is built, as the repository asks.
  • Harness and server code. The harness and the crates are untouched.
  • image.sh and the Dockerfile. /etc/shadow and /etc/gshadow get no pds entry, though the Dockerfile's useradd adds one. That doesn't matter for a non-login service user. The comment in the Dockerfile pointing at image.sh covers the other drift.
  • What I could not check. knotless release publish --oci and the release list output format that cut -f2 relies on are first exercised when the release pull lands, as the body already says.
All checks have passed

3 passed, 2 skipped

Merged as a4fabf8