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

Each version's image is published as a knotless release

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:release/image

Each version's image is published as a knotless release, so docker pull knotless.dev/chadtmiller.com/group-host:0.2.0 gets the image next.opensocial.fyi runs. It works the way knotless publishes knotless-server: once a deploy is up, deploy saves the running image on the box and publishes it as the group-host package at main's version, if that version has none yet.

Claude Opus 5.5 · high effort

What changes

deploy gets an image step after the deploy step:

  • Skips: it does nothing when no RELEASE_PASSWORD is set, or when knotless release list already has this version of group-host.
  • Saves: it installs the knotless CLI from knotless.dev's /install.sh, then runs box save. That streams docker save of group-host:current from the box, as an OCI image layout, into a directory.
  • Publishes: it runs knotless release publish <repo> group-host <version> --oci <dir> --commit <sha> as the owner, with the version's CHANGELOG.md section as the notes.
  • Secret: RELEASE_PASSWORD is an app password of the owner's, sealed to ci.knotless.dev for refs/heads/main.

Docs: what an operator reads no longer assumes knotless.

  • docs/deploying.md is for whoever runs a host. It now says how to pull a released image or build one, and to upgrade with either. It no longer describes how next.opensocial.fyi is deployed.
  • That description moves to docs/development.md, as "The deploy and its image": the workflow, its runner and secrets, the published image, and how to seal RELEASE_PASSWORD.
  • docs/development.md no longer says knotless refuses this repository's releases.
  • docs/design/signing-in.md's example handle no longer names our sign-up PDS.
  • AGENTS.md says deploy publishes each version's image, and points to docs/development.md.

Why

A release here was only a version, a changelog and a tag, and the only images were on the box. The repository is public now, so knotless takes its releases. Publishing the image the box runs means each published version is exactly what was deployed.

How it was checked

  • On the box, docker save group-host:current gives index.json, oci-layout, manifest.json and 18 blobs. That is the layout --oci takes, under its 63-blob limit.
  • The step itself first runs on the deploy after this lands.

Shortcomings

  • Needs the box script. The step needs hetzner-infra's pull "opensocial: group-host-deploy saves the running image" installed on the box. Until then, box save is refused and the step fails.
  • Needs the secret. Seal RELEASE_PASSWORD once: knotless secret set knotless://chadtmiller.com/group-host RELEASE_PASSWORD --runner ci.knotless.dev --ref refs/heads/main, with the app password on stdin. Without it, nothing is published.
  • No deploy has run since a8c27d6. deploy hasn't run for the pulls the merge queue has landed since then: next.opensocial.fyi still answers {"commit":"a8c27d6…","version":"0.1.0"}. Until deploys run again, nothing is published.
Approved

This adds an image step to deploy. After the box is healthy, the step saves group-host:current with box save. It publishes that image with knotless release publish --oci, unless RELEASE_PASSWORD is unset or this version is already released. The docs and AGENTS.md are updated to match.

The change looks sound, and I could not run it:

  • The tools step already installs curl, and it defines box, so the new step has what it needs.
  • The awk section extraction matches the ## 0.2.0 (date) heading in CHANGELOG.md. It stops at the next ## heading and keeps the ### subheadings.
  • The step skips cleanly when the secret is absent, and it runs after the health check, so a failed publish can't stop a deploy from going up.

Two things I couldn't check from here:

  • The "already published" test assumes knotless release list prints the version in tab-separated column 2, and that Cargo.toml's first version = "…" is the workspace version. If either is wrong, the step republishes an existing version and fails after the deploy is already up. Check both when the first deploy runs.
  • The step only works once hetzner-infra's box script change is installed and the secret is sealed, as the body says.
Approved

Since my approval at 0815aaf, the changes are all documentation. The workflow is untouched. The deploy and published-image sections moved from docs/deploying.md to docs/development.md. deploying.md gained a "Pulling the image" section, and its upgrade steps now pull the image instead of building it. AGENTS.md points at the new location. The #the-deploy-and-its-image and #pulling-the-image anchors match their headings. I also saw a small unrelated edit to the sign-in example handle in docs/design/signing-in.md. Nothing here breaks what I approved. The two checks I couldn't make from here still stand: the knotless release list column format, and Cargo.toml's first version = being the workspace version.

Merged as 8e90c4c