nix-eval-jobs-functional-tests
checks.x86_64-linux.functional-tests
· build #103
· raw
1tribuchet: building on jamie2============================= test session starts ==============================3platform linux -- Python 3.14.7, pytest-9.1.1, pluggy-1.6.0 -- /nix/store/d64q19q1xjdwfhqx6czvrjgrhq0n3lcc-python3-3.14.7/bin/python3.144cachedir: .pytest_cache5rootdir: /build6collecting ... collected 33 items78tests-functional/test_eval.py::test_flake PASSED [ 3%]9tests-functional/test_eval.py::test_query_cache_status PASSED [ 6%]10tests-functional/test_eval.py::test_expression PASSED [ 9%]11tests-functional/test_eval.py::test_input_drvs PASSED [ 12%]12tests-functional/test_eval.py::test_odd_attribute_names_and_cycles PASSED [ 15%]13tests-functional/test_eval.py::test_closed_stdout_aborts PASSED [ 18%]14tests-functional/test_eval.py::test_rejects_bad_numeric_flags[flag0] PASSED [ 21%]15tests-functional/test_eval.py::test_rejects_bad_numeric_flags[flag1] PASSED [ 24%]16tests-functional/test_eval.py::test_rejects_bad_numeric_flags[flag2] PASSED [ 27%]17tests-functional/test_eval.py::test_rejects_bad_numeric_flags[flag3] PASSED [ 30%]18tests-functional/test_eval.py::test_worker_exits_cleanly_when_collector_disappears PASSED [ 33%]19tests-functional/test_eval.py::test_eval_error PASSED [ 36%]20tests-functional/test_eval.py::test_eval_logs_per_attr PASSED [ 39%]21tests-functional/test_eval.py::test_no_gcroot_dir PASSED [ 42%]22tests-functional/test_eval.py::test_daemon_only_settings_do_not_warn PASSED [ 45%]23tests-functional/test_eval.py::test_constituents PASSED [ 48%]24tests-functional/test_eval.py::test_constituents_all PASSED [ 51%]25tests-functional/test_eval.py::test_constituents_glob_misc PASSED [ 54%]26tests-functional/test_eval.py::test_constituents_cycle PASSED [ 57%]27tests-functional/test_eval.py::test_constituents_error PASSED [ 60%]28tests-functional/test_eval.py::test_empty_needed PASSED [ 63%]29tests-functional/test_eval.py::test_apply PASSED [ 66%]30tests-functional/test_eval.py::test_select_flake PASSED [ 69%]31tests-functional/test_eval.py::test_recursion_error PASSED [ 72%]32tests-functional/test_eval.py::test_no_instantiate_mode PASSED [ 75%]33tests-functional/test_eval.py::test_fod_with_uncached_input_issue413[file] PASSED [ 78%]34tests-functional/test_eval.py::test_fod_with_uncached_input_issue413[http] PASSED [ 81%]35tests-functional/test_eval.py::test_ifd_with_separate_eval_store PASSED [ 84%]36tests-functional/test_eval.py::test_worker_log_format_survives_fork PASSED [ 87%]37tests-functional/test_eval.py::test_worker_restart_on_last_job_exits_cleanly PASSED [ 90%]38tests-functional/test_eval.py::test_fetchers_survive_worker_restart PASSED [ 93%]39tests-functional/test_eval.py::test_workers_do_not_race_flake_fetch FAILED [ 96%]40tests-functional/test_eval.py::test_memory_budget_evicts_and_reports_fat_attr PASSED [100%]4142=================================== FAILURES ===================================43_____________________ test_workers_do_not_race_flake_fetch _____________________4445tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_workers_do_not_race_flake0')4647 def test_workers_do_not_race_flake_fetch(tmp_path: Path) -> None:48 """Workers fetching the same flake input concurrently spam "waiting49 for another Nix process to finish fetching input" (issue #432)."""50 env = _hermetic_nix_env(tmp_path)51 repo = tmp_path / "flake"52 repo.mkdir()53 jobs = "\n".join(54 f"""55 job-{i} = derivation {{56 name = "race-{i}";57 system = "x86_64-linux";58 builder = "/bin/sh";59 args = [ "-c" "echo {i} > $out" ]; }};"""60 for i in range(8)61 )62 repo.joinpath("flake.nix").write_text(f"{{ outputs = _: {{ hydraJobs = {{ {jobs} }}; }}; }}")63 subprocess.run(["git", "init", "-q"], cwd=repo, check=True, env=env)64 subprocess.run(["git", "add", "flake.nix"], cwd=repo, check=True, env=env)65 subprocess.run(66 ["git", "-c", "user.email=t@t", "-c", "user.name=t", "commit", "-qm", "init"],67 cwd=repo,68 check=True,69 env=env,70 )71 72> res = subprocess.run(73 [74 str(BIN),75 "--gc-roots-dir",76 str(tmp_path / "gc"),77 "--workers",78 "8",79 *COMMON_FLAGS,80 "--flake",81 f"git+file://{repo}#hydraJobs",82 ],83 env=env,84 text=True,85 check=True,86 capture_output=True,87 )8889tests-functional/test_eval.py:1034: 90_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 9192input = None, capture_output = True, timeout = None, check = True93popenargs = (['/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', ...],)94kwargs = {'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}9596 def run(*popenargs,97 input=None, capture_output=False, timeout=None, check=False, **kwargs):98 """Run command with arguments and return a CompletedProcess instance.99 100 The returned instance will have attributes args, returncode, stdout and101 stderr. By default, stdout and stderr are not captured, and those attributes102 will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,103 or pass capture_output=True to capture both.104 105 If check is True and the exit code was non-zero, it raises a106 CalledProcessError. The CalledProcessError object will have the return code107 in the returncode attribute, and output & stderr attributes if those streams108 were captured.109 110 If timeout (seconds) is given and the process takes too long,111 a TimeoutExpired exception will be raised.112 113 There is an optional argument "input", allowing you to114 pass bytes or a string to the subprocess's stdin. If you use this argument115 you may not also use the Popen constructor's "stdin" argument, as116 it will be used internally.117 118 By default, all communication is in bytes, and therefore any "input" should119 be bytes, and the stdout and stderr will be bytes. If in text mode, any120 "input" should be a string, and stdout and stderr will be strings decoded121 according to locale encoding, or by "encoding" if set. Text mode is122 triggered by setting any of text, encoding, errors or universal_newlines.123 124 The other arguments are the same as for the Popen constructor.125 """126 if input is not None:127 if kwargs.get('stdin') is not None:128 raise ValueError('stdin and input arguments may not both be used.')129 kwargs['stdin'] = PIPE130 131 if capture_output:132 if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:133 raise ValueError('stdout and stderr arguments may not be used '134 'with capture_output.')135 kwargs['stdout'] = PIPE136 kwargs['stderr'] = PIPE137 138 with Popen(*popenargs, **kwargs) as process:139 try:140 stdout, stderr = process.communicate(input, timeout=timeout)141 except TimeoutExpired as exc:142 process.kill()143 if _mswindows:144 # Windows accumulates the output in a single blocking145 # read() call run on child threads, with the timeout146 # being done in a join() on those threads. communicate()147 # _after_ kill() is required to collect that and add it148 # to the exception.149 exc.stdout, exc.stderr = process.communicate()150 else:151 # POSIX _communicate already populated the output so152 # far into the TimeoutExpired exception.153 process.wait()154 raise155 except: # Including KeyboardInterrupt, communicate handled that.156 process.kill()157 # We don't call process.wait() as .__exit__ does that for us.158 raise159 retcode = process.poll()160 if check and retcode:161> raise CalledProcessError(retcode, process.args,162 output=stdout, stderr=stderr)163E 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.164165/nix/store/d64q19q1xjdwfhqx6czvrjgrhq0n3lcc-python3-3.14.7/lib/python3.14/subprocess.py:578: CalledProcessError166=========================== short test summary info ============================167FAILED tests-functional/test_eval.py::test_workers_do_not_race_flake_fetch - ...168========================= 1 failed, 32 passed in 7.86s =========================