Skip to content

Fix package discovery and build failures in NixCI - #504

Draft
ryantm wants to merge 4 commits into
mainfrom
fix-nixci-builds
Draft

ryantm wants to merge 4 commits into
mainfrom
fix-nixci-builds

Conversation

@ryantm

@ryantm ryantm commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The package output set contains nested deployment and OCI maps. CI discovers flattened dotted names, then attempts to build those names as literal package attributes; the attributes do not exist. Fail-fast cancellation prevents a complete inventory of other build failures.

What changed

  • Export each deployment module and per-module OCI image as a derivation under a literal dotted package key, matching the discovered build target.
  • Preserve shorthand access through top-level deploymentModules and phony-oci-bundles maps. Explicit nested paths under packages.x86_64-linux must use the quoted dotted key instead.
  • Assert that every package output is a derivation.
  • Add Linux NixCI configuration with fail-fast disabled, without limiting the package build set.

This draft is the starting point for full-suite triage. Existing aliases and supported runtime versions are unchanged. Further straightforward build fixes will be added after the hosted suite runs; runtime retirement decisions require separate agreement.

Test plan

  • NixCI configuration validator accepted the configuration without warnings.
  • Formatting and git diff --check passed.
  • Evaluated the previously missing literal deploymentModules.bash package target successfully.
  • Passed the full local repository check suite on both the initial and rebased heads, including the OCI fixture.
  • Realized Node 24 and Angular 24 development and deployment modules after rebasing onto the merged Node dependency fix. Node 24.22.1 also passed a Brotli compression/decompression smoke test.
  • Hosted verification is complete; see Final validation below.

Failure triage

The first full run recorded 14 failed attempts across seven output attributes. Thirteen attempts failed through libarchive's test_option_c; one initial Node 23-alias attempt failed SQLite's tests before its retry hit libarchive. These are dependencies of the same Node 24 build, not independent obsolete runtimes. Eleven bundle/OCI outputs remained queued behind dependencies.

Rebased onto the merged Node dependency fix in #505. It retains Node 24.22.1 while removing the failing dependency pin. Node 23 already aliases Node 24; no supported implementations or compatibility aliases were removed.

Rollout

No publishing or repository-setting changes. Reverting restores the previous package export shape and default fail-fast behavior. Keep this PR in draft until package failures have been investigated.

  • This is fully backward and forward compatible

Local image builders

All exported disk, tarball, full-bundle OCI, and per-module OCI outputs now build executable scripts rather than image artifacts. NixCI builds these scripts and their dependencies; image bytes are written only when a user invokes nix run with a local output directory. The fixture check creates small temporary images and retains only its result marker. No runtime versions or aliases were removed.

Examples:

nix run .#bundle-image -- ./full-disk
nix run .#bundle-image-tarball -- ./full-disk-tarball
nix run .#bundle-oci -- ./bundle-oci
nix run .#custom-bundle-squashfs -- ./custom-disk
nix run .#phony-oci-bundles.nodejs-22 -- ./node-oci
nix run .#bundle-oci.copyTo -- ./bundle-oci oci:./copied:bundle

Callers that previously copied artifacts from nix build results must migrate to nix run. The copy helper now takes the local image directory as its first argument. Builders reject existing destinations and Nix-store paths, clean temporary and partial output on failure, and support paths containing spaces.

Validation covers temporary SquashFS metadata, tarball contents, per-module OCI metadata/blobs, full-bundle OCI invariants and digest-preserving copying, overwrite/store-path/symlink rejection, and failure cleanup. The full local check suite passed on this revision, including the image fixtures in paths containing spaces; hosted CI also passed.

Final validation

Validated commit d5dc78c:

  • NixCI suite succeeded: 334 jobs total, 323 cached and 11 successful executions; no failed or pending jobs.
  • GitHub Actions Check for errors succeeded: https://github.com/replit/nixmodules/actions/runs/39876266861
  • Full local repository checks passed.
  • Runtime helper files are retained in the script closures. Hardlink fixtures are created at test runtime so binary-cache substitution cannot invalidate their assumptions.
  • Image outputs are executable builders, not disk or OCI image artifacts. Fixture tests create temporary images and retain only their result marker.

~ written by ⠕ Replit

Flatten deployment and OCI package exports into derivations, preserve top-level module access, and collect all CI failures instead of cancelling at the first error.

Assisted-by: Replit
Keep image artifacts out of Nix outputs and binary caches. Convert disk, tarball, and OCI outputs into runtime builders, and exercise them with temporary fixtures including destination safety and cleanup checks.

Assisted-by: Replit
Coerce path-valued builder environment inputs into store files instead of discarding their dependency context with toString.

Assisted-by: Replit
Create and verify a hardlink at test runtime, and only require cached closure inputs to retain links that still exist in the source.

Assisted-by: Replit
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