nixbot

builds
1tribuchet: building on eliza2....FF...........FFFF.F [100%]3=================================== FAILURES ===================================4___________________ TestFlakeService.test_update_flake_input ___________________56self = <update_flake_inputs.flake_service.FlakeService object at 0xfffff61e6ea0>7input_name = 'flake-utils', flake_file = 'flake.nix'8work_dir = '/build/tmpo8pay92y'910 def update_flake_input(11 self,12 input_name: str,13 flake_file: str,14 work_dir: str | None = None,15 ) -> None:16 """Update a specific flake input.17 18 Args:19 input_name: Name of the input to update20 flake_file: Path to the flake file21 work_dir: Optional working directory to resolve flake file path from22 23 """24 try:25 logger.info("Updating flake input: %s in %s", input_name, flake_file)26 27 # If work_dir is provided, resolve the flake file relative to it28 absolute_flake_path = Path(work_dir) / flake_file if work_dir else Path(flake_file)29 30 flake_dir = absolute_flake_path.parent or Path()31 absolute_flake_dir = flake_dir.resolve()32 33 # Use a shallow URL because worktrees may not have the full history.34 # For subflakes, nix needs the URL to point to the git root35 # with a dir= parameter rather than the subdirectory directly.36 if work_dir:37 git_root = Path(work_dir).resolve()38 relative_dir = absolute_flake_dir.relative_to(git_root)39 flake_url = f"git+file://{git_root}?shallow=1"40 if str(relative_dir) != ".":41 flake_url += f"&dir={relative_dir}"42 else:43 flake_url = f"git+file://{absolute_flake_dir}?shallow=1"44 45> result = subprocess.run(46 [47 "nix",48 "flake",49 "update",50 "--flake",51 flake_url,52 input_name,53 ],54 cwd=str(flake_dir),55 capture_output=True,56 text=True,57 check=True,58 )5960src/update_flake_inputs/flake_service.py:191: 61_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 6263input = None, capture_output = True, timeout = None, check = True64popenargs = (['nix', 'flake', 'update', '--flake', 'git+file:///build/tmpo8pay92y?shallow=1', 'flake-utils'],)65kwargs = {'cwd': '/build/tmpo8pay92y', 'text': True, 'stdout': -1, 'stderr': -1}6667 def run(*popenargs,68 input=None, capture_output=False, timeout=None, check=False, **kwargs):69 """Run command with arguments and return a CompletedProcess instance.70 71 The returned instance will have attributes args, returncode, stdout and72 stderr. By default, stdout and stderr are not captured, and those attributes73 will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,74 or pass capture_output=True to capture both.75 76 If check is True and the exit code was non-zero, it raises a77 CalledProcessError. The CalledProcessError object will have the return code78 in the returncode attribute, and output & stderr attributes if those streams79 were captured.80 81 If timeout (seconds) is given and the process takes too long,82 a TimeoutExpired exception will be raised.83 84 There is an optional argument "input", allowing you to85 pass bytes or a string to the subprocess's stdin. If you use this argument86 you may not also use the Popen constructor's "stdin" argument, as87 it will be used internally.88 89 By default, all communication is in bytes, and therefore any "input" should90 be bytes, and the stdout and stderr will be bytes. If in text mode, any91 "input" should be a string, and stdout and stderr will be strings decoded92 according to locale encoding, or by "encoding" if set. Text mode is93 triggered by setting any of text, encoding, errors or universal_newlines.94 95 The other arguments are the same as for the Popen constructor.96 """97 if input is not None:98 if kwargs.get('stdin') is not None:99 raise ValueError('stdin and input arguments may not both be used.')100 kwargs['stdin'] = PIPE101 102 if capture_output:103 if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:104 raise ValueError('stdout and stderr arguments may not be used '105 'with capture_output.')106 kwargs['stdout'] = PIPE107 kwargs['stderr'] = PIPE108 109 with Popen(*popenargs, **kwargs) as process:110 try:111 stdout, stderr = process.communicate(input, timeout=timeout)112 except TimeoutExpired as exc:113 process.kill()114 if _mswindows:115 # Windows accumulates the output in a single blocking116 # read() call run on child threads, with the timeout117 # being done in a join() on those threads. communicate()118 # _after_ kill() is required to collect that and add it119 # to the exception.120 exc.stdout, exc.stderr = process.communicate()121 else:122 # POSIX _communicate already populated the output so123 # far into the TimeoutExpired exception.124 process.wait()125 raise126 except: # Including KeyboardInterrupt, communicate handled that.127 process.kill()128 # We don't call process.wait() as .__exit__ does that for us.129 raise130 retcode = process.poll()131 if check and retcode:132> raise CalledProcessError(retcode, process.args,133 output=stdout, stderr=stderr)134E subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/tmpo8pay92y?shallow=1', 'flake-utils']' returned non-zero exit status 1.135136/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py:577: CalledProcessError137138The above exception was the direct cause of the following exception:139140self = <tests.test_flake_service.TestFlakeService object at 0xfffff624fad0>141flake_service = <update_flake_inputs.flake_service.FlakeService object at 0xfffff61e6ea0>142fixtures_path = PosixPath('/build/src/tests/fixtures')143144 @pytest.mark.impure145 def test_update_flake_input(146 self,147 flake_service: FlakeService,148 fixtures_path: Path,149 ) -> None:150 """Test updating a flake input and modifying the lock file."""151 # Create a temporary directory for the test152 with tempfile.TemporaryDirectory() as temp_dir:153 temp_path = Path(temp_dir)154 155 # Copy minimal flake to temp directory156 shutil.copy(157 fixtures_path / "minimal" / "flake.nix",158 temp_path / "flake.nix",159 )160 shutil.copy(161 fixtures_path / "minimal" / "flake.lock",162 temp_path / "flake.lock",163 )164 165 # Initialize git repo in temp directory166 subprocess.run(["git", "init"], cwd=temp_path, check=True)167 subprocess.run(["git", "add", "."], cwd=temp_path, check=True)168 subprocess.run(169 ["git", "commit", "-m", "Initial commit"],170 cwd=temp_path,171 check=True,172 env={173 **os.environ,174 "GIT_AUTHOR_NAME": "Test User",175 "GIT_AUTHOR_EMAIL": "test@example.com",176 "GIT_COMMITTER_NAME": "Test User",177 "GIT_COMMITTER_EMAIL": "test@example.com",178 },179 )180 181 # Get the original lock file content182 original_lock_content = (temp_path / "flake.lock").read_text()183 original_lock = json.loads(original_lock_content)184 original_flake_utils_rev = original_lock["nodes"]["flake-utils"]["locked"]["rev"]185 186 # Update flake-utils input187> flake_service.update_flake_input("flake-utils", "flake.nix", str(temp_path))188189tests/test_flake_service.py:198: 190_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 191192self = <update_flake_inputs.flake_service.FlakeService object at 0xfffff61e6ea0>193input_name = 'flake-utils', flake_file = 'flake.nix'194work_dir = '/build/tmpo8pay92y'195196 def update_flake_input(197 self,198 input_name: str,199 flake_file: str,200 work_dir: str | None = None,201 ) -> None:202 """Update a specific flake input.203 204 Args:205 input_name: Name of the input to update206 flake_file: Path to the flake file207 work_dir: Optional working directory to resolve flake file path from208 209 """210 try:211 logger.info("Updating flake input: %s in %s", input_name, flake_file)212 213 # If work_dir is provided, resolve the flake file relative to it214 absolute_flake_path = Path(work_dir) / flake_file if work_dir else Path(flake_file)215 216 flake_dir = absolute_flake_path.parent or Path()217 absolute_flake_dir = flake_dir.resolve()218 219 # Use a shallow URL because worktrees may not have the full history.220 # For subflakes, nix needs the URL to point to the git root221 # with a dir= parameter rather than the subdirectory directly.222 if work_dir:223 git_root = Path(work_dir).resolve()224 relative_dir = absolute_flake_dir.relative_to(git_root)225 flake_url = f"git+file://{git_root}?shallow=1"226 if str(relative_dir) != ".":227 flake_url += f"&dir={relative_dir}"228 else:229 flake_url = f"git+file://{absolute_flake_dir}?shallow=1"230 231 result = subprocess.run(232 [233 "nix",234 "flake",235 "update",236 "--flake",237 flake_url,238 input_name,239 ],240 cwd=str(flake_dir),241 capture_output=True,242 text=True,243 check=True,244 )245 246 # Check if there was a warning about non-existent input247 if result.stderr and "does not match any input" in result.stderr:248 logger.warning(249 "Failed to update input %s in %s: %s",250 input_name,251 flake_file,252 result.stderr.strip(),253 )254 255 logger.info(256 "Successfully updated flake input: %s in %s",257 input_name,258 flake_file,259 )260 except subprocess.CalledProcessError as e:261 stderr_output = e.stderr.strip() if e.stderr else "No stderr output"262 stdout_output = e.stdout.strip() if e.stdout else "No stdout output"263 logger.exception(264 "Failed to update flake input %s in %s. Exit code: %d\nStdout: %s\nStderr: %s",265 input_name,266 flake_file,267 e.returncode,268 stdout_output,269 stderr_output,270 )271 msg = (272 f"Failed to update flake input {input_name} in {flake_file}: {e}\n"273 f"Stderr: {stderr_output}"274 )275> raise FlakeServiceError(msg) from e276E update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/tmpo8pay92y?shallow=1', 'flake-utils']' returned non-zero exit status 1.277E Stderr: warning: you don't have Internet access; disabling some network-dependent features278E error:279E … while updating the lock file of flake 'git+file:///build/tmpo8pay92y?ref=refs/heads/master&rev=a06b717438afab8c2fd8ebc039a7413ba1e0e7fe&shallow=1'280E 281E … while updating the flake input 'flake-utils'282E 283E … while fetching the input 'github:numtide/flake-utils'284E 285E error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com286287src/update_flake_inputs/flake_service.py:235: FlakeServiceError288----------------------------- Captured stdout call -----------------------------289Initialized empty Git repository in /build/tmpo8pay92y/.git/290[master (root-commit) a06b717] Initial commit291 2 files changed, 55 insertions(+)292 create mode 100644 flake.lock293 create mode 100644 flake.nix294----------------------------- Captured stderr call -----------------------------295hint: Using 'master' as the name for the initial branch. This default branch name296hint: will change to "main" in Git 3.0. To configure the initial branch name297hint: to use in all of your new repositories, which will suppress this warning,298hint: call:299hint:300hint: git config --global init.defaultBranch <name>301hint:302hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and303hint: 'development'. The just-created branch can be renamed via this command:304hint:305hint: git branch -m <name>306hint:307hint: Disable this message with "git config set advice.defaultBranchName false"308------------------------------ Captured log call -------------------------------309ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 1310Stdout: No stdout output311Stderr: warning: you don't have Internet access; disabling some network-dependent features312error:313 … while updating the lock file of flake 'git+file:///build/tmpo8pay92y?ref=refs/heads/master&rev=a06b717438afab8c2fd8ebc039a7413ba1e0e7fe&shallow=1'314315 … while updating the flake input 'flake-utils'316317 … while fetching the input 'github:numtide/flake-utils'318319 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com320Traceback (most recent call last):321 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input322 result = subprocess.run(323 [324 ...<10 lines>...325 check=True,326 )327 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run328 raise CalledProcessError(retcode, process.args,329 output=stdout, stderr=stderr)330subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/tmpo8pay92y?shallow=1', 'flake-utils']' returned non-zero exit status 1.331_________________ TestFlakeService.test_update_subflake_input __________________332333self = <update_flake_inputs.flake_service.FlakeService object at 0xfffff54357f0>334input_name = 'flake-utils', flake_file = 'flake.nix'335work_dir = '/build/tmpxf1dsdj0'336337 def update_flake_input(338 self,339 input_name: str,340 flake_file: str,341 work_dir: str | None = None,342 ) -> None:343 """Update a specific flake input.344 345 Args:346 input_name: Name of the input to update347 flake_file: Path to the flake file348 work_dir: Optional working directory to resolve flake file path from349 350 """351 try:352 logger.info("Updating flake input: %s in %s", input_name, flake_file)353 354 # If work_dir is provided, resolve the flake file relative to it355 absolute_flake_path = Path(work_dir) / flake_file if work_dir else Path(flake_file)356 357 flake_dir = absolute_flake_path.parent or Path()358 absolute_flake_dir = flake_dir.resolve()359 360 # Use a shallow URL because worktrees may not have the full history.361 # For subflakes, nix needs the URL to point to the git root362 # with a dir= parameter rather than the subdirectory directly.363 if work_dir:364 git_root = Path(work_dir).resolve()365 relative_dir = absolute_flake_dir.relative_to(git_root)366 flake_url = f"git+file://{git_root}?shallow=1"367 if str(relative_dir) != ".":368 flake_url += f"&dir={relative_dir}"369 else:370 flake_url = f"git+file://{absolute_flake_dir}?shallow=1"371 372> result = subprocess.run(373 [374 "nix",375 "flake",376 "update",377 "--flake",378 flake_url,379 input_name,380 ],381 cwd=str(flake_dir),382 capture_output=True,383 text=True,384 check=True,385 )386387src/update_flake_inputs/flake_service.py:191: 388_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 389390input = None, capture_output = True, timeout = None, check = True391popenargs = (['nix', 'flake', 'update', '--flake', 'git+file:///build/tmpxf1dsdj0?shallow=1', 'flake-utils'],)392kwargs = {'cwd': '/build/tmpxf1dsdj0', 'text': True, 'stdout': -1, 'stderr': -1}393394 def run(*popenargs,395 input=None, capture_output=False, timeout=None, check=False, **kwargs):396 """Run command with arguments and return a CompletedProcess instance.397 398 The returned instance will have attributes args, returncode, stdout and399 stderr. By default, stdout and stderr are not captured, and those attributes400 will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,401 or pass capture_output=True to capture both.402 403 If check is True and the exit code was non-zero, it raises a404 CalledProcessError. The CalledProcessError object will have the return code405 in the returncode attribute, and output & stderr attributes if those streams406 were captured.407 408 If timeout (seconds) is given and the process takes too long,409 a TimeoutExpired exception will be raised.410 411 There is an optional argument "input", allowing you to412 pass bytes or a string to the subprocess's stdin. If you use this argument413 you may not also use the Popen constructor's "stdin" argument, as414 it will be used internally.415 416 By default, all communication is in bytes, and therefore any "input" should417 be bytes, and the stdout and stderr will be bytes. If in text mode, any418 "input" should be a string, and stdout and stderr will be strings decoded419 according to locale encoding, or by "encoding" if set. Text mode is420 triggered by setting any of text, encoding, errors or universal_newlines.421 422 The other arguments are the same as for the Popen constructor.423 """424 if input is not None:425 if kwargs.get('stdin') is not None:426 raise ValueError('stdin and input arguments may not both be used.')427 kwargs['stdin'] = PIPE428 429 if capture_output:430 if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:431 raise ValueError('stdout and stderr arguments may not be used '432 'with capture_output.')433 kwargs['stdout'] = PIPE434 kwargs['stderr'] = PIPE435 436 with Popen(*popenargs, **kwargs) as process:437 try:438 stdout, stderr = process.communicate(input, timeout=timeout)439 except TimeoutExpired as exc:440 process.kill()441 if _mswindows:442 # Windows accumulates the output in a single blocking443 # read() call run on child threads, with the timeout444 # being done in a join() on those threads. communicate()445 # _after_ kill() is required to collect that and add it446 # to the exception.447 exc.stdout, exc.stderr = process.communicate()448 else:449 # POSIX _communicate already populated the output so450 # far into the TimeoutExpired exception.451 process.wait()452 raise453 except: # Including KeyboardInterrupt, communicate handled that.454 process.kill()455 # We don't call process.wait() as .__exit__ does that for us.456 raise457 retcode = process.poll()458 if check and retcode:459> raise CalledProcessError(retcode, process.args,460 output=stdout, stderr=stderr)461E subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/tmpxf1dsdj0?shallow=1', 'flake-utils']' returned non-zero exit status 1.462463/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py:577: CalledProcessError464465The above exception was the direct cause of the following exception:466467self = <tests.test_flake_service.TestFlakeService object at 0xfffff6279d00>468flake_service = <update_flake_inputs.flake_service.FlakeService object at 0xfffff54357f0>469fixtures_path = PosixPath('/build/src/tests/fixtures')470471 @pytest.mark.impure472 def test_update_subflake_input(473 self,474 flake_service: FlakeService,475 fixtures_path: Path,476 ) -> None:477 """Test updating a flake input in a subdirectory (subflake)."""478 with tempfile.TemporaryDirectory() as temp_dir:479 temp_path = Path(temp_dir)480 481 # Copy minimal flake to a subdirectory482 sub_dir = temp_path / "sub"483 sub_dir.mkdir()484 shutil.copy(485 fixtures_path / "minimal" / "flake.nix",486 sub_dir / "flake.nix",487 )488 shutil.copy(489 fixtures_path / "minimal" / "flake.lock",490 sub_dir / "flake.lock",491 )492 493 # Copy minimal flake to root494 shutil.copy(495 fixtures_path / "minimal" / "flake.nix",496 temp_path / "flake.nix",497 )498 shutil.copy(499 fixtures_path / "minimal" / "flake.lock",500 temp_path / "flake.lock",501 )502 503 # Initialize git repo in temp directory504 subprocess.run(["git", "init"], cwd=temp_path, check=True)505 subprocess.run(["git", "add", "."], cwd=temp_path, check=True)506 subprocess.run(507 ["git", "commit", "-m", "Initial commit"],508 cwd=temp_path,509 check=True,510 env={511 **os.environ,512 "GIT_AUTHOR_NAME": "Test User",513 "GIT_AUTHOR_EMAIL": "test@example.com",514 "GIT_COMMITTER_NAME": "Test User",515 "GIT_COMMITTER_EMAIL": "test@example.com",516 },517 )518 519 original_root_lock = json.loads((temp_path / "flake.lock").read_text())520 original_root_rev = original_root_lock["nodes"]["flake-utils"]["locked"]["rev"]521 522 original_sub_lock = json.loads((sub_dir / "flake.lock").read_text())523 original_sub_rev = original_sub_lock["nodes"]["flake-utils"]["locked"]["rev"]524 525 # Update flake-utils in the root flake526> flake_service.update_flake_input("flake-utils", "flake.nix", str(temp_path))527528tests/test_flake_service.py:272: 529_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 530531self = <update_flake_inputs.flake_service.FlakeService object at 0xfffff54357f0>532input_name = 'flake-utils', flake_file = 'flake.nix'533work_dir = '/build/tmpxf1dsdj0'534535 def update_flake_input(536 self,537 input_name: str,538 flake_file: str,539 work_dir: str | None = None,540 ) -> None:541 """Update a specific flake input.542 543 Args:544 input_name: Name of the input to update545 flake_file: Path to the flake file546 work_dir: Optional working directory to resolve flake file path from547 548 """549 try:550 logger.info("Updating flake input: %s in %s", input_name, flake_file)551 552 # If work_dir is provided, resolve the flake file relative to it553 absolute_flake_path = Path(work_dir) / flake_file if work_dir else Path(flake_file)554 555 flake_dir = absolute_flake_path.parent or Path()556 absolute_flake_dir = flake_dir.resolve()557 558 # Use a shallow URL because worktrees may not have the full history.559 # For subflakes, nix needs the URL to point to the git root560 # with a dir= parameter rather than the subdirectory directly.561 if work_dir:562 git_root = Path(work_dir).resolve()563 relative_dir = absolute_flake_dir.relative_to(git_root)564 flake_url = f"git+file://{git_root}?shallow=1"565 if str(relative_dir) != ".":566 flake_url += f"&dir={relative_dir}"567 else:568 flake_url = f"git+file://{absolute_flake_dir}?shallow=1"569 570 result = subprocess.run(571 [572 "nix",573 "flake",574 "update",575 "--flake",576 flake_url,577 input_name,578 ],579 cwd=str(flake_dir),580 capture_output=True,581 text=True,582 check=True,583 )584 585 # Check if there was a warning about non-existent input586 if result.stderr and "does not match any input" in result.stderr:587 logger.warning(588 "Failed to update input %s in %s: %s",589 input_name,590 flake_file,591 result.stderr.strip(),592 )593 594 logger.info(595 "Successfully updated flake input: %s in %s",596 input_name,597 flake_file,598 )599 except subprocess.CalledProcessError as e:600 stderr_output = e.stderr.strip() if e.stderr else "No stderr output"601 stdout_output = e.stdout.strip() if e.stdout else "No stdout output"602 logger.exception(603 "Failed to update flake input %s in %s. Exit code: %d\nStdout: %s\nStderr: %s",604 input_name,605 flake_file,606 e.returncode,607 stdout_output,608 stderr_output,609 )610 msg = (611 f"Failed to update flake input {input_name} in {flake_file}: {e}\n"612 f"Stderr: {stderr_output}"613 )614> raise FlakeServiceError(msg) from e615E update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/tmpxf1dsdj0?shallow=1', 'flake-utils']' returned non-zero exit status 1.616E Stderr: warning: you don't have Internet access; disabling some network-dependent features617E error:618E … while updating the lock file of flake 'git+file:///build/tmpxf1dsdj0?ref=refs/heads/master&rev=eeab9c36e4295a8c4b11d49d7926b88643ec451c&shallow=1'619E 620E … while updating the flake input 'flake-utils'621E 622E … while fetching the input 'github:numtide/flake-utils'623E 624E error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com625626src/update_flake_inputs/flake_service.py:235: FlakeServiceError627----------------------------- Captured stdout call -----------------------------628Initialized empty Git repository in /build/tmpxf1dsdj0/.git/629[master (root-commit) eeab9c3] Initial commit630 4 files changed, 110 insertions(+)631 create mode 100644 flake.lock632 create mode 100644 flake.nix633 create mode 100644 sub/flake.lock634 create mode 100644 sub/flake.nix635----------------------------- Captured stderr call -----------------------------636hint: Using 'master' as the name for the initial branch. This default branch name637hint: will change to "main" in Git 3.0. To configure the initial branch name638hint: to use in all of your new repositories, which will suppress this warning,639hint: call:640hint:641hint: git config --global init.defaultBranch <name>642hint:643hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and644hint: 'development'. The just-created branch can be renamed via this command:645hint:646hint: git branch -m <name>647hint:648hint: Disable this message with "git config set advice.defaultBranchName false"649------------------------------ Captured log call -------------------------------650ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 1651Stdout: No stdout output652Stderr: warning: you don't have Internet access; disabling some network-dependent features653error:654 … while updating the lock file of flake 'git+file:///build/tmpxf1dsdj0?ref=refs/heads/master&rev=eeab9c36e4295a8c4b11d49d7926b88643ec451c&shallow=1'655656 … while updating the flake input 'flake-utils'657658 … while fetching the input 'github:numtide/flake-utils'659660 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com661Traceback (most recent call last):662 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input663 result = subprocess.run(664 [665 ...<10 lines>...666 check=True,667 )668 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run669 raise CalledProcessError(retcode, process.args,670 output=stdout, stderr=stderr)671subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/tmpxf1dsdj0?shallow=1', 'flake-utils']' returned non-zero exit status 1.672___________ TestProcessFlakeUpdates.test_with_updatable_flake_input ____________673674self = <tests.test_process_flake_updates.TestProcessFlakeUpdates object at 0xfffff5ea1a90>675tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_with_updatable_flake_inpu0')676fixtures_path = PosixPath('/build/src/tests/fixtures')677678 @pytest.mark.impure679 def test_with_updatable_flake_input(680 self,681 tmp_path: Path,682 fixtures_path: Path,683 ) -> None:684 """Test PR creation when flake input has available updates."""685 # Create a flake with flake-utils that can be updated686 flake_content = """{687 inputs = {688 flake-utils.url = "github:numtide/flake-utils";689 };690 691 outputs = { self, flake-utils }: {692 # Test flake with updatable input693 };694 }"""695 696 (tmp_path / "flake.nix").write_text(flake_content)697 698 # Copy old lock file from minimal fixture699 shutil.copy(700 fixtures_path / "minimal" / "flake.lock",701 tmp_path / "flake.lock",702 )703 704 _setup_git_repo(tmp_path)705 706 # Change to test directory707 original_cwd = Path.cwd()708 os.chdir(tmp_path)709 710 try:711 # Create test services712 flake_service = FlakeService()713 test_gitea_service = MockGiteaService()714 715 # Process updates716> process_flake_updates(717 flake_service,718 test_gitea_service,719 "",720 "main",721 "",722 auto_merge=False,723 )724725tests/test_process_flake_updates.py:222: 726_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 727728flake_service = <update_flake_inputs.flake_service.FlakeService object at 0xfffff5e42950>729gitea_service = MockGiteaService(api_url='https://gitea.example.com', token='test-token', owner='test-owner', repo='test-repo', git_au...tions[bot]', git_committer_email='gitea-actions[bot]@noreply.gitea.io', merge_style='default', pr_creation_attempts=[])730exclude_patterns = '', base_branch = 'main', branch_suffix = ''731auto_merge = False732733 def process_flake_updates( # noqa: PLR0913734 flake_service: FlakeService,735 gitea_service: GiteaService,736 exclude_patterns: str,737 base_branch: str,738 branch_suffix: str,739 *,740 auto_merge: bool,741 ) -> None:742 """Process all flake updates.743 744 Args:745 flake_service: Flake service instance746 gitea_service: Gitea service instance747 exclude_patterns: Patterns to exclude748 base_branch: Base branch for PRs749 branch_suffix: Optional suffix to append to branch names750 auto_merge: Whether to automatically merge PRs751 752 """753 # Discover flake files754 flakes = flake_service.discover_flake_files(exclude_patterns)755 if not flakes:756 logger.info("No flake files found")757 return758 759 logger.info("Found %d flake files to process", len(flakes))760 761 failed_inputs: list[str] = []762 763 # Process each flake764 for flake in flakes:765 logger.info("Processing flake: %s", flake.file_path)766 logger.info("Inputs to update: %s", ", ".join(flake.inputs))767 768 # Don't include '.' for root directory769 parent_path = Path(flake.file_path).parent770 parent_suffix = "" if parent_path == Path() else f" in {parent_path}"771 parent_branch = "" if parent_path == Path() else f"-{parent_path}"772 suffix = branch_suffix.strip().replace("/", "-").strip("-")773 774 # Update each input775 for input_name in flake.inputs:776 try:777 branch_name = f"update{parent_branch}-{input_name}"778 branch_name = branch_name.replace("/", "-").strip("-")779 if suffix:780 branch_name = f"{branch_name}-{suffix}"781 782 logger.info(783 "Updating input %s in %s (branch: %s)",784 input_name,785 flake.file_path,786 branch_name,787 )788 789 # Create worktree and update input790 with gitea_service.worktree(branch_name, base_branch) as worktree_path:791 # Update the input792 flake_service.update_flake_input(793 input_name,794 flake.file_path,795 str(worktree_path),796 )797 798 # Commit changes799 commit_message = f"Update {input_name}{parent_suffix}"800 if gitea_service.commit_changes(801 branch_name,802 commit_message,803 worktree_path,804 ):805 # Create pull request806 pr_title = commit_message807 pr_body = (808 f"This PR updates the `{input_name}` input "809 f"in `{flake.file_path}`.\n\n"810 "Generated by update-flake-inputs action."811 )812 gitea_service.create_pull_request(813 branch_name,814 base_branch,815 pr_title,816 pr_body,817 auto_merge=auto_merge,818 )819 else:820 logger.info(821 "No changes for input %s in %s",822 input_name,823 flake.file_path,824 )825 gitea_service.delete_branch(branch_name)826 827 except Exception:828 logger.exception(829 "Failed to update input %s in %s",830 input_name,831 flake.file_path,832 )833 failed_inputs.append(f"{input_name} in {flake.file_path}")834 835 if failed_inputs:836 msg = f"Failed to process {len(failed_inputs)} input(s): {', '.join(failed_inputs)}"837> raise UpdateFlakeInputsError(msg)838E update_flake_inputs.exceptions.UpdateFlakeInputsError: Failed to process 1 input(s): flake-utils in flake.nix839840src/update_flake_inputs/cli.py:268: UpdateFlakeInputsError841----------------------------- Captured stdout call -----------------------------842Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/test_with_updatable_flake_inpu0/.git/843[main (root-commit) 3880daf] Initial commit844 2 files changed, 53 insertions(+)845 create mode 100644 flake.lock846 create mode 100644 flake.nix847Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/remote-test_with_updatable_flake_inpu0.git/848branch 'main' set up to track 'origin/main'.849branch 'update-flake-utils' set up to track 'origin/main'.850HEAD is now at 3880daf Initial commit851----------------------------- Captured stderr call -----------------------------852hint: Using 'master' as the name for the initial branch. This default branch name853hint: will change to "main" in Git 3.0. To configure the initial branch name854hint: to use in all of your new repositories, which will suppress this warning,855hint: call:856hint:857hint: git config --global init.defaultBranch <name>858hint:859hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and860hint: 'development'. The just-created branch can be renamed via this command:861hint:862hint: git branch -m <name>863hint:864hint: Disable this message with "git config set advice.defaultBranchName false"865To /build/pytest-of-nixbld/pytest-0/remote-test_with_updatable_flake_inpu0.git866 * [new branch] main -> main867From /build/pytest-of-nixbld/pytest-0/remote-test_with_updatable_flake_inpu0868 * branch main -> FETCH_HEAD869Preparing worktree (new branch 'update-flake-utils')870------------------------------ Captured log call -------------------------------871ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 1872Stdout: No stdout output873Stderr: warning: you don't have Internet access; disabling some network-dependent features874error:875 … while updating the lock file of flake 'git+file:///build/flake-update-nof6zfma/update-flake-utils?ref=refs/heads/update-flake-utils&rev=3880daf23563d2433a7518c4ee62d1b7501f42b2&shallow=1'876877 … while updating the flake input 'flake-utils'878879 … while fetching the input 'github:numtide/flake-utils'880881 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com882Traceback (most recent call last):883 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input884 result = subprocess.run(885 [886 ...<10 lines>...887 check=True,888 )889 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run890 raise CalledProcessError(retcode, process.args,891 output=stdout, stderr=stderr)892subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-nof6zfma/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.893ERROR update_flake_inputs.cli:cli.py:259 Failed to update input flake-utils in flake.nix894Traceback (most recent call last):895 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input896 result = subprocess.run(897 [898 ...<10 lines>...899 check=True,900 )901 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run902 raise CalledProcessError(retcode, process.args,903 output=stdout, stderr=stderr)904subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-nof6zfma/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.905906The above exception was the direct cause of the following exception:907908Traceback (most recent call last):909 File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates910 flake_service.update_flake_input(911 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^912 input_name,913 ^^^^^^^^^^^914 flake.file_path,915 ^^^^^^^^^^^^^^^^916 str(worktree_path),917 ^^^^^^^^^^^^^^^^^^^918 )919 ^920 File "/build/src/src/update_flake_inputs/flake_service.py", line 235, in update_flake_input921 raise FlakeServiceError(msg) from e922update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-nof6zfma/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.923Stderr: warning: you don't have Internet access; disabling some network-dependent features924error:925 … while updating the lock file of flake 'git+file:///build/flake-update-nof6zfma/update-flake-utils?ref=refs/heads/update-flake-utils&rev=3880daf23563d2433a7518c4ee62d1b7501f42b2&shallow=1'926927 … while updating the flake input 'flake-utils'928929 … while fetching the input 'github:numtide/flake-utils'930931 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com932_____ TestProcessFlakeUpdates.test_worktree_based_on_base_branch_not_head ______933934self = <tests.test_process_flake_updates.TestProcessFlakeUpdates object at 0xfffff5f8a650>935tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_worktree_based_on_base_br0')936fixtures_path = PosixPath('/build/src/tests/fixtures')937938 @pytest.mark.impure939 def test_worktree_based_on_base_branch_not_head(940 self,941 tmp_path: Path,942 fixtures_path: Path,943 ) -> None:944 """Test that update branches are based on base_branch, not current HEAD.945 946 When the action is triggered from a non-main branch, the worktree947 should still be based on origin/<base_branch> so that commits from948 the triggering branch don't leak into the update branch.949 """950 flake_content = """{951 inputs = {952 flake-utils.url = "github:numtide/flake-utils";953 };954 955 outputs = { self, flake-utils }: {956 # Test flake with updatable input957 };958 }"""959 960 (tmp_path / "flake.nix").write_text(flake_content)961 962 shutil.copy(963 fixtures_path / "minimal" / "flake.lock",964 tmp_path / "flake.lock",965 )966 967 _setup_git_repo(tmp_path)968 969 # Create a feature branch with an extra commit970 git_env = {971 **os.environ,972 "GIT_AUTHOR_NAME": "Test User",973 "GIT_AUTHOR_EMAIL": "test@example.com",974 "GIT_COMMITTER_NAME": "Test User",975 "GIT_COMMITTER_EMAIL": "test@example.com",976 }977 subprocess.run(978 ["git", "checkout", "-b", "feature-branch"],979 cwd=tmp_path,980 check=True,981 )982 (tmp_path / "extra-file.txt").write_text("feature branch content")983 subprocess.run(["git", "add", "."], cwd=tmp_path, check=True)984 subprocess.run(985 ["git", "commit", "-m", "Feature branch commit"],986 cwd=tmp_path,987 check=True,988 env=git_env,989 )990 991 # Stay on feature-branch (simulating action triggered from non-main branch)992 original_cwd = Path.cwd()993 os.chdir(tmp_path)994 995 try:996 flake_service = FlakeService()997 test_gitea_service = MockGiteaService()998 999> process_flake_updates(1000 flake_service,1001 test_gitea_service,1002 "",1003 "main",1004 "",1005 auto_merge=False,1006 )10071008tests/test_process_flake_updates.py:328: 1009_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 10101011flake_service = <update_flake_inputs.flake_service.FlakeService object at 0xfffff5ec5550>1012gitea_service = MockGiteaService(api_url='https://gitea.example.com', token='test-token', owner='test-owner', repo='test-repo', git_au...tions[bot]', git_committer_email='gitea-actions[bot]@noreply.gitea.io', merge_style='default', pr_creation_attempts=[])1013exclude_patterns = '', base_branch = 'main', branch_suffix = ''1014auto_merge = False10151016 def process_flake_updates( # noqa: PLR09131017 flake_service: FlakeService,1018 gitea_service: GiteaService,1019 exclude_patterns: str,1020 base_branch: str,1021 branch_suffix: str,1022 *,1023 auto_merge: bool,1024 ) -> None:1025 """Process all flake updates.1026 1027 Args:1028 flake_service: Flake service instance1029 gitea_service: Gitea service instance1030 exclude_patterns: Patterns to exclude1031 base_branch: Base branch for PRs1032 branch_suffix: Optional suffix to append to branch names1033 auto_merge: Whether to automatically merge PRs1034 1035 """1036 # Discover flake files1037 flakes = flake_service.discover_flake_files(exclude_patterns)1038 if not flakes:1039 logger.info("No flake files found")1040 return1041 1042 logger.info("Found %d flake files to process", len(flakes))1043 1044 failed_inputs: list[str] = []1045 1046 # Process each flake1047 for flake in flakes:1048 logger.info("Processing flake: %s", flake.file_path)1049 logger.info("Inputs to update: %s", ", ".join(flake.inputs))1050 1051 # Don't include '.' for root directory1052 parent_path = Path(flake.file_path).parent1053 parent_suffix = "" if parent_path == Path() else f" in {parent_path}"1054 parent_branch = "" if parent_path == Path() else f"-{parent_path}"1055 suffix = branch_suffix.strip().replace("/", "-").strip("-")1056 1057 # Update each input1058 for input_name in flake.inputs:1059 try:1060 branch_name = f"update{parent_branch}-{input_name}"1061 branch_name = branch_name.replace("/", "-").strip("-")1062 if suffix:1063 branch_name = f"{branch_name}-{suffix}"1064 1065 logger.info(1066 "Updating input %s in %s (branch: %s)",1067 input_name,1068 flake.file_path,1069 branch_name,1070 )1071 1072 # Create worktree and update input1073 with gitea_service.worktree(branch_name, base_branch) as worktree_path:1074 # Update the input1075 flake_service.update_flake_input(1076 input_name,1077 flake.file_path,1078 str(worktree_path),1079 )1080 1081 # Commit changes1082 commit_message = f"Update {input_name}{parent_suffix}"1083 if gitea_service.commit_changes(1084 branch_name,1085 commit_message,1086 worktree_path,1087 ):1088 # Create pull request1089 pr_title = commit_message1090 pr_body = (1091 f"This PR updates the `{input_name}` input "1092 f"in `{flake.file_path}`.\n\n"1093 "Generated by update-flake-inputs action."1094 )1095 gitea_service.create_pull_request(1096 branch_name,1097 base_branch,1098 pr_title,1099 pr_body,1100 auto_merge=auto_merge,1101 )1102 else:1103 logger.info(1104 "No changes for input %s in %s",1105 input_name,1106 flake.file_path,1107 )1108 gitea_service.delete_branch(branch_name)1109 1110 except Exception:1111 logger.exception(1112 "Failed to update input %s in %s",1113 input_name,1114 flake.file_path,1115 )1116 failed_inputs.append(f"{input_name} in {flake.file_path}")1117 1118 if failed_inputs:1119 msg = f"Failed to process {len(failed_inputs)} input(s): {', '.join(failed_inputs)}"1120> raise UpdateFlakeInputsError(msg)1121E update_flake_inputs.exceptions.UpdateFlakeInputsError: Failed to process 1 input(s): flake-utils in flake.nix11221123src/update_flake_inputs/cli.py:268: UpdateFlakeInputsError1124----------------------------- Captured stdout call -----------------------------1125Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/test_worktree_based_on_base_br0/.git/1126[main (root-commit) ba7db37] Initial commit1127 2 files changed, 53 insertions(+)1128 create mode 100644 flake.lock1129 create mode 100644 flake.nix1130Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/remote-test_worktree_based_on_base_br0.git/1131branch 'main' set up to track 'origin/main'.1132[feature-branch 4f04e64] Feature branch commit1133 1 file changed, 1 insertion(+)1134 create mode 100644 extra-file.txt1135branch 'update-flake-utils' set up to track 'origin/main'.1136HEAD is now at ba7db37 Initial commit1137----------------------------- Captured stderr call -----------------------------1138hint: Using 'master' as the name for the initial branch. This default branch name1139hint: will change to "main" in Git 3.0. To configure the initial branch name1140hint: to use in all of your new repositories, which will suppress this warning,1141hint: call:1142hint:1143hint: git config --global init.defaultBranch <name>1144hint:1145hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and1146hint: 'development'. The just-created branch can be renamed via this command:1147hint:1148hint: git branch -m <name>1149hint:1150hint: Disable this message with "git config set advice.defaultBranchName false"1151To /build/pytest-of-nixbld/pytest-0/remote-test_worktree_based_on_base_br0.git1152 * [new branch] main -> main1153Switched to a new branch 'feature-branch'1154From /build/pytest-of-nixbld/pytest-0/remote-test_worktree_based_on_base_br01155 * branch main -> FETCH_HEAD1156Preparing worktree (new branch 'update-flake-utils')1157------------------------------ Captured log call -------------------------------1158ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 11159Stdout: No stdout output1160Stderr: warning: you don't have Internet access; disabling some network-dependent features1161error:1162 … while updating the lock file of flake 'git+file:///build/flake-update-5jbjydzf/update-flake-utils?ref=refs/heads/update-flake-utils&rev=ba7db37b981883dba73731c7b7d931c1ab501712&shallow=1'11631164 … while updating the flake input 'flake-utils'11651166 … while fetching the input 'github:numtide/flake-utils'11671168 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com1169Traceback (most recent call last):1170 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input1171 result = subprocess.run(1172 [1173 ...<10 lines>...1174 check=True,1175 )1176 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run1177 raise CalledProcessError(retcode, process.args,1178 output=stdout, stderr=stderr)1179subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-5jbjydzf/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.1180ERROR update_flake_inputs.cli:cli.py:259 Failed to update input flake-utils in flake.nix1181Traceback (most recent call last):1182 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input1183 result = subprocess.run(1184 [1185 ...<10 lines>...1186 check=True,1187 )1188 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run1189 raise CalledProcessError(retcode, process.args,1190 output=stdout, stderr=stderr)1191subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-5jbjydzf/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.11921193The above exception was the direct cause of the following exception:11941195Traceback (most recent call last):1196 File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates1197 flake_service.update_flake_input(1198 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^1199 input_name,1200 ^^^^^^^^^^^1201 flake.file_path,1202 ^^^^^^^^^^^^^^^^1203 str(worktree_path),1204 ^^^^^^^^^^^^^^^^^^^1205 )1206 ^1207 File "/build/src/src/update_flake_inputs/flake_service.py", line 235, in update_flake_input1208 raise FlakeServiceError(msg) from e1209update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-5jbjydzf/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.1210Stderr: warning: you don't have Internet access; disabling some network-dependent features1211error:1212 … while updating the lock file of flake 'git+file:///build/flake-update-5jbjydzf/update-flake-utils?ref=refs/heads/update-flake-utils&rev=ba7db37b981883dba73731c7b7d931c1ab501712&shallow=1'12131214 … while updating the flake input 'flake-utils'12151216 … while fetching the input 'github:numtide/flake-utils'12171218 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com1219___________ TestProcessFlakeUpdates.test_custom_git_author_committer ___________12201221self = <tests.test_process_flake_updates.TestProcessFlakeUpdates object at 0xfffff5f8a9e0>1222tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_custom_git_author_committ0')1223fixtures_path = PosixPath('/build/src/tests/fixtures')12241225 @pytest.mark.impure1226 def test_custom_git_author_committer(1227 self,1228 tmp_path: Path,1229 fixtures_path: Path,1230 ) -> None:1231 """Test that custom git author/committer configuration is used."""1232 # Create a flake with flake-utils1233 flake_content = """{1234 inputs = {1235 flake-utils.url = "github:numtide/flake-utils";1236 };1237 1238 outputs = { self, flake-utils }: {1239 # Test flake1240 };1241 }"""1242 1243 (tmp_path / "flake.nix").write_text(flake_content)1244 1245 # Copy old lock file from minimal fixture1246 shutil.copy(1247 fixtures_path / "minimal" / "flake.lock",1248 tmp_path / "flake.lock",1249 )1250 1251 _setup_git_repo(tmp_path)1252 1253 # Change to test directory1254 original_cwd = Path.cwd()1255 os.chdir(tmp_path)1256 1257 try:1258 # Create test services with custom git author/committer1259 flake_service = FlakeService()1260 test_gitea_service = MockGiteaService()1261 test_gitea_service.git_author_name = "Custom Bot"1262 test_gitea_service.git_author_email = "custom@bot.com"1263 test_gitea_service.git_committer_name = "Custom Committer"1264 test_gitea_service.git_committer_email = "committer@bot.com"1265 1266 # Process updates1267> process_flake_updates(1268 flake_service,1269 test_gitea_service,1270 "",1271 "main",1272 "",1273 auto_merge=False,1274 )12751276tests/test_process_flake_updates.py:398: 1277_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 12781279flake_service = <update_flake_inputs.flake_service.FlakeService object at 0xfffff629d9a0>1280gitea_service = MockGiteaService(api_url='https://gitea.example.com', token='test-token', owner='test-owner', repo='test-repo', git_au...itter_name='Custom Committer', git_committer_email='committer@bot.com', merge_style='default', pr_creation_attempts=[])1281exclude_patterns = '', base_branch = 'main', branch_suffix = ''1282auto_merge = False12831284 def process_flake_updates( # noqa: PLR09131285 flake_service: FlakeService,1286 gitea_service: GiteaService,1287 exclude_patterns: str,1288 base_branch: str,1289 branch_suffix: str,1290 *,1291 auto_merge: bool,1292 ) -> None:1293 """Process all flake updates.1294 1295 Args:1296 flake_service: Flake service instance1297 gitea_service: Gitea service instance1298 exclude_patterns: Patterns to exclude1299 base_branch: Base branch for PRs1300 branch_suffix: Optional suffix to append to branch names1301 auto_merge: Whether to automatically merge PRs1302 1303 """1304 # Discover flake files1305 flakes = flake_service.discover_flake_files(exclude_patterns)1306 if not flakes:1307 logger.info("No flake files found")1308 return1309 1310 logger.info("Found %d flake files to process", len(flakes))1311 1312 failed_inputs: list[str] = []1313 1314 # Process each flake1315 for flake in flakes:1316 logger.info("Processing flake: %s", flake.file_path)1317 logger.info("Inputs to update: %s", ", ".join(flake.inputs))1318 1319 # Don't include '.' for root directory1320 parent_path = Path(flake.file_path).parent1321 parent_suffix = "" if parent_path == Path() else f" in {parent_path}"1322 parent_branch = "" if parent_path == Path() else f"-{parent_path}"1323 suffix = branch_suffix.strip().replace("/", "-").strip("-")1324 1325 # Update each input1326 for input_name in flake.inputs:1327 try:1328 branch_name = f"update{parent_branch}-{input_name}"1329 branch_name = branch_name.replace("/", "-").strip("-")1330 if suffix:1331 branch_name = f"{branch_name}-{suffix}"1332 1333 logger.info(1334 "Updating input %s in %s (branch: %s)",1335 input_name,1336 flake.file_path,1337 branch_name,1338 )1339 1340 # Create worktree and update input1341 with gitea_service.worktree(branch_name, base_branch) as worktree_path:1342 # Update the input1343 flake_service.update_flake_input(1344 input_name,1345 flake.file_path,1346 str(worktree_path),1347 )1348 1349 # Commit changes1350 commit_message = f"Update {input_name}{parent_suffix}"1351 if gitea_service.commit_changes(1352 branch_name,1353 commit_message,1354 worktree_path,1355 ):1356 # Create pull request1357 pr_title = commit_message1358 pr_body = (1359 f"This PR updates the `{input_name}` input "1360 f"in `{flake.file_path}`.\n\n"1361 "Generated by update-flake-inputs action."1362 )1363 gitea_service.create_pull_request(1364 branch_name,1365 base_branch,1366 pr_title,1367 pr_body,1368 auto_merge=auto_merge,1369 )1370 else:1371 logger.info(1372 "No changes for input %s in %s",1373 input_name,1374 flake.file_path,1375 )1376 gitea_service.delete_branch(branch_name)1377 1378 except Exception:1379 logger.exception(1380 "Failed to update input %s in %s",1381 input_name,1382 flake.file_path,1383 )1384 failed_inputs.append(f"{input_name} in {flake.file_path}")1385 1386 if failed_inputs:1387 msg = f"Failed to process {len(failed_inputs)} input(s): {', '.join(failed_inputs)}"1388> raise UpdateFlakeInputsError(msg)1389E update_flake_inputs.exceptions.UpdateFlakeInputsError: Failed to process 1 input(s): flake-utils in flake.nix13901391src/update_flake_inputs/cli.py:268: UpdateFlakeInputsError1392----------------------------- Captured stdout call -----------------------------1393Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/test_custom_git_author_committ0/.git/1394[main (root-commit) 5b291b5] Initial commit1395 2 files changed, 53 insertions(+)1396 create mode 100644 flake.lock1397 create mode 100644 flake.nix1398Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/remote-test_custom_git_author_committ0.git/1399branch 'main' set up to track 'origin/main'.1400branch 'update-flake-utils' set up to track 'origin/main'.1401HEAD is now at 5b291b5 Initial commit1402----------------------------- Captured stderr call -----------------------------1403hint: Using 'master' as the name for the initial branch. This default branch name1404hint: will change to "main" in Git 3.0. To configure the initial branch name1405hint: to use in all of your new repositories, which will suppress this warning,1406hint: call:1407hint:1408hint: git config --global init.defaultBranch <name>1409hint:1410hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and1411hint: 'development'. The just-created branch can be renamed via this command:1412hint:1413hint: git branch -m <name>1414hint:1415hint: Disable this message with "git config set advice.defaultBranchName false"1416To /build/pytest-of-nixbld/pytest-0/remote-test_custom_git_author_committ0.git1417 * [new branch] main -> main1418From /build/pytest-of-nixbld/pytest-0/remote-test_custom_git_author_committ01419 * branch main -> FETCH_HEAD1420Preparing worktree (new branch 'update-flake-utils')1421------------------------------ Captured log call -------------------------------1422ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 11423Stdout: No stdout output1424Stderr: warning: you don't have Internet access; disabling some network-dependent features1425error:1426 … while updating the lock file of flake 'git+file:///build/flake-update-u6cbu2bc/update-flake-utils?ref=refs/heads/update-flake-utils&rev=5b291b554a1cac327a35a918e23fd69d4ab512de&shallow=1'14271428 … while updating the flake input 'flake-utils'14291430 … while fetching the input 'github:numtide/flake-utils'14311432 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com1433Traceback (most recent call last):1434 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input1435 result = subprocess.run(1436 [1437 ...<10 lines>...1438 check=True,1439 )1440 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run1441 raise CalledProcessError(retcode, process.args,1442 output=stdout, stderr=stderr)1443subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-u6cbu2bc/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.1444ERROR update_flake_inputs.cli:cli.py:259 Failed to update input flake-utils in flake.nix1445Traceback (most recent call last):1446 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input1447 result = subprocess.run(1448 [1449 ...<10 lines>...1450 check=True,1451 )1452 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run1453 raise CalledProcessError(retcode, process.args,1454 output=stdout, stderr=stderr)1455subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-u6cbu2bc/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.14561457The above exception was the direct cause of the following exception:14581459Traceback (most recent call last):1460 File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates1461 flake_service.update_flake_input(1462 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^1463 input_name,1464 ^^^^^^^^^^^1465 flake.file_path,1466 ^^^^^^^^^^^^^^^^1467 str(worktree_path),1468 ^^^^^^^^^^^^^^^^^^^1469 )1470 ^1471 File "/build/src/src/update_flake_inputs/flake_service.py", line 235, in update_flake_input1472 raise FlakeServiceError(msg) from e1473update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-u6cbu2bc/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.1474Stderr: warning: you don't have Internet access; disabling some network-dependent features1475error:1476 … while updating the lock file of flake 'git+file:///build/flake-update-u6cbu2bc/update-flake-utils?ref=refs/heads/update-flake-utils&rev=5b291b554a1cac327a35a918e23fd69d4ab512de&shallow=1'14771478 … while updating the flake input 'flake-utils'14791480 … while fetching the input 'github:numtide/flake-utils'14811482 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com1483__________________ TestProcessFlakeUpdates.test_branch_suffix __________________14841485self = <tests.test_process_flake_updates.TestProcessFlakeUpdates object at 0xfffff5435130>1486tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_branch_suffix0')1487fixtures_path = PosixPath('/build/src/tests/fixtures')14881489 @pytest.mark.impure1490 def test_branch_suffix(1491 self,1492 tmp_path: Path,1493 fixtures_path: Path,1494 ) -> None:1495 """Test that branch suffix is properly appended to branch names."""1496 # Create a flake with flake-utils1497 flake_content = """{1498 inputs = {1499 flake-utils.url = "github:numtide/flake-utils";1500 };1501 1502 outputs = { self, flake-utils }: {1503 # Test flake1504 };1505 }"""1506 1507 (tmp_path / "flake.nix").write_text(flake_content)1508 1509 # Copy old lock file from minimal fixture1510 shutil.copy(1511 fixtures_path / "minimal" / "flake.lock",1512 tmp_path / "flake.lock",1513 )1514 1515 _setup_git_repo(tmp_path)1516 1517 # Change to test directory1518 original_cwd = Path.cwd()1519 os.chdir(tmp_path)1520 1521 try:1522 # Create test services1523 flake_service = FlakeService()1524 test_gitea_service = MockGiteaService()1525 1526 # Process updates with branch suffix1527> process_flake_updates(1528 flake_service,1529 test_gitea_service,1530 "",1531 "main",1532 "my-suffix",1533 auto_merge=False,1534 )15351536tests/test_process_flake_updates.py:465: 1537_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 15381539flake_service = <update_flake_inputs.flake_service.FlakeService object at 0xfffff5eb8230>1540gitea_service = MockGiteaService(api_url='https://gitea.example.com', token='test-token', owner='test-owner', repo='test-repo', git_au...tions[bot]', git_committer_email='gitea-actions[bot]@noreply.gitea.io', merge_style='default', pr_creation_attempts=[])1541exclude_patterns = '', base_branch = 'main', branch_suffix = 'my-suffix'1542auto_merge = False15431544 def process_flake_updates( # noqa: PLR09131545 flake_service: FlakeService,1546 gitea_service: GiteaService,1547 exclude_patterns: str,1548 base_branch: str,1549 branch_suffix: str,1550 *,1551 auto_merge: bool,1552 ) -> None:1553 """Process all flake updates.1554 1555 Args:1556 flake_service: Flake service instance1557 gitea_service: Gitea service instance1558 exclude_patterns: Patterns to exclude1559 base_branch: Base branch for PRs1560 branch_suffix: Optional suffix to append to branch names1561 auto_merge: Whether to automatically merge PRs1562 1563 """1564 # Discover flake files1565 flakes = flake_service.discover_flake_files(exclude_patterns)1566 if not flakes:1567 logger.info("No flake files found")1568 return1569 1570 logger.info("Found %d flake files to process", len(flakes))1571 1572 failed_inputs: list[str] = []1573 1574 # Process each flake1575 for flake in flakes:1576 logger.info("Processing flake: %s", flake.file_path)1577 logger.info("Inputs to update: %s", ", ".join(flake.inputs))1578 1579 # Don't include '.' for root directory1580 parent_path = Path(flake.file_path).parent1581 parent_suffix = "" if parent_path == Path() else f" in {parent_path}"1582 parent_branch = "" if parent_path == Path() else f"-{parent_path}"1583 suffix = branch_suffix.strip().replace("/", "-").strip("-")1584 1585 # Update each input1586 for input_name in flake.inputs:1587 try:1588 branch_name = f"update{parent_branch}-{input_name}"1589 branch_name = branch_name.replace("/", "-").strip("-")1590 if suffix:1591 branch_name = f"{branch_name}-{suffix}"1592 1593 logger.info(1594 "Updating input %s in %s (branch: %s)",1595 input_name,1596 flake.file_path,1597 branch_name,1598 )1599 1600 # Create worktree and update input1601 with gitea_service.worktree(branch_name, base_branch) as worktree_path:1602 # Update the input1603 flake_service.update_flake_input(1604 input_name,1605 flake.file_path,1606 str(worktree_path),1607 )1608 1609 # Commit changes1610 commit_message = f"Update {input_name}{parent_suffix}"1611 if gitea_service.commit_changes(1612 branch_name,1613 commit_message,1614 worktree_path,1615 ):1616 # Create pull request1617 pr_title = commit_message1618 pr_body = (1619 f"This PR updates the `{input_name}` input "1620 f"in `{flake.file_path}`.\n\n"1621 "Generated by update-flake-inputs action."1622 )1623 gitea_service.create_pull_request(1624 branch_name,1625 base_branch,1626 pr_title,1627 pr_body,1628 auto_merge=auto_merge,1629 )1630 else:1631 logger.info(1632 "No changes for input %s in %s",1633 input_name,1634 flake.file_path,1635 )1636 gitea_service.delete_branch(branch_name)1637 1638 except Exception:1639 logger.exception(1640 "Failed to update input %s in %s",1641 input_name,1642 flake.file_path,1643 )1644 failed_inputs.append(f"{input_name} in {flake.file_path}")1645 1646 if failed_inputs:1647 msg = f"Failed to process {len(failed_inputs)} input(s): {', '.join(failed_inputs)}"1648> raise UpdateFlakeInputsError(msg)1649E update_flake_inputs.exceptions.UpdateFlakeInputsError: Failed to process 1 input(s): flake-utils in flake.nix16501651src/update_flake_inputs/cli.py:268: UpdateFlakeInputsError1652----------------------------- Captured stdout call -----------------------------1653Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/test_branch_suffix0/.git/1654[main (root-commit) 5b291b5] Initial commit1655 2 files changed, 53 insertions(+)1656 create mode 100644 flake.lock1657 create mode 100644 flake.nix1658Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/remote-test_branch_suffix0.git/1659branch 'main' set up to track 'origin/main'.1660branch 'update-flake-utils-my-suffix' set up to track 'origin/main'.1661HEAD is now at 5b291b5 Initial commit1662----------------------------- Captured stderr call -----------------------------1663hint: Using 'master' as the name for the initial branch. This default branch name1664hint: will change to "main" in Git 3.0. To configure the initial branch name1665hint: to use in all of your new repositories, which will suppress this warning,1666hint: call:1667hint:1668hint: git config --global init.defaultBranch <name>1669hint:1670hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and1671hint: 'development'. The just-created branch can be renamed via this command:1672hint:1673hint: git branch -m <name>1674hint:1675hint: Disable this message with "git config set advice.defaultBranchName false"1676To /build/pytest-of-nixbld/pytest-0/remote-test_branch_suffix0.git1677 * [new branch] main -> main1678From /build/pytest-of-nixbld/pytest-0/remote-test_branch_suffix01679 * branch main -> FETCH_HEAD1680Preparing worktree (new branch 'update-flake-utils-my-suffix')1681------------------------------ Captured log call -------------------------------1682ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 11683Stdout: No stdout output1684Stderr: warning: you don't have Internet access; disabling some network-dependent features1685error:1686 … while updating the lock file of flake 'git+file:///build/flake-update-3js1sns0/update-flake-utils-my-suffix?ref=refs/heads/update-flake-utils-my-suffix&rev=5b291b554a1cac327a35a918e23fd69d4ab512de&shallow=1'16871688 … while updating the flake input 'flake-utils'16891690 … while fetching the input 'github:numtide/flake-utils'16911692 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com1693Traceback (most recent call last):1694 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input1695 result = subprocess.run(1696 [1697 ...<10 lines>...1698 check=True,1699 )1700 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run1701 raise CalledProcessError(retcode, process.args,1702 output=stdout, stderr=stderr)1703subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-3js1sns0/update-flake-utils-my-suffix?shallow=1', 'flake-utils']' returned non-zero exit status 1.1704ERROR update_flake_inputs.cli:cli.py:259 Failed to update input flake-utils in flake.nix1705Traceback (most recent call last):1706 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input1707 result = subprocess.run(1708 [1709 ...<10 lines>...1710 check=True,1711 )1712 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run1713 raise CalledProcessError(retcode, process.args,1714 output=stdout, stderr=stderr)1715subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-3js1sns0/update-flake-utils-my-suffix?shallow=1', 'flake-utils']' returned non-zero exit status 1.17161717The above exception was the direct cause of the following exception:17181719Traceback (most recent call last):1720 File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates1721 flake_service.update_flake_input(1722 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^1723 input_name,1724 ^^^^^^^^^^^1725 flake.file_path,1726 ^^^^^^^^^^^^^^^^1727 str(worktree_path),1728 ^^^^^^^^^^^^^^^^^^^1729 )1730 ^1731 File "/build/src/src/update_flake_inputs/flake_service.py", line 235, in update_flake_input1732 raise FlakeServiceError(msg) from e1733update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-3js1sns0/update-flake-utils-my-suffix?shallow=1', 'flake-utils']' returned non-zero exit status 1.1734Stderr: warning: you don't have Internet access; disabling some network-dependent features1735error:1736 … while updating the lock file of flake 'git+file:///build/flake-update-3js1sns0/update-flake-utils-my-suffix?ref=refs/heads/update-flake-utils-my-suffix&rev=5b291b554a1cac327a35a918e23fd69d4ab512de&shallow=1'17371738 … while updating the flake input 'flake-utils'17391740 … while fetching the input 'github:numtide/flake-utils'17411742 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com1743____ TestProcessFlakeUpdates.test_fails_at_end_when_individual_input_fails _____17441745self = <tests.test_process_flake_updates.TestProcessFlakeUpdates object at 0xfffff5e52cf0>1746tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_fails_at_end_when_individ0')1747fixtures_path = PosixPath('/build/src/tests/fixtures')17481749 @pytest.mark.impure1750 def test_fails_at_end_when_individual_input_fails(1751 self,1752 tmp_path: Path,1753 fixtures_path: Path,1754 ) -> None:1755 """Test that the action continues updating other inputs but fails at the end."""1756 flake_content = """{1757 inputs = {1758 flake-utils.url = "github:numtide/flake-utils";1759 };1760 1761 outputs = { self, flake-utils }: {1762 # Test flake with updatable input1763 };1764 }"""1765 1766 (tmp_path / "flake.nix").write_text(flake_content)1767 1768 shutil.copy(1769 fixtures_path / "minimal" / "flake.lock",1770 tmp_path / "flake.lock",1771 )1772 1773 _setup_git_repo(tmp_path)1774 1775 original_cwd = Path.cwd()1776 os.chdir(tmp_path)1777 1778 try:1779 # FailingFlakeService injects "bad-input" during discovery and1780 # raises when asked to update it, simulating a 403 or dead ref1781 flake_service = FailingFlakeService(fail_inputs=["bad-input"])1782 test_gitea_service = MockGiteaService()1783 1784> with pytest.raises(UpdateFlakeInputsError, match="Failed to process 1 input"):1785 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^1786E AssertionError: Regex pattern did not match.1787E Expected regex: 'Failed to process 1 input'1788E Actual message: 'Failed to process 2 input(s): bad-input in flake.nix, flake-utils in flake.nix'17891790tests/test_process_flake_updates.py:596: AssertionError1791----------------------------- Captured stdout call -----------------------------1792Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/test_fails_at_end_when_individ0/.git/1793[main (root-commit) 28672c5] Initial commit1794 2 files changed, 53 insertions(+)1795 create mode 100644 flake.lock1796 create mode 100644 flake.nix1797Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/remote-test_fails_at_end_when_individ0.git/1798branch 'main' set up to track 'origin/main'.1799branch 'update-bad-input' set up to track 'origin/main'.1800HEAD is now at 28672c5 Initial commit1801branch 'update-flake-utils' set up to track 'origin/main'.1802HEAD is now at 28672c5 Initial commit1803----------------------------- Captured stderr call -----------------------------1804hint: Using 'master' as the name for the initial branch. This default branch name1805hint: will change to "main" in Git 3.0. To configure the initial branch name1806hint: to use in all of your new repositories, which will suppress this warning,1807hint: call:1808hint:1809hint: git config --global init.defaultBranch <name>1810hint:1811hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and1812hint: 'development'. The just-created branch can be renamed via this command:1813hint:1814hint: git branch -m <name>1815hint:1816hint: Disable this message with "git config set advice.defaultBranchName false"1817To /build/pytest-of-nixbld/pytest-0/remote-test_fails_at_end_when_individ0.git1818 * [new branch] main -> main1819From /build/pytest-of-nixbld/pytest-0/remote-test_fails_at_end_when_individ01820 * branch main -> FETCH_HEAD1821Preparing worktree (new branch 'update-bad-input')1822From /build/pytest-of-nixbld/pytest-0/remote-test_fails_at_end_when_individ01823 * branch main -> FETCH_HEAD1824Preparing worktree (new branch 'update-flake-utils')1825------------------------------ Captured log call -------------------------------1826ERROR update_flake_inputs.cli:cli.py:259 Failed to update input bad-input in flake.nix1827Traceback (most recent call last):1828 File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates1829 flake_service.update_flake_input(1830 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^1831 input_name,1832 ^^^^^^^^^^^1833 flake.file_path,1834 ^^^^^^^^^^^^^^^^1835 str(worktree_path),1836 ^^^^^^^^^^^^^^^^^^^1837 )1838 ^1839 File "/build/src/tests/test_process_flake_updates.py", line 635, in update_flake_input1840 raise FlakeServiceError(msg)1841update_flake_inputs.exceptions.FlakeServiceError: Simulated failure updating bad-input1842ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 11843Stdout: No stdout output1844Stderr: warning: you don't have Internet access; disabling some network-dependent features1845error:1846 … while updating the lock file of flake 'git+file:///build/flake-update-jd8js8be/update-flake-utils?ref=refs/heads/update-flake-utils&rev=28672c514cefca0bf659f70460f5a09a03d780b2&shallow=1'18471848 … while updating the flake input 'flake-utils'18491850 … while fetching the input 'github:numtide/flake-utils'18511852 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com1853Traceback (most recent call last):1854 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input1855 result = subprocess.run(1856 [1857 ...<10 lines>...1858 check=True,1859 )1860 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run1861 raise CalledProcessError(retcode, process.args,1862 output=stdout, stderr=stderr)1863subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-jd8js8be/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.1864ERROR update_flake_inputs.cli:cli.py:259 Failed to update input flake-utils in flake.nix1865Traceback (most recent call last):1866 File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input1867 result = subprocess.run(1868 [1869 ...<10 lines>...1870 check=True,1871 )1872 File "/nix/store/rdhzl9k5xzjaywkg6bi27hc502v046ai-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run1873 raise CalledProcessError(retcode, process.args,1874 output=stdout, stderr=stderr)1875subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-jd8js8be/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.18761877The above exception was the direct cause of the following exception:18781879Traceback (most recent call last):1880 File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates1881 flake_service.update_flake_input(1882 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^1883 input_name,1884 ^^^^^^^^^^^1885 flake.file_path,1886 ^^^^^^^^^^^^^^^^1887 str(worktree_path),1888 ^^^^^^^^^^^^^^^^^^^1889 )1890 ^1891 File "/build/src/tests/test_process_flake_updates.py", line 636, in update_flake_input1892 super().update_flake_input(input_name, flake_file, work_dir)1893 ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^1894 File "/build/src/src/update_flake_inputs/flake_service.py", line 235, in update_flake_input1895 raise FlakeServiceError(msg) from e1896update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-jd8js8be/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1.1897Stderr: warning: you don't have Internet access; disabling some network-dependent features1898error:1899 … while updating the lock file of flake 'git+file:///build/flake-update-jd8js8be/update-flake-utils?ref=refs/heads/update-flake-utils&rev=28672c514cefca0bf659f70460f5a09a03d780b2&shallow=1'19001901 … while updating the flake input 'flake-utils'19021903 … while fetching the input 'github:numtide/flake-utils'19041905 error: unable to download 'https://api.github.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com1906=========================== short test summary info ============================1907FAILED tests/test_flake_service.py::TestFlakeService::test_update_flake_input1908FAILED tests/test_flake_service.py::TestFlakeService::test_update_subflake_input1909FAILED tests/test_process_flake_updates.py::TestProcessFlakeUpdates::test_with_updatable_flake_input1910FAILED tests/test_process_flake_updates.py::TestProcessFlakeUpdates::test_worktree_based_on_base_branch_not_head1911FAILED tests/test_process_flake_updates.py::TestProcessFlakeUpdates::test_custom_git_author_committer1912FAILED tests/test_process_flake_updates.py::TestProcessFlakeUpdates::test_branch_suffix1913FAILED tests/test_process_flake_updates.py::TestProcessFlakeUpdates::test_fails_at_end_when_individual_input_fails19147 failed, 16 passed in 5.01s