Repository navigation
Description
The scheduled workflow fails every night, and the failure is a name, not a race.
What happens
update-lockfile computes tsan_versions from the flake package names. The
filter keeps each name that ends in -tsan:
builtins.filter (n: builtins.match ".*-tsan" n != null) (builtins.attrNames pkgs)Six names end in -tsan, because the library package and the test runner both
carry the suffix:
nanopynix-git-tsan nanopynix-tests-git-tsan
nanopynix-nix_2_34-tsan nanopynix-tests-nix_2_34-tsan
nanopynix-nix_2_35-tsan nanopynix-tests-nix_2_35-tsan
replaceStrings then removes the nanopynix-tests- prefix from the three
runner names, and leaves the three library names untouched. The matrix
therefore holds six entries, and the job rebuilds the prefix:
nix build ".#nanopynix-tests-${{ matrix.version }}"
For a library name that gives nanopynix-tests-nanopynix-nix_2_35-tsan, which
no flake output provides.
Evidence
Run 30687241718, on develop at 3af5106881bc:
test-tsan (git-tsan) success
test-tsan (nix_2_34-tsan) success
test-tsan (nix_2_35-tsan) success
test-tsan (nanopynix-git-tsan) failure
test-tsan (nanopynix-nix_2_34-tsan) failure
test-tsan (nanopynix-nix_2_35-tsan) failure
Each failure is the same message:
error: flake ... does not provide attribute
packages.x86_64-linux.nanopynix-tests-nanopynix-nix_2_35-tsan
The three real jobs pass. TSan finds no race today, and the nightly reports
failure anyway.
Cause
regular_versions, on the line above, already requires the prefix:
builtins.match "nanopynix-tests-.*" n != null && builtins.match ".*-tsan" n == nulltsan_versions omits the first condition.
The correction
Add the same condition to tsan_versions in ci/workflows/on_schedule.nix,
and render .github/workflows/ again with direnv exec . python ci/render.py.
The corrected expression gives exactly the three names that pass today:
["git-tsan","nix_2_34-tsan","nix_2_35-tsan"]
Acceptance criteria
- The nightly runs three TSan jobs, and no job names an attribute that the
flake does not provide. ci/workflows/on_schedule.nixholds the change, and the generated YAML
matches it.- The scheduled run reports success when TSan finds no race.
Why there is no test
The matrix comes from a nix eval inside a workflow step, and no gate in this
repository evaluates it. A test would have to build the same expression a
second time, and it would then assert the expression against itself. The
evidence above is the check: the corrected filter returns the three names that
already pass.
Activity
fix(ci): stop the nightly TSan matrix naming absent attributes