tribuchet: building on jamie ============================= test session starts ============================== platform linux -- Python 3.14.7, pytest-9.1.1, pluggy-1.6.0 -- /nix/store/d64q19q1xjdwfhqx6czvrjgrhq0n3lcc-python3-3.14.7/bin/python3.14 cachedir: .pytest_cache rootdir: /build collecting ... collected 33 items tests-functional/test_eval.py::test_flake PASSED [ 3%] tests-functional/test_eval.py::test_query_cache_status PASSED [ 6%] tests-functional/test_eval.py::test_expression PASSED [ 9%] tests-functional/test_eval.py::test_input_drvs PASSED [ 12%] tests-functional/test_eval.py::test_odd_attribute_names_and_cycles PASSED [ 15%] tests-functional/test_eval.py::test_closed_stdout_aborts PASSED [ 18%] tests-functional/test_eval.py::test_rejects_bad_numeric_flags[flag0] PASSED [ 21%] tests-functional/test_eval.py::test_rejects_bad_numeric_flags[flag1] PASSED [ 24%] tests-functional/test_eval.py::test_rejects_bad_numeric_flags[flag2] PASSED [ 27%] tests-functional/test_eval.py::test_rejects_bad_numeric_flags[flag3] PASSED [ 30%] tests-functional/test_eval.py::test_worker_exits_cleanly_when_collector_disappears PASSED [ 33%] tests-functional/test_eval.py::test_eval_error PASSED [ 36%] tests-functional/test_eval.py::test_eval_logs_per_attr PASSED [ 39%] tests-functional/test_eval.py::test_no_gcroot_dir PASSED [ 42%] tests-functional/test_eval.py::test_daemon_only_settings_do_not_warn PASSED [ 45%] tests-functional/test_eval.py::test_constituents PASSED [ 48%] tests-functional/test_eval.py::test_constituents_all PASSED [ 51%] tests-functional/test_eval.py::test_constituents_glob_misc PASSED [ 54%] tests-functional/test_eval.py::test_constituents_cycle PASSED [ 57%] tests-functional/test_eval.py::test_constituents_error PASSED [ 60%] tests-functional/test_eval.py::test_empty_needed PASSED [ 63%] tests-functional/test_eval.py::test_apply PASSED [ 66%] tests-functional/test_eval.py::test_select_flake PASSED [ 69%] tests-functional/test_eval.py::test_recursion_error PASSED [ 72%] tests-functional/test_eval.py::test_no_instantiate_mode PASSED [ 75%] tests-functional/test_eval.py::test_fod_with_uncached_input_issue413[file] PASSED [ 78%] tests-functional/test_eval.py::test_fod_with_uncached_input_issue413[http] PASSED [ 81%] tests-functional/test_eval.py::test_ifd_with_separate_eval_store PASSED [ 84%] tests-functional/test_eval.py::test_worker_log_format_survives_fork PASSED [ 87%] tests-functional/test_eval.py::test_worker_restart_on_last_job_exits_cleanly PASSED [ 90%] tests-functional/test_eval.py::test_fetchers_survive_worker_restart PASSED [ 93%] tests-functional/test_eval.py::test_workers_do_not_race_flake_fetch FAILED [ 96%] tests-functional/test_eval.py::test_memory_budget_evicts_and_reports_fat_attr PASSED [100%] =================================== FAILURES =================================== _____________________ test_workers_do_not_race_flake_fetch _____________________ tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_workers_do_not_race_flake0') def test_workers_do_not_race_flake_fetch(tmp_path: Path) -> None: """Workers fetching the same flake input concurrently spam "waiting for another Nix process to finish fetching input" (issue #432).""" env = _hermetic_nix_env(tmp_path) repo = tmp_path / "flake" repo.mkdir() jobs = "\n".join( f""" job-{i} = derivation {{ name = "race-{i}"; system = "x86_64-linux"; builder = "/bin/sh"; args = [ "-c" "echo {i} > $out" ]; }};""" for i in range(8) ) repo.joinpath("flake.nix").write_text(f"{{ outputs = _: {{ hydraJobs = {{ {jobs} }}; }}; }}") subprocess.run(["git", "init", "-q"], cwd=repo, check=True, env=env) subprocess.run(["git", "add", "flake.nix"], cwd=repo, check=True, env=env) subprocess.run( ["git", "-c", "user.email=t@t", "-c", "user.name=t", "commit", "-qm", "init"], cwd=repo, check=True, env=env, ) > res = subprocess.run( [ str(BIN), "--gc-roots-dir", str(tmp_path / "gc"), "--workers", "8", *COMMON_FLAGS, "--flake", f"git+file://{repo}#hydraJobs", ], env=env, text=True, check=True, capture_output=True, ) tests-functional/test_eval.py:1034: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['/nix/store/v7fgcpx3ram406y75pi5fqg854g6y4va-nix-eval-jobs-2.35.3/bin/nix-eval-jobs', '--gc-roots-dir', '/build/pytest-of-nixbld/pytest-0/test_workers_do_not_race_flake0/gc', '--workers', '8', '--extra-experimental-features', ...],) kwargs = {'env': {'SHELL': '/nix/store/svx59425zxp552p2b8gm11qj5r09b56i-bash-5.3p15/bin/bash', '_PYTHON_HOST_PLATFORM': 'linux-x86_64', 'NIX_BUILD_CORES': '24', 'configureFlags': '', ...}, 'text': True, 'stdout': -1, 'stderr': -1} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout (seconds) is given and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['/nix/store/v7fgcpx3ram406y75pi5fqg854g6y4va-nix-eval-jobs-2.35.3/bin/nix-eval-jobs', '--gc-roots-dir', '/build/pytest-of-nixbld/pytest-0/test_workers_do_not_race_flake0/gc', '--workers', '8', '--extra-experimental-features', 'nix-command flakes', '--flake', 'git+file:///build/pytest-of-nixbld/pytest-0/test_workers_do_not_race_flake0/flake#hydraJobs']' returned non-zero exit status 1. /nix/store/d64q19q1xjdwfhqx6czvrjgrhq0n3lcc-python3-3.14.7/lib/python3.14/subprocess.py:578: CalledProcessError =========================== short test summary info ============================ FAILED tests-functional/test_eval.py::test_workers_do_not_race_flake_fetch - ... ========================= 1 failed, 32 passed in 7.86s =========================