Skip to content

Build native releases and images through a single Nix flake - #299

Open
jgoux wants to merge 17 commits into
mainfrom
nix-native-release-pipeline
Open

Build native releases and images through a single Nix flake#299
jgoux wants to merge 17 commits into
mainfrom
nix-native-release-pipeline

Conversation

@jgoux

@jgoux jgoux commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

This migrates native service builds and image assembly to a single root Nix flake. Release jobs previously selected between host installers, copied upstream overlays, and several Nix invocation paths. They now resolve the requested source and dependency hashes into an explicit release input, build a portable runtime, and package the audited bytes with pinned archive tools and dockerTools.

The hourly poller, release floors, exact-version selection, and automatic native-package/image publication remain intact. New upstream releases do not require edits to the repository lock. Postgres and Edge Runtime retain their selected upstream release's own dependency graph; verified upstream archives and mirrored images retain their existing provenance paths.

The migration removes host Go/npm installers, duplicated Nix pins, copied overlays, Docker build runners, and slim Dockerfiles. Studio uses the standard nixpkgs pnpm fetcher and configuration hook. Runtime identity, working directories, entrypoints, volume permissions, and platform floors remain part of the validation contract.

Service artifacts also own Realtime, Analytics, Storage, and Pooler preparation, Pooler tenant provisioning, and PostgreSQL first boot. Native services and derived images use the same launchers. PostgreSQL bootstraps through a private socket and a directly owned temporary server, preserves existing volumes, and rejects incomplete initialization. Ports, credentials, and project configuration remain in the CLI stack rewrite.

Validation: repository checks, host fixture suites, shell syntax/ShellCheck, and pure flake evaluation pass. All 15 selected release validations pass across Linux amd64, Linux arm64, and macOS arm64, covering 13 services, PostgreSQL 15 and 17, and two Studio versions. Validation-only runs build, audit, archive, and smoke without replacing published assets or images. A fresh poller dry run found no unpublished backlog among 155 eligible versions.

Same-version Linux ARM64 comparisons: compressed images decreased by 4.4 MiB for PostgreSQL 17, 3.2 MiB each for Storage and PgMeta, and 8.7 MiB for Studio. Native archives for the first three increased by 1.1–3.0 MiB with bundled glibc; Studio's archive decreased by 0.5 MiB. Parallel-stack memory capacity remains unmeasured.

Successful release-validation runs
Release CI
studio 2026.08.03-sha-022b374 Passed
studio 2026.09.04-sha-5a67366 Published and verified
postgres 17.6.1.159 Passed
postgres 15.14.1.159 Passed
pgmeta v0.96.6 Passed
storage v1.68.1 Passed
analytics v1.49.2 Passed
pooler v2.9.10 Passed
realtime v2.123.5 Passed
postgrest v14.16 Passed
auth v2.195.0 Passed
vector 0.53.0 Passed
mailpit v1.30.2 Passed
imgproxy v3.8.0 Passed
edge-runtime v1.74.3 Passed

Repository checks

Service preparation validation

The eight selected releases were replaced from this branch after passing all three native targets and both Linux images. Each release has verified archive checksums, manifests, and SBOMs; CLI PR #6440 pins the published multi-architecture image digests. PostgreSQL coverage includes existing volumes, backup restoration, restart behavior, and failed initialization; host fixtures verify cancellation and process cleanup.

Release CI
realtime v2.134.5 Published and verified
pooler v2.9.12 Published and verified
analytics v1.50.9 Published and verified
storage v1.73.0 Published and verified
studio 2026.09.04-sha-5a67366 Published and verified
pgmeta v0.99.0 Published and verified
postgres 17.6.1.168 Published and verified
postgres 15.14.1.168 Published and verified

Supersedes #298

@jgoux
jgoux marked this pull request as ready for review September 5, 2026 03:17
@jgoux
jgoux requested a review from avallete September 5, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant