build(updates): package host updater artifacts - #838
Conversation
🔐 Codex Security Review
Review SummaryOverall Risk: NONE FindingsNo concrete security, correctness, or reliability findings were identified in the authoritative PR diff. NotesThe reviewed changes package and publish the host updater, its systemd unit, Compose overlay, and filename-bound SHA-256 sidecars. No authentication, database, pool configuration, or protobuf changes are present. Generated by Codex Security Review | |
e5f2947 to
1a9fb62
Compare
d5ff545 to
a45243d
Compare
8a3f798 to
5e5bb30
Compare
95bf85b to
79bb70f
Compare
79bb70f to
de094eb
Compare
d698793 to
ca0365b
Compare
ca0365b to
748016a
Compare
1323503 to
660dafd
Compare
660dafd to
06e92a1
Compare
06e92a1 to
f0c1aed
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends Proto Fleet’s release/nightly deployment artifacts to include the host updater payload and supporting runtime assets, along with SHA-256 checksum sidecars. It does so by updating the artifact-build workflow to build/validate/package the updater and by updating release/nightly publishing workflows to upload and verify the paired checksum files; the added systemd unit and Compose overlay are included in the deployment bundle but remain dormant until downstream installer activation.
Changes:
- Build and package a statically linked
fleet-updaterper architecture into the deployment bundle, and emitproto-fleet-<version>-<arch>.tar.gz.sha256sidecars. - Require and verify both
amd64andarm64bundle+checksum pairs before publishing release/nightly assets. - Add a hardened systemd unit and a narrow Docker Compose overlay that mounts only the updater socket directory read-only into
fleet-api.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
deployment-files/updater/proto-fleet-updater.service |
Adds the systemd service definition with hardening and bounded stop behavior for activation drain. |
deployment-files/docker-compose.updater.yaml |
Adds an overlay that injects the updater socket path env var and mounts only /run/proto-fleet-updater read-only into fleet-api. |
.github/workflows/release.yml |
Verifies deployment bundle checksum sidecars exist and pass, and uploads .sha256 assets alongside bundles. |
.github/workflows/proto-fleet-artifact-build.yml |
Builds/validates a static updater binary, packages it and its runtime assets into the deployment bundle, and generates/verifies checksum sidecars. |
.github/workflows/nightly-builds.yml |
Verifies deployment bundle checksum sidecars exist and pass, and publishes/uploads .sha256 assets alongside bundles for nightlies. |
f0c1aed to
82e774c
Compare
Reviewable diff: +129/-2 across 5 files (excludes generated, test, and story files).
Summary
Packages the host updater into amd64 and arm64 deployment artifacts, publishes paired SHA-256 sidecars, and includes the hardened systemd unit plus narrow socket overlay required by the merged Fleet API bridge. The host binary is statically linked and verified before packaging, while release publication fails closed unless both architecture bundles and correctly bound checksums are present. These assets remain dormant until installer activation lands in #839.
Stack: Prerequisites #841 → #842 → #843 → #844 → #845 → #835 → #836 → #837 are merged. This is 4/6, and its diff is relative to
main. Remaining descendants are #839 → #840: #839 installs and activates these assets, while #840 exposes one-click execution in the client.How it works
The artifact workflow builds a CGO-disabled
fleet-updateron each native architecture runner, rejects dynamically linked output, and verifies the embedded version. The server artifact carries that binary into the deployment bundle, where it is placed beside its systemd unit and a Compose overlay that exposes only the updater Unix-socket directory to fleet-api.Before upload, the workflow verifies the bundle checksum and required updater paths. Stable/RC and nightly publishers then require both amd64 and arm64 pairs, regenerate the expected sidecar for each explicit bundle, and compare the complete digest-and-filename line before creating or updating a GitHub release. The service unit preserves the socket directory inode across stops and restarts, remains available through Docker outages, and gives an in-progress activation enough bounded time to drain safely.
Areas of the code involved
.github/workflows/proto-fleet-artifact-build.yml.github/workflows/release.yml,nightly-builds.ymldeployment-files/docker-compose.updater.yamldeployment-files/updater/proto-fleet-updater.serviceKey technical decisions & trade-offs
CGO_ENABLED=0and inspect its ELF headers, avoiding host glibc coupling at the cost of requiring pure-Go dependencies..sha256sidecars and compare their full content against each explicit amd64/arm64 bundle, keeping updater discovery deterministic and failing closed on partial or swapped artifacts.KillMode=mixedwith a 50-minute stop bound so systemd signals the daemon first and preserves the updater's 45-minute activation safety window.Testing & validation
go test ./cmd/fleet-updater ./internal/updatergit diff --checkEnd-to-end deployment artifact assembly is not run by PR CI; the reusable workflow executes only for release and nightly builds. The new in-workflow assertions make that explicit path fail before publication, but a real release/nightly run remains the integration coverage.