Repository navigation
fix(toolchain): release-lane cache parity, bounded realisation, fail-soft cachix - #2082
Merged
Merged
Conversation
…fail-soft cachix Guard tests for setup-devkit-toolchain: every call site pulls the consumer Cachix cache, release-lane call sites never get the push token, Nix network knobs are set on both config paths, the realisation fails at a wall-clock bound with an explicit error, a failed Cachix step degrades to a warning, and rollback/cleanup jobs never realise the dev-shell. Refs: #2010
…tions Drop the ad-hoc evaluate_if helper in favour of tests.github_expression, complete the hanging-nix stub's env dump, and route the realisation bound through the existing dev-shell harness env. Refs: #2010
…ation, fail soft on cachix Every scaffolded setup-devkit-toolchain call site passes cachix-cache (pull-only; the token stays in ci.yml). Nix network bounds are set on both config paths and in devkit-upgrade, the dev-shell realisation runs under a wall-clock budget that fails with an explicit error naming the last nix activity, a failing Cachix step degrades to a warning, and rollback/cleanup jobs pass minimal: true so they never realise the dev-shell. Refs: #2010
…s' exit code Refs: #2010
…sation bound The 6-minute default fits the pull-only release lane, where a cold build is itself the bug. ci.yml fills the cache and may legitimately build, so its lanes pass their job timeout minus the 4-minute margin. A nix exit 137 before the deadline (e.g. the OOM killer) now keeps its own exit code instead of being reported as the wall-clock bound. Refs: #2010
gerchowl
force-pushed
the
bugfix/2010-release-lane-cachix
branch
from
November 17, 2026 17:06
dd600cc to
ad59ddd
Compare
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Release-lane jobs in direnv-mode consumers built consumer-only derivations from source and ran into their job timeout. This PR fixes that, and the hangs, Cachix hard-failures and stuck rollbacks around it (#2010, devkit part of #2077).
Root cause: only
ci.ymlpassedcachix-cachetosetup-devkit-toolchain. In the public stepvprepare-releaserun 43877817364, "Configure Cachix" was skipped and 0 paths came from the consumer cache. The same hour,ci.ymlrun 43880461559 pulled those same paths in seconds.Type of Change
fix-- Bug fixtest-- Adding or updating testsChanges Made
cachix-cache: ${{ vars.CACHIX_CACHE }}. Onlyci.ymlpassescachix-auth-token; the token and push policy stay with [FEATURE] Nix: seeded CI cache + opt-in trusted release-cache push #1784/security(ci): managed ci.yml passes the Cachix push token to same-repo pull_request runs (cache poisoning) #1881.cachix/cachix-actionv17 at the pinned SHA. With a cache name and no token it installs cachix if missing, runscachix use <name>and logs "Pushing is disabled". So the new call sites are pull-only. This is documented in the action header.devkit-upgrade.ymldoes not call the composite; it has its own Nix install. It gets the network knobs below through the existing lockstep constant..github/usessetup-envand already passescachix-cacheeverywhere.connect-timeout = 15,stalled-download-timeout = 60anddownload-attempts = 3. They are set on both theextra_nix_configpath and the hostNIX_CONFIGpath, plusdevkit-upgrade.yml, with the rationale and the Nix settings reference in a comment. The lockstep constant is extended.realisation-timeout-minutesinput (default 6) sets one wall-clock budget across everynix developcall in the dev-shell step. It uses coreutilstimeoutwith a kill grace, because composite steps have notimeout-minutes(metadata syntax docs).::error::… toolchain realisation exceeded N min; last nix activity: <last nix stderr line>.ci.ymllanes fill the cache and may legitimately build, so they pass their job timeout minus 4.continue-on-error. A "Report Cachix degradation" step then emits a::warning::naming the likely reason (cachix binary missing / cache URL unreachable / see the step log), and the realisation continues on the remaining substituters.minimalinput. With it the action keeps only theretryhelper in host modes, and the in-image env plussafe.directoryin container modes.minimal, no Nix, dev-shell, uv tools or prek guard are set up.run:bodies only use gh, git, jq, base64 and retry.sync-main-to-devcheck (git and retry only), whose 5-min job timeout no realisation bound fits.docs/MIGRATION.md(Mode-aware CI) gets a short paragraph onCACHIX_CACHE, the bounds and the degradation, linking to the header.Changelog Entry
Fixed
setup-devkit-toolchaincall site now passescachix-cache: ${{ vars.CACHIX_CACHE }}, pull-only, so release-lane jobs substitute consumer-only paths instead of building them from source into the job timeout.connect-timeout,stalled-download-timeout,download-attempts) on every runner-side Nix config, plus arealisation-timeout-minuteswall-clock bound that fails withtoolchain realisation exceeded N min; last nix activity: …instead of a silent cancel.minimal: trueand no longer realise the dev-shell they may be rolling back from.Testing
Tests pass locally for the touched suites (the full suite runs in CI)
New
tests/test_toolchain_release_lane.py, committed first:nixthat hangs, both TERM-able and TERM-ignoring. They check the step fails within the bound, with the explicit error and the last nix activity line.if:conditions evaluated withtests.github_expressionacross all modes ×minimal.Locally, the 63 workflow-shape suites that parse the edited files gave 2520 passed and 36 skipped, exit 0.
A fresh-context review found one blocker: the 6-min default also capped the cache-filling
ci.ymllanes. It is fixed indd600ccd, along with both nits.Checklist
CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
Not done here (follow-ups worth filing):
devkit-upgrade.ymlalso realises the consumer dev-shell (nix developcommit). It has no consumer-cache pull and no wall-clock bound, because it does not use the composite.setup-envaction does not get the network knobs, because it is not the scaffolded composite.http2 = falsewas suggested in [BUG] setup-devkit-toolchain hangs on cache.nixos.org substitution (direnv, hosted runner) until job timeout #2010 for the HTTP/2 framing stall. It is not in the decided design; the wall-clock bound covers that case.Refs: #2010, #2077