Repository navigation
fix(action): keep the Nix CPython and uv pins on NixOS runners - #1363
Merged
Merged
Conversation
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.
Summary
The direnv-mode
setup-devkit-toolchainPATH filter (#1028) drops the bare Nix CPython wheneverpyproject.tomlis present — unconditionally. On hosted FHS runners that is correct (uvbuilds the venv from a downloaded manylinux CPython). On a NixOS self-hosted runner it is wrong by construction: a manylinux CPython cannot execute there, and after #1353 theUV_PYTHON/UV_PYTHON_DOWNLOADSpins that used to accidentally mask this no longer reach CI. No current consumer hits the combination — this defuses the landmine before the first Python consumer targets a NixOS runner.The step now probes the runner host once (
/etc/NIXOS, the probe mkProjectShell's own shellHook already uses;DEVKIT_NIXOS_MARKERoverrides it solely for the test harness) and branches:UV_PYTHON/UV_PYTHON_DOWNLOADSforwards are allowed (the mkProjectShell pins are exactly correct there). Both halves are needed — keeping the interpreter on PATH alone is not enough, since uv's python-preference can still pick a managed download.Test plan
python3-3.14.6/binstore dir; harness gainedpyproject/nixosknobs.DEVKIT_NIXOS_MARKERto a per-test path whose existence is the switch. This machine IS NixOS, and the pin was proven load-bearing: removing it flips 4 FHS-branch tests red (including the pre-existing fix(action): shellHook env forward ships UV_PYTHON to CI, defeating the bare-CPython exclusion #1353 denial tests, which would otherwise silently test the wrong branch on any NixOS host).tests/test_setup_toolchain_env.py+ renovate-preset file: 45/45 green (verified independently by reviewer); rendered-workflow actionlint bats 5/5;prek run --all-filesgreen.Refs: #1360