Repository navigation
build(image): build the server image with apko and melange, and install mise on first start - #71
Conversation
…ll mise on first start The image is now built from Wolfi packages by apko, with patchula and packslip packaged by melange, and no Dockerfile. It no longer bakes mise in: when no mise is on PATH, patchula serve and patchula tools install install the pinned mise into the tool store with packslip, held to mise's signer. The lockfile runner passes DOTNET_SYSTEM_GLOBALIZATION_INVARIANT on to dotnet restore, which the ICU-less image sets. The image job runs nu tasks (image:build, image:smoke, image:push), publishes only the index the smoke test ran, and attests provenance and per-platform SBOMs. A pull request that touches the image builds and smoke-tests it without publishing.
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Rust | Oct 29, 2026 6:55p.m. | Review ↗ | |
| JavaScript | Oct 29, 2026 6:55p.m. | Review ↗ | |
| Shell | Oct 29, 2026 6:55p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
|
Docs7 for sweepies/count-patchula
Commit |
A first start that cannot reach GitHub's App API still fills the tool store, which the image smoke test relies on. Malformed credentials still fail before the install.
|
[Medium impact] The PR appears safe to merge; no new actionable issues were found. Reviews (4) · Last reviewed commit: "fix(image): give each architecture's pat..." · Reviewed by Greptile |
Replicas sharing a volume, or a server beside patchula tools install, could bootstrap at once and remove each other's unfinished install. The second now waits and finds the first one's mise.
A fresh build resolved Wolfi's newest packages, so it only matched an earlier digest until Wolfi published an update. image:lock pins every package and its dependencies, and image:build holds both builds to those versions.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 2f1450f | Commit Preview URL Branch Preview URL |
Oct 29 2026, 06:25 PM |
Drops image/apko.lock.json and image:lock: a release picks up Wolfi's fixes without a lock to refresh. The tag's provenance attestation records which commit and workflow built its image, and image:push still publishes only the image the smoke test ran.
… source melange builds both architectures at once from one source directory, and one build's probe file could vanish while the other copied the directory, failing about one local image:build in four.
Draft. Measurements are from this PR's release-workflow run at c03f579 (run 40906705492, the image job is unchanged since) unless they're marked local.
What changes
image/apko.yamlbuilds the image from Wolfi packages.image/patchula.melange.yamlpackages patchula from the smoke-tested musl release archives, andimage/packslip.melange.yamlpackages packslip 1.11.1's static release binaries, each pinned by sha256. Wolfi has no packslip package. Each build takes Wolfi's current packages, so a release picks up Wolfi's fixes without a lock to refresh.miseon PATH,patchula serve(after it checks the App key locally, before it signs in to GitHub) andpatchula tools installrunpackslip install github.com/jdx/mise --version <pinned> --pin ps1_nlhmwtfeufglxv5myvwvronk7ainto$PATCHULA_TOOLS_DIR/patchula-mise/<version>as user 10001. The version is the existingmisepin incrates/update/src/lockfiles/defaults.toml, so there's one constant. A present install is reused. The install runs under the tool store's exclusive lock, so replicas sharing a volume install it once. Older versions are removed after a newer one installs. A failed install logscannot install misewith packslip's reason and the server keeps running.DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1and addslibssl3, because Wolfi's git and curl now use OpenSSL 4 and .NET needs OpenSSL 3. The lockfile runner clears the tool environment, so the variable is now passed on todotnet restore. Without that change, setting it in the image would have had no effect.image:build,image:smoke(amd64 in full, arm64 quick checks) andimage:push. On tags it publishes withapko publishand fails unless the published index digest equals the one the smoke test ran. It then attests build provenance and each platform's SBOM with GitHub attestations. A pull request touchingimage/**,mise-tasks/image/**orrelease.ymlbuilds the Linux archives and the image and smoke-tests them, without publishing, and a newer push cancels its older run. The image job setsMISE_LOCKED=1, so installing melange and apko doesn't make mise re-lock every tool (that had cost 9 s).Behaviour changes for operators
curlstays in the image for those.patchula tools install, documented).Before / after
image:pushpublishes only the exact image the smoke test ran: it rebuilds from the same job's package cache and fails on any other digest. A rebuild later takes newer Wolfi packages and gives a different digest.