tribuchet: building on eliza ....FF...........FFFF.F [100%] =================================== FAILURES =================================== ___________________ TestFlakeService.test_update_flake_input ___________________ self = input_name = 'flake-utils', flake_file = 'flake.nix' work_dir = '/build/tmpul6w7l0r' def update_flake_input( self, input_name: str, flake_file: str, work_dir: str | None = None, ) -> None: """Update a specific flake input. Args: input_name: Name of the input to update flake_file: Path to the flake file work_dir: Optional working directory to resolve flake file path from """ try: logger.info("Updating flake input: %s in %s", input_name, flake_file) # If work_dir is provided, resolve the flake file relative to it absolute_flake_path = Path(work_dir) / flake_file if work_dir else Path(flake_file) flake_dir = absolute_flake_path.parent or Path() absolute_flake_dir = flake_dir.resolve() # Use a shallow URL because worktrees may not have the full history. # For subflakes, nix needs the URL to point to the git root # with a dir= parameter rather than the subdirectory directly. if work_dir: git_root = Path(work_dir).resolve() relative_dir = absolute_flake_dir.relative_to(git_root) flake_url = f"git+file://{git_root}?shallow=1" if str(relative_dir) != ".": flake_url += f"&dir={relative_dir}" else: flake_url = f"git+file://{absolute_flake_dir}?shallow=1" > result = subprocess.run( [ "nix", "flake", "update", "--flake", flake_url, input_name, ], cwd=str(flake_dir), capture_output=True, text=True, check=True, ) src/update_flake_inputs/flake_service.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['nix', 'flake', 'update', '--flake', 'git+file:///build/tmpul6w7l0r?shallow=1', 'flake-utils'],) kwargs = {'cwd': '/build/tmpul6w7l0r', 'stderr': -1, 'stdout': -1, 'text': True} process = stdout = '' stderr = "warning: you don't have Internet access; disabling some network-dependent features\nerror:\n … while updating t...b.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com\n" retcode = 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', 'flake', 'update', '--flake', 'git+file:///build/tmpul6w7l0r?shallow=1', 'flake-utils']' returned non-zero exit status 1. /nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py:577: CalledProcessError The above exception was the direct cause of the following exception: self = flake_service = fixtures_path = PosixPath('/build/src/tests/fixtures') @pytest.mark.impure def test_update_flake_input( self, flake_service: FlakeService, fixtures_path: Path, ) -> None: """Test updating a flake input and modifying the lock file.""" # Create a temporary directory for the test with tempfile.TemporaryDirectory() as temp_dir: temp_path = Path(temp_dir) # Copy minimal flake to temp directory shutil.copy( fixtures_path / "minimal" / "flake.nix", temp_path / "flake.nix", ) shutil.copy( fixtures_path / "minimal" / "flake.lock", temp_path / "flake.lock", ) # Initialize git repo in temp directory subprocess.run(["git", "init"], cwd=temp_path, check=True) subprocess.run(["git", "add", "."], cwd=temp_path, check=True) subprocess.run( ["git", "commit", "-m", "Initial commit"], cwd=temp_path, check=True, env={ **os.environ, "GIT_AUTHOR_NAME": "Test User", "GIT_AUTHOR_EMAIL": "test@example.com", "GIT_COMMITTER_NAME": "Test User", "GIT_COMMITTER_EMAIL": "test@example.com", }, ) # Get the original lock file content original_lock_content = (temp_path / "flake.lock").read_text() original_lock = json.loads(original_lock_content) original_flake_utils_rev = original_lock["nodes"]["flake-utils"]["locked"]["rev"] # Update flake-utils input > flake_service.update_flake_input("flake-utils", "flake.nix", str(temp_path)) tests/test_flake_service.py:198: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = input_name = 'flake-utils', flake_file = 'flake.nix' work_dir = '/build/tmpul6w7l0r' def update_flake_input( self, input_name: str, flake_file: str, work_dir: str | None = None, ) -> None: """Update a specific flake input. Args: input_name: Name of the input to update flake_file: Path to the flake file work_dir: Optional working directory to resolve flake file path from """ try: logger.info("Updating flake input: %s in %s", input_name, flake_file) # If work_dir is provided, resolve the flake file relative to it absolute_flake_path = Path(work_dir) / flake_file if work_dir else Path(flake_file) flake_dir = absolute_flake_path.parent or Path() absolute_flake_dir = flake_dir.resolve() # Use a shallow URL because worktrees may not have the full history. # For subflakes, nix needs the URL to point to the git root # with a dir= parameter rather than the subdirectory directly. if work_dir: git_root = Path(work_dir).resolve() relative_dir = absolute_flake_dir.relative_to(git_root) flake_url = f"git+file://{git_root}?shallow=1" if str(relative_dir) != ".": flake_url += f"&dir={relative_dir}" else: flake_url = f"git+file://{absolute_flake_dir}?shallow=1" result = subprocess.run( [ "nix", "flake", "update", "--flake", flake_url, input_name, ], cwd=str(flake_dir), capture_output=True, text=True, check=True, ) # Check if there was a warning about non-existent input if result.stderr and "does not match any input" in result.stderr: logger.warning( "Failed to update input %s in %s: %s", input_name, flake_file, result.stderr.strip(), ) logger.info( "Successfully updated flake input: %s in %s", input_name, flake_file, ) except subprocess.CalledProcessError as e: stderr_output = e.stderr.strip() if e.stderr else "No stderr output" stdout_output = e.stdout.strip() if e.stdout else "No stdout output" logger.exception( "Failed to update flake input %s in %s. Exit code: %d\nStdout: %s\nStderr: %s", input_name, flake_file, e.returncode, stdout_output, stderr_output, ) msg = ( f"Failed to update flake input {input_name} in {flake_file}: {e}\n" f"Stderr: {stderr_output}" ) > raise FlakeServiceError(msg) from e E update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/tmpul6w7l0r?shallow=1', 'flake-utils']' returned non-zero exit status 1. E Stderr: warning: you don't have Internet access; disabling some network-dependent features E error: E … while updating the lock file of flake 'git+file:///build/tmpul6w7l0r?ref=refs/heads/master&rev=89d55985da0c4867c0316f4f02fbef95df88c162&shallow=1' E E … while updating the flake input 'flake-utils' E E … while fetching the input 'github:numtide/flake-utils' E E 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.com src/update_flake_inputs/flake_service.py:235: FlakeServiceError ----------------------------- Captured stdout call ----------------------------- Initialized empty Git repository in /build/tmpul6w7l0r/.git/ [master (root-commit) 89d5598] Initial commit 2 files changed, 55 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix ----------------------------- Captured stderr call ----------------------------- hint: Using 'master' as the name for the initial branch. This default branch name hint: will change to "main" in Git 3.0. To configure the initial branch name hint: to use in all of your new repositories, which will suppress this warning, hint: call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m hint: hint: Disable this message with "git config set advice.defaultBranchName false" ------------------------------ Captured log call ------------------------------- ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 1 Stdout: No stdout output Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/tmpul6w7l0r?ref=refs/heads/master&rev=89d55985da0c4867c0316f4f02fbef95df88c162&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/tmpul6w7l0r?shallow=1', 'flake-utils']' returned non-zero exit status 1. _________________ TestFlakeService.test_update_subflake_input __________________ self = input_name = 'flake-utils', flake_file = 'flake.nix' work_dir = '/build/tmppy1d7jtr' def update_flake_input( self, input_name: str, flake_file: str, work_dir: str | None = None, ) -> None: """Update a specific flake input. Args: input_name: Name of the input to update flake_file: Path to the flake file work_dir: Optional working directory to resolve flake file path from """ try: logger.info("Updating flake input: %s in %s", input_name, flake_file) # If work_dir is provided, resolve the flake file relative to it absolute_flake_path = Path(work_dir) / flake_file if work_dir else Path(flake_file) flake_dir = absolute_flake_path.parent or Path() absolute_flake_dir = flake_dir.resolve() # Use a shallow URL because worktrees may not have the full history. # For subflakes, nix needs the URL to point to the git root # with a dir= parameter rather than the subdirectory directly. if work_dir: git_root = Path(work_dir).resolve() relative_dir = absolute_flake_dir.relative_to(git_root) flake_url = f"git+file://{git_root}?shallow=1" if str(relative_dir) != ".": flake_url += f"&dir={relative_dir}" else: flake_url = f"git+file://{absolute_flake_dir}?shallow=1" > result = subprocess.run( [ "nix", "flake", "update", "--flake", flake_url, input_name, ], cwd=str(flake_dir), capture_output=True, text=True, check=True, ) src/update_flake_inputs/flake_service.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['nix', 'flake', 'update', '--flake', 'git+file:///build/tmppy1d7jtr?shallow=1', 'flake-utils'],) kwargs = {'cwd': '/build/tmppy1d7jtr', 'stderr': -1, 'stdout': -1, 'text': True} process = stdout = '' stderr = "warning: you don't have Internet access; disabling some network-dependent features\nerror:\n … while updating t...b.com/repos/numtide/flake-utils/commits/HEAD': Could not resolve hostname (6) Could not resolve host: api.github.com\n" retcode = 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', 'flake', 'update', '--flake', 'git+file:///build/tmppy1d7jtr?shallow=1', 'flake-utils']' returned non-zero exit status 1. /nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py:577: CalledProcessError The above exception was the direct cause of the following exception: self = flake_service = fixtures_path = PosixPath('/build/src/tests/fixtures') @pytest.mark.impure def test_update_subflake_input( self, flake_service: FlakeService, fixtures_path: Path, ) -> None: """Test updating a flake input in a subdirectory (subflake).""" with tempfile.TemporaryDirectory() as temp_dir: temp_path = Path(temp_dir) # Copy minimal flake to a subdirectory sub_dir = temp_path / "sub" sub_dir.mkdir() shutil.copy( fixtures_path / "minimal" / "flake.nix", sub_dir / "flake.nix", ) shutil.copy( fixtures_path / "minimal" / "flake.lock", sub_dir / "flake.lock", ) # Copy minimal flake to root shutil.copy( fixtures_path / "minimal" / "flake.nix", temp_path / "flake.nix", ) shutil.copy( fixtures_path / "minimal" / "flake.lock", temp_path / "flake.lock", ) # Initialize git repo in temp directory subprocess.run(["git", "init"], cwd=temp_path, check=True) subprocess.run(["git", "add", "."], cwd=temp_path, check=True) subprocess.run( ["git", "commit", "-m", "Initial commit"], cwd=temp_path, check=True, env={ **os.environ, "GIT_AUTHOR_NAME": "Test User", "GIT_AUTHOR_EMAIL": "test@example.com", "GIT_COMMITTER_NAME": "Test User", "GIT_COMMITTER_EMAIL": "test@example.com", }, ) original_root_lock = json.loads((temp_path / "flake.lock").read_text()) original_root_rev = original_root_lock["nodes"]["flake-utils"]["locked"]["rev"] original_sub_lock = json.loads((sub_dir / "flake.lock").read_text()) original_sub_rev = original_sub_lock["nodes"]["flake-utils"]["locked"]["rev"] # Update flake-utils in the root flake > flake_service.update_flake_input("flake-utils", "flake.nix", str(temp_path)) tests/test_flake_service.py:272: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = input_name = 'flake-utils', flake_file = 'flake.nix' work_dir = '/build/tmppy1d7jtr' def update_flake_input( self, input_name: str, flake_file: str, work_dir: str | None = None, ) -> None: """Update a specific flake input. Args: input_name: Name of the input to update flake_file: Path to the flake file work_dir: Optional working directory to resolve flake file path from """ try: logger.info("Updating flake input: %s in %s", input_name, flake_file) # If work_dir is provided, resolve the flake file relative to it absolute_flake_path = Path(work_dir) / flake_file if work_dir else Path(flake_file) flake_dir = absolute_flake_path.parent or Path() absolute_flake_dir = flake_dir.resolve() # Use a shallow URL because worktrees may not have the full history. # For subflakes, nix needs the URL to point to the git root # with a dir= parameter rather than the subdirectory directly. if work_dir: git_root = Path(work_dir).resolve() relative_dir = absolute_flake_dir.relative_to(git_root) flake_url = f"git+file://{git_root}?shallow=1" if str(relative_dir) != ".": flake_url += f"&dir={relative_dir}" else: flake_url = f"git+file://{absolute_flake_dir}?shallow=1" result = subprocess.run( [ "nix", "flake", "update", "--flake", flake_url, input_name, ], cwd=str(flake_dir), capture_output=True, text=True, check=True, ) # Check if there was a warning about non-existent input if result.stderr and "does not match any input" in result.stderr: logger.warning( "Failed to update input %s in %s: %s", input_name, flake_file, result.stderr.strip(), ) logger.info( "Successfully updated flake input: %s in %s", input_name, flake_file, ) except subprocess.CalledProcessError as e: stderr_output = e.stderr.strip() if e.stderr else "No stderr output" stdout_output = e.stdout.strip() if e.stdout else "No stdout output" logger.exception( "Failed to update flake input %s in %s. Exit code: %d\nStdout: %s\nStderr: %s", input_name, flake_file, e.returncode, stdout_output, stderr_output, ) msg = ( f"Failed to update flake input {input_name} in {flake_file}: {e}\n" f"Stderr: {stderr_output}" ) > raise FlakeServiceError(msg) from e E update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/tmppy1d7jtr?shallow=1', 'flake-utils']' returned non-zero exit status 1. E Stderr: warning: you don't have Internet access; disabling some network-dependent features E error: E … while updating the lock file of flake 'git+file:///build/tmppy1d7jtr?ref=refs/heads/master&rev=e7046e4c0943f40d99cd485c3e7c7a095414e16c&shallow=1' E E … while updating the flake input 'flake-utils' E E … while fetching the input 'github:numtide/flake-utils' E E 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.com src/update_flake_inputs/flake_service.py:235: FlakeServiceError ----------------------------- Captured stdout call ----------------------------- Initialized empty Git repository in /build/tmppy1d7jtr/.git/ [master (root-commit) e7046e4] Initial commit 4 files changed, 110 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 sub/flake.lock create mode 100644 sub/flake.nix ----------------------------- Captured stderr call ----------------------------- hint: Using 'master' as the name for the initial branch. This default branch name hint: will change to "main" in Git 3.0. To configure the initial branch name hint: to use in all of your new repositories, which will suppress this warning, hint: call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m hint: hint: Disable this message with "git config set advice.defaultBranchName false" ------------------------------ Captured log call ------------------------------- ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 1 Stdout: No stdout output Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/tmppy1d7jtr?ref=refs/heads/master&rev=e7046e4c0943f40d99cd485c3e7c7a095414e16c&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/tmppy1d7jtr?shallow=1', 'flake-utils']' returned non-zero exit status 1. ___________ TestProcessFlakeUpdates.test_with_updatable_flake_input ____________ self = tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_with_updatable_flake_inpu0') fixtures_path = PosixPath('/build/src/tests/fixtures') @pytest.mark.impure def test_with_updatable_flake_input( self, tmp_path: Path, fixtures_path: Path, ) -> None: """Test PR creation when flake input has available updates.""" # Create a flake with flake-utils that can be updated flake_content = """{ inputs = { flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, flake-utils }: { # Test flake with updatable input }; }""" (tmp_path / "flake.nix").write_text(flake_content) # Copy old lock file from minimal fixture shutil.copy( fixtures_path / "minimal" / "flake.lock", tmp_path / "flake.lock", ) _setup_git_repo(tmp_path) # Change to test directory original_cwd = Path.cwd() os.chdir(tmp_path) try: # Create test services flake_service = FlakeService() test_gitea_service = MockGiteaService() # Process updates > process_flake_updates( flake_service, test_gitea_service, "", "main", "", auto_merge=False, ) tests/test_process_flake_updates.py:222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ flake_service = gitea_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=[]) exclude_patterns = '', base_branch = 'main', branch_suffix = '' def process_flake_updates( # noqa: PLR0913 flake_service: FlakeService, gitea_service: GiteaService, exclude_patterns: str, base_branch: str, branch_suffix: str, *, auto_merge: bool, ) -> None: """Process all flake updates. Args: flake_service: Flake service instance gitea_service: Gitea service instance exclude_patterns: Patterns to exclude base_branch: Base branch for PRs branch_suffix: Optional suffix to append to branch names auto_merge: Whether to automatically merge PRs """ # Discover flake files flakes = flake_service.discover_flake_files(exclude_patterns) if not flakes: logger.info("No flake files found") return logger.info("Found %d flake files to process", len(flakes)) failed_inputs: list[str] = [] # Process each flake for flake in flakes: logger.info("Processing flake: %s", flake.file_path) logger.info("Inputs to update: %s", ", ".join(flake.inputs)) # Don't include '.' for root directory parent_path = Path(flake.file_path).parent parent_suffix = "" if parent_path == Path() else f" in {parent_path}" parent_branch = "" if parent_path == Path() else f"-{parent_path}" suffix = branch_suffix.strip().replace("/", "-").strip("-") # Update each input for input_name in flake.inputs: try: branch_name = f"update{parent_branch}-{input_name}" branch_name = branch_name.replace("/", "-").strip("-") if suffix: branch_name = f"{branch_name}-{suffix}" logger.info( "Updating input %s in %s (branch: %s)", input_name, flake.file_path, branch_name, ) # Create worktree and update input with gitea_service.worktree(branch_name, base_branch) as worktree_path: # Update the input flake_service.update_flake_input( input_name, flake.file_path, str(worktree_path), ) # Commit changes commit_message = f"Update {input_name}{parent_suffix}" if gitea_service.commit_changes( branch_name, commit_message, worktree_path, ): # Create pull request pr_title = commit_message pr_body = ( f"This PR updates the `{input_name}` input " f"in `{flake.file_path}`.\n\n" "Generated by update-flake-inputs action." ) gitea_service.create_pull_request( branch_name, base_branch, pr_title, pr_body, auto_merge=auto_merge, ) else: logger.info( "No changes for input %s in %s", input_name, flake.file_path, ) gitea_service.delete_branch(branch_name) except Exception: logger.exception( "Failed to update input %s in %s", input_name, flake.file_path, ) failed_inputs.append(f"{input_name} in {flake.file_path}") if failed_inputs: msg = f"Failed to process {len(failed_inputs)} input(s): {', '.join(failed_inputs)}" > raise UpdateFlakeInputsError(msg) E update_flake_inputs.exceptions.UpdateFlakeInputsError: Failed to process 1 input(s): flake-utils in flake.nix src/update_flake_inputs/cli.py:268: UpdateFlakeInputsError ----------------------------- Captured stdout call ----------------------------- Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/test_with_updatable_flake_inpu0/.git/ [main (root-commit) e6e8223] Initial commit 2 files changed, 53 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/remote-test_with_updatable_flake_inpu0.git/ branch 'main' set up to track 'origin/main'. branch 'update-flake-utils' set up to track 'origin/main'. HEAD is now at e6e8223 Initial commit ----------------------------- Captured stderr call ----------------------------- hint: Using 'master' as the name for the initial branch. This default branch name hint: will change to "main" in Git 3.0. To configure the initial branch name hint: to use in all of your new repositories, which will suppress this warning, hint: call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m hint: hint: Disable this message with "git config set advice.defaultBranchName false" To /build/pytest-of-nixbld/pytest-0/remote-test_with_updatable_flake_inpu0.git * [new branch] main -> main From /build/pytest-of-nixbld/pytest-0/remote-test_with_updatable_flake_inpu0 * branch main -> FETCH_HEAD Preparing worktree (new branch 'update-flake-utils') ------------------------------ Captured log call ------------------------------- ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 1 Stdout: No stdout output Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/flake-update-k3fbvxf1/update-flake-utils?ref=refs/heads/update-flake-utils&rev=e6e8223434e2e6387a4fa7781577c61710837b19&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-k3fbvxf1/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. ERROR update_flake_inputs.cli:cli.py:259 Failed to update input flake-utils in flake.nix Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-k3fbvxf1/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates flake_service.update_flake_input( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ input_name, ^^^^^^^^^^^ flake.file_path, ^^^^^^^^^^^^^^^^ str(worktree_path), ^^^^^^^^^^^^^^^^^^^ ) ^ File "/build/src/src/update_flake_inputs/flake_service.py", line 235, in update_flake_input raise FlakeServiceError(msg) from e update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-k3fbvxf1/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/flake-update-k3fbvxf1/update-flake-utils?ref=refs/heads/update-flake-utils&rev=e6e8223434e2e6387a4fa7781577c61710837b19&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com _____ TestProcessFlakeUpdates.test_worktree_based_on_base_branch_not_head ______ self = tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_worktree_based_on_base_br0') fixtures_path = PosixPath('/build/src/tests/fixtures') @pytest.mark.impure def test_worktree_based_on_base_branch_not_head( self, tmp_path: Path, fixtures_path: Path, ) -> None: """Test that update branches are based on base_branch, not current HEAD. When the action is triggered from a non-main branch, the worktree should still be based on origin/ so that commits from the triggering branch don't leak into the update branch. """ flake_content = """{ inputs = { flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, flake-utils }: { # Test flake with updatable input }; }""" (tmp_path / "flake.nix").write_text(flake_content) shutil.copy( fixtures_path / "minimal" / "flake.lock", tmp_path / "flake.lock", ) _setup_git_repo(tmp_path) # Create a feature branch with an extra commit git_env = { **os.environ, "GIT_AUTHOR_NAME": "Test User", "GIT_AUTHOR_EMAIL": "test@example.com", "GIT_COMMITTER_NAME": "Test User", "GIT_COMMITTER_EMAIL": "test@example.com", } subprocess.run( ["git", "checkout", "-b", "feature-branch"], cwd=tmp_path, check=True, ) (tmp_path / "extra-file.txt").write_text("feature branch content") subprocess.run(["git", "add", "."], cwd=tmp_path, check=True) subprocess.run( ["git", "commit", "-m", "Feature branch commit"], cwd=tmp_path, check=True, env=git_env, ) # Stay on feature-branch (simulating action triggered from non-main branch) original_cwd = Path.cwd() os.chdir(tmp_path) try: flake_service = FlakeService() test_gitea_service = MockGiteaService() > process_flake_updates( flake_service, test_gitea_service, "", "main", "", auto_merge=False, ) tests/test_process_flake_updates.py:328: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ flake_service = gitea_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=[]) exclude_patterns = '', base_branch = 'main', branch_suffix = '' def process_flake_updates( # noqa: PLR0913 flake_service: FlakeService, gitea_service: GiteaService, exclude_patterns: str, base_branch: str, branch_suffix: str, *, auto_merge: bool, ) -> None: """Process all flake updates. Args: flake_service: Flake service instance gitea_service: Gitea service instance exclude_patterns: Patterns to exclude base_branch: Base branch for PRs branch_suffix: Optional suffix to append to branch names auto_merge: Whether to automatically merge PRs """ # Discover flake files flakes = flake_service.discover_flake_files(exclude_patterns) if not flakes: logger.info("No flake files found") return logger.info("Found %d flake files to process", len(flakes)) failed_inputs: list[str] = [] # Process each flake for flake in flakes: logger.info("Processing flake: %s", flake.file_path) logger.info("Inputs to update: %s", ", ".join(flake.inputs)) # Don't include '.' for root directory parent_path = Path(flake.file_path).parent parent_suffix = "" if parent_path == Path() else f" in {parent_path}" parent_branch = "" if parent_path == Path() else f"-{parent_path}" suffix = branch_suffix.strip().replace("/", "-").strip("-") # Update each input for input_name in flake.inputs: try: branch_name = f"update{parent_branch}-{input_name}" branch_name = branch_name.replace("/", "-").strip("-") if suffix: branch_name = f"{branch_name}-{suffix}" logger.info( "Updating input %s in %s (branch: %s)", input_name, flake.file_path, branch_name, ) # Create worktree and update input with gitea_service.worktree(branch_name, base_branch) as worktree_path: # Update the input flake_service.update_flake_input( input_name, flake.file_path, str(worktree_path), ) # Commit changes commit_message = f"Update {input_name}{parent_suffix}" if gitea_service.commit_changes( branch_name, commit_message, worktree_path, ): # Create pull request pr_title = commit_message pr_body = ( f"This PR updates the `{input_name}` input " f"in `{flake.file_path}`.\n\n" "Generated by update-flake-inputs action." ) gitea_service.create_pull_request( branch_name, base_branch, pr_title, pr_body, auto_merge=auto_merge, ) else: logger.info( "No changes for input %s in %s", input_name, flake.file_path, ) gitea_service.delete_branch(branch_name) except Exception: logger.exception( "Failed to update input %s in %s", input_name, flake.file_path, ) failed_inputs.append(f"{input_name} in {flake.file_path}") if failed_inputs: msg = f"Failed to process {len(failed_inputs)} input(s): {', '.join(failed_inputs)}" > raise UpdateFlakeInputsError(msg) E update_flake_inputs.exceptions.UpdateFlakeInputsError: Failed to process 1 input(s): flake-utils in flake.nix src/update_flake_inputs/cli.py:268: UpdateFlakeInputsError ----------------------------- Captured stdout call ----------------------------- Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/test_worktree_based_on_base_br0/.git/ [main (root-commit) e6e8223] Initial commit 2 files changed, 53 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/remote-test_worktree_based_on_base_br0.git/ branch 'main' set up to track 'origin/main'. [feature-branch 2d2646e] Feature branch commit 1 file changed, 1 insertion(+) create mode 100644 extra-file.txt branch 'update-flake-utils' set up to track 'origin/main'. HEAD is now at e6e8223 Initial commit ----------------------------- Captured stderr call ----------------------------- hint: Using 'master' as the name for the initial branch. This default branch name hint: will change to "main" in Git 3.0. To configure the initial branch name hint: to use in all of your new repositories, which will suppress this warning, hint: call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m hint: hint: Disable this message with "git config set advice.defaultBranchName false" To /build/pytest-of-nixbld/pytest-0/remote-test_worktree_based_on_base_br0.git * [new branch] main -> main Switched to a new branch 'feature-branch' From /build/pytest-of-nixbld/pytest-0/remote-test_worktree_based_on_base_br0 * branch main -> FETCH_HEAD Preparing worktree (new branch 'update-flake-utils') ------------------------------ Captured log call ------------------------------- ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 1 Stdout: No stdout output Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/flake-update-czhzb3uv/update-flake-utils?ref=refs/heads/update-flake-utils&rev=e6e8223434e2e6387a4fa7781577c61710837b19&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-czhzb3uv/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. ERROR update_flake_inputs.cli:cli.py:259 Failed to update input flake-utils in flake.nix Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-czhzb3uv/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates flake_service.update_flake_input( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ input_name, ^^^^^^^^^^^ flake.file_path, ^^^^^^^^^^^^^^^^ str(worktree_path), ^^^^^^^^^^^^^^^^^^^ ) ^ File "/build/src/src/update_flake_inputs/flake_service.py", line 235, in update_flake_input raise FlakeServiceError(msg) from e update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-czhzb3uv/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/flake-update-czhzb3uv/update-flake-utils?ref=refs/heads/update-flake-utils&rev=e6e8223434e2e6387a4fa7781577c61710837b19&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com ___________ TestProcessFlakeUpdates.test_custom_git_author_committer ___________ self = tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_custom_git_author_committ0') fixtures_path = PosixPath('/build/src/tests/fixtures') @pytest.mark.impure def test_custom_git_author_committer( self, tmp_path: Path, fixtures_path: Path, ) -> None: """Test that custom git author/committer configuration is used.""" # Create a flake with flake-utils flake_content = """{ inputs = { flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, flake-utils }: { # Test flake }; }""" (tmp_path / "flake.nix").write_text(flake_content) # Copy old lock file from minimal fixture shutil.copy( fixtures_path / "minimal" / "flake.lock", tmp_path / "flake.lock", ) _setup_git_repo(tmp_path) # Change to test directory original_cwd = Path.cwd() os.chdir(tmp_path) try: # Create test services with custom git author/committer flake_service = FlakeService() test_gitea_service = MockGiteaService() test_gitea_service.git_author_name = "Custom Bot" test_gitea_service.git_author_email = "custom@bot.com" test_gitea_service.git_committer_name = "Custom Committer" test_gitea_service.git_committer_email = "committer@bot.com" # Process updates > process_flake_updates( flake_service, test_gitea_service, "", "main", "", auto_merge=False, ) tests/test_process_flake_updates.py:398: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ flake_service = gitea_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=[]) exclude_patterns = '', base_branch = 'main', branch_suffix = '' def process_flake_updates( # noqa: PLR0913 flake_service: FlakeService, gitea_service: GiteaService, exclude_patterns: str, base_branch: str, branch_suffix: str, *, auto_merge: bool, ) -> None: """Process all flake updates. Args: flake_service: Flake service instance gitea_service: Gitea service instance exclude_patterns: Patterns to exclude base_branch: Base branch for PRs branch_suffix: Optional suffix to append to branch names auto_merge: Whether to automatically merge PRs """ # Discover flake files flakes = flake_service.discover_flake_files(exclude_patterns) if not flakes: logger.info("No flake files found") return logger.info("Found %d flake files to process", len(flakes)) failed_inputs: list[str] = [] # Process each flake for flake in flakes: logger.info("Processing flake: %s", flake.file_path) logger.info("Inputs to update: %s", ", ".join(flake.inputs)) # Don't include '.' for root directory parent_path = Path(flake.file_path).parent parent_suffix = "" if parent_path == Path() else f" in {parent_path}" parent_branch = "" if parent_path == Path() else f"-{parent_path}" suffix = branch_suffix.strip().replace("/", "-").strip("-") # Update each input for input_name in flake.inputs: try: branch_name = f"update{parent_branch}-{input_name}" branch_name = branch_name.replace("/", "-").strip("-") if suffix: branch_name = f"{branch_name}-{suffix}" logger.info( "Updating input %s in %s (branch: %s)", input_name, flake.file_path, branch_name, ) # Create worktree and update input with gitea_service.worktree(branch_name, base_branch) as worktree_path: # Update the input flake_service.update_flake_input( input_name, flake.file_path, str(worktree_path), ) # Commit changes commit_message = f"Update {input_name}{parent_suffix}" if gitea_service.commit_changes( branch_name, commit_message, worktree_path, ): # Create pull request pr_title = commit_message pr_body = ( f"This PR updates the `{input_name}` input " f"in `{flake.file_path}`.\n\n" "Generated by update-flake-inputs action." ) gitea_service.create_pull_request( branch_name, base_branch, pr_title, pr_body, auto_merge=auto_merge, ) else: logger.info( "No changes for input %s in %s", input_name, flake.file_path, ) gitea_service.delete_branch(branch_name) except Exception: logger.exception( "Failed to update input %s in %s", input_name, flake.file_path, ) failed_inputs.append(f"{input_name} in {flake.file_path}") if failed_inputs: msg = f"Failed to process {len(failed_inputs)} input(s): {', '.join(failed_inputs)}" > raise UpdateFlakeInputsError(msg) E update_flake_inputs.exceptions.UpdateFlakeInputsError: Failed to process 1 input(s): flake-utils in flake.nix src/update_flake_inputs/cli.py:268: UpdateFlakeInputsError ----------------------------- Captured stdout call ----------------------------- Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/test_custom_git_author_committ0/.git/ [main (root-commit) db1d398] Initial commit 2 files changed, 53 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/remote-test_custom_git_author_committ0.git/ branch 'main' set up to track 'origin/main'. branch 'update-flake-utils' set up to track 'origin/main'. HEAD is now at db1d398 Initial commit ----------------------------- Captured stderr call ----------------------------- hint: Using 'master' as the name for the initial branch. This default branch name hint: will change to "main" in Git 3.0. To configure the initial branch name hint: to use in all of your new repositories, which will suppress this warning, hint: call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m hint: hint: Disable this message with "git config set advice.defaultBranchName false" To /build/pytest-of-nixbld/pytest-0/remote-test_custom_git_author_committ0.git * [new branch] main -> main From /build/pytest-of-nixbld/pytest-0/remote-test_custom_git_author_committ0 * branch main -> FETCH_HEAD Preparing worktree (new branch 'update-flake-utils') ------------------------------ Captured log call ------------------------------- ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 1 Stdout: No stdout output Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/flake-update-xcxj5obi/update-flake-utils?ref=refs/heads/update-flake-utils&rev=db1d3980dbc568f4846e6a3ea792a4affcd45c2d&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-xcxj5obi/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. ERROR update_flake_inputs.cli:cli.py:259 Failed to update input flake-utils in flake.nix Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-xcxj5obi/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates flake_service.update_flake_input( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ input_name, ^^^^^^^^^^^ flake.file_path, ^^^^^^^^^^^^^^^^ str(worktree_path), ^^^^^^^^^^^^^^^^^^^ ) ^ File "/build/src/src/update_flake_inputs/flake_service.py", line 235, in update_flake_input raise FlakeServiceError(msg) from e update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-xcxj5obi/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/flake-update-xcxj5obi/update-flake-utils?ref=refs/heads/update-flake-utils&rev=db1d3980dbc568f4846e6a3ea792a4affcd45c2d&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com __________________ TestProcessFlakeUpdates.test_branch_suffix __________________ self = tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_branch_suffix0') fixtures_path = PosixPath('/build/src/tests/fixtures') @pytest.mark.impure def test_branch_suffix( self, tmp_path: Path, fixtures_path: Path, ) -> None: """Test that branch suffix is properly appended to branch names.""" # Create a flake with flake-utils flake_content = """{ inputs = { flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, flake-utils }: { # Test flake }; }""" (tmp_path / "flake.nix").write_text(flake_content) # Copy old lock file from minimal fixture shutil.copy( fixtures_path / "minimal" / "flake.lock", tmp_path / "flake.lock", ) _setup_git_repo(tmp_path) # Change to test directory original_cwd = Path.cwd() os.chdir(tmp_path) try: # Create test services flake_service = FlakeService() test_gitea_service = MockGiteaService() # Process updates with branch suffix > process_flake_updates( flake_service, test_gitea_service, "", "main", "my-suffix", auto_merge=False, ) tests/test_process_flake_updates.py:465: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ flake_service = gitea_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=[]) exclude_patterns = '', base_branch = 'main', branch_suffix = 'my-suffix' def process_flake_updates( # noqa: PLR0913 flake_service: FlakeService, gitea_service: GiteaService, exclude_patterns: str, base_branch: str, branch_suffix: str, *, auto_merge: bool, ) -> None: """Process all flake updates. Args: flake_service: Flake service instance gitea_service: Gitea service instance exclude_patterns: Patterns to exclude base_branch: Base branch for PRs branch_suffix: Optional suffix to append to branch names auto_merge: Whether to automatically merge PRs """ # Discover flake files flakes = flake_service.discover_flake_files(exclude_patterns) if not flakes: logger.info("No flake files found") return logger.info("Found %d flake files to process", len(flakes)) failed_inputs: list[str] = [] # Process each flake for flake in flakes: logger.info("Processing flake: %s", flake.file_path) logger.info("Inputs to update: %s", ", ".join(flake.inputs)) # Don't include '.' for root directory parent_path = Path(flake.file_path).parent parent_suffix = "" if parent_path == Path() else f" in {parent_path}" parent_branch = "" if parent_path == Path() else f"-{parent_path}" suffix = branch_suffix.strip().replace("/", "-").strip("-") # Update each input for input_name in flake.inputs: try: branch_name = f"update{parent_branch}-{input_name}" branch_name = branch_name.replace("/", "-").strip("-") if suffix: branch_name = f"{branch_name}-{suffix}" logger.info( "Updating input %s in %s (branch: %s)", input_name, flake.file_path, branch_name, ) # Create worktree and update input with gitea_service.worktree(branch_name, base_branch) as worktree_path: # Update the input flake_service.update_flake_input( input_name, flake.file_path, str(worktree_path), ) # Commit changes commit_message = f"Update {input_name}{parent_suffix}" if gitea_service.commit_changes( branch_name, commit_message, worktree_path, ): # Create pull request pr_title = commit_message pr_body = ( f"This PR updates the `{input_name}` input " f"in `{flake.file_path}`.\n\n" "Generated by update-flake-inputs action." ) gitea_service.create_pull_request( branch_name, base_branch, pr_title, pr_body, auto_merge=auto_merge, ) else: logger.info( "No changes for input %s in %s", input_name, flake.file_path, ) gitea_service.delete_branch(branch_name) except Exception: logger.exception( "Failed to update input %s in %s", input_name, flake.file_path, ) failed_inputs.append(f"{input_name} in {flake.file_path}") if failed_inputs: msg = f"Failed to process {len(failed_inputs)} input(s): {', '.join(failed_inputs)}" > raise UpdateFlakeInputsError(msg) E update_flake_inputs.exceptions.UpdateFlakeInputsError: Failed to process 1 input(s): flake-utils in flake.nix src/update_flake_inputs/cli.py:268: UpdateFlakeInputsError ----------------------------- Captured stdout call ----------------------------- Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/test_branch_suffix0/.git/ [main (root-commit) 8ddbe3d] Initial commit 2 files changed, 53 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/remote-test_branch_suffix0.git/ branch 'main' set up to track 'origin/main'. branch 'update-flake-utils-my-suffix' set up to track 'origin/main'. HEAD is now at 8ddbe3d Initial commit ----------------------------- Captured stderr call ----------------------------- hint: Using 'master' as the name for the initial branch. This default branch name hint: will change to "main" in Git 3.0. To configure the initial branch name hint: to use in all of your new repositories, which will suppress this warning, hint: call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m hint: hint: Disable this message with "git config set advice.defaultBranchName false" To /build/pytest-of-nixbld/pytest-0/remote-test_branch_suffix0.git * [new branch] main -> main From /build/pytest-of-nixbld/pytest-0/remote-test_branch_suffix0 * branch main -> FETCH_HEAD Preparing worktree (new branch 'update-flake-utils-my-suffix') ------------------------------ Captured log call ------------------------------- ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 1 Stdout: No stdout output Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/flake-update-5auq95y3/update-flake-utils-my-suffix?ref=refs/heads/update-flake-utils-my-suffix&rev=8ddbe3d2ece5daed4f26df3c1c2194bb76ab1d75&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-5auq95y3/update-flake-utils-my-suffix?shallow=1', 'flake-utils']' returned non-zero exit status 1. ERROR update_flake_inputs.cli:cli.py:259 Failed to update input flake-utils in flake.nix Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-5auq95y3/update-flake-utils-my-suffix?shallow=1', 'flake-utils']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates flake_service.update_flake_input( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ input_name, ^^^^^^^^^^^ flake.file_path, ^^^^^^^^^^^^^^^^ str(worktree_path), ^^^^^^^^^^^^^^^^^^^ ) ^ File "/build/src/src/update_flake_inputs/flake_service.py", line 235, in update_flake_input raise FlakeServiceError(msg) from e update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-5auq95y3/update-flake-utils-my-suffix?shallow=1', 'flake-utils']' returned non-zero exit status 1. Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/flake-update-5auq95y3/update-flake-utils-my-suffix?ref=refs/heads/update-flake-utils-my-suffix&rev=8ddbe3d2ece5daed4f26df3c1c2194bb76ab1d75&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com ____ TestProcessFlakeUpdates.test_fails_at_end_when_individual_input_fails _____ self = tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_fails_at_end_when_individ0') fixtures_path = PosixPath('/build/src/tests/fixtures') @pytest.mark.impure def test_fails_at_end_when_individual_input_fails( self, tmp_path: Path, fixtures_path: Path, ) -> None: """Test that the action continues updating other inputs but fails at the end.""" flake_content = """{ inputs = { flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, flake-utils }: { # Test flake with updatable input }; }""" (tmp_path / "flake.nix").write_text(flake_content) shutil.copy( fixtures_path / "minimal" / "flake.lock", tmp_path / "flake.lock", ) _setup_git_repo(tmp_path) original_cwd = Path.cwd() os.chdir(tmp_path) try: # FailingFlakeService injects "bad-input" during discovery and # raises when asked to update it, simulating a 403 or dead ref flake_service = FailingFlakeService(fail_inputs=["bad-input"]) test_gitea_service = MockGiteaService() with pytest.raises(UpdateFlakeInputsError, match="Failed to process 1 input"): > process_flake_updates( flake_service, test_gitea_service, "", "main", "", auto_merge=False, ) tests/test_process_flake_updates.py:597: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ flake_service = gitea_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=[]) exclude_patterns = '', base_branch = 'main', branch_suffix = '' def process_flake_updates( # noqa: PLR0913 flake_service: FlakeService, gitea_service: GiteaService, exclude_patterns: str, base_branch: str, branch_suffix: str, *, auto_merge: bool, ) -> None: """Process all flake updates. Args: flake_service: Flake service instance gitea_service: Gitea service instance exclude_patterns: Patterns to exclude base_branch: Base branch for PRs branch_suffix: Optional suffix to append to branch names auto_merge: Whether to automatically merge PRs """ # Discover flake files flakes = flake_service.discover_flake_files(exclude_patterns) if not flakes: logger.info("No flake files found") return logger.info("Found %d flake files to process", len(flakes)) failed_inputs: list[str] = [] # Process each flake for flake in flakes: logger.info("Processing flake: %s", flake.file_path) logger.info("Inputs to update: %s", ", ".join(flake.inputs)) # Don't include '.' for root directory parent_path = Path(flake.file_path).parent parent_suffix = "" if parent_path == Path() else f" in {parent_path}" parent_branch = "" if parent_path == Path() else f"-{parent_path}" suffix = branch_suffix.strip().replace("/", "-").strip("-") # Update each input for input_name in flake.inputs: try: branch_name = f"update{parent_branch}-{input_name}" branch_name = branch_name.replace("/", "-").strip("-") if suffix: branch_name = f"{branch_name}-{suffix}" logger.info( "Updating input %s in %s (branch: %s)", input_name, flake.file_path, branch_name, ) # Create worktree and update input with gitea_service.worktree(branch_name, base_branch) as worktree_path: # Update the input flake_service.update_flake_input( input_name, flake.file_path, str(worktree_path), ) # Commit changes commit_message = f"Update {input_name}{parent_suffix}" if gitea_service.commit_changes( branch_name, commit_message, worktree_path, ): # Create pull request pr_title = commit_message pr_body = ( f"This PR updates the `{input_name}` input " f"in `{flake.file_path}`.\n\n" "Generated by update-flake-inputs action." ) gitea_service.create_pull_request( branch_name, base_branch, pr_title, pr_body, auto_merge=auto_merge, ) else: logger.info( "No changes for input %s in %s", input_name, flake.file_path, ) gitea_service.delete_branch(branch_name) except Exception: logger.exception( "Failed to update input %s in %s", input_name, flake.file_path, ) failed_inputs.append(f"{input_name} in {flake.file_path}") if failed_inputs: msg = f"Failed to process {len(failed_inputs)} input(s): {', '.join(failed_inputs)}" > raise UpdateFlakeInputsError(msg) E update_flake_inputs.exceptions.UpdateFlakeInputsError: Failed to process 2 input(s): bad-input in flake.nix, flake-utils in flake.nix src/update_flake_inputs/cli.py:268: UpdateFlakeInputsError During handling of the above exception, another exception occurred: self = tmp_path = PosixPath('/build/pytest-of-nixbld/pytest-0/test_fails_at_end_when_individ0') fixtures_path = PosixPath('/build/src/tests/fixtures') @pytest.mark.impure def test_fails_at_end_when_individual_input_fails( self, tmp_path: Path, fixtures_path: Path, ) -> None: """Test that the action continues updating other inputs but fails at the end.""" flake_content = """{ inputs = { flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, flake-utils }: { # Test flake with updatable input }; }""" (tmp_path / "flake.nix").write_text(flake_content) shutil.copy( fixtures_path / "minimal" / "flake.lock", tmp_path / "flake.lock", ) _setup_git_repo(tmp_path) original_cwd = Path.cwd() os.chdir(tmp_path) try: # FailingFlakeService injects "bad-input" during discovery and # raises when asked to update it, simulating a 403 or dead ref flake_service = FailingFlakeService(fail_inputs=["bad-input"]) test_gitea_service = MockGiteaService() > with pytest.raises(UpdateFlakeInputsError, match="Failed to process 1 input"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AssertionError: Regex pattern did not match. E Expected regex: 'Failed to process 1 input' E Actual message: 'Failed to process 2 input(s): bad-input in flake.nix, flake-utils in flake.nix' tests/test_process_flake_updates.py:596: AssertionError ----------------------------- Captured stdout call ----------------------------- Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/test_fails_at_end_when_individ0/.git/ [main (root-commit) de1321d] Initial commit 2 files changed, 53 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix Initialized empty Git repository in /build/pytest-of-nixbld/pytest-0/remote-test_fails_at_end_when_individ0.git/ branch 'main' set up to track 'origin/main'. branch 'update-bad-input' set up to track 'origin/main'. HEAD is now at de1321d Initial commit branch 'update-flake-utils' set up to track 'origin/main'. HEAD is now at de1321d Initial commit ----------------------------- Captured stderr call ----------------------------- hint: Using 'master' as the name for the initial branch. This default branch name hint: will change to "main" in Git 3.0. To configure the initial branch name hint: to use in all of your new repositories, which will suppress this warning, hint: call: hint: hint: git config --global init.defaultBranch hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m hint: hint: Disable this message with "git config set advice.defaultBranchName false" To /build/pytest-of-nixbld/pytest-0/remote-test_fails_at_end_when_individ0.git * [new branch] main -> main From /build/pytest-of-nixbld/pytest-0/remote-test_fails_at_end_when_individ0 * branch main -> FETCH_HEAD Preparing worktree (new branch 'update-bad-input') From /build/pytest-of-nixbld/pytest-0/remote-test_fails_at_end_when_individ0 * branch main -> FETCH_HEAD Preparing worktree (new branch 'update-flake-utils') ------------------------------ Captured log call ------------------------------- ERROR update_flake_inputs.cli:cli.py:259 Failed to update input bad-input in flake.nix Traceback (most recent call last): File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates flake_service.update_flake_input( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ input_name, ^^^^^^^^^^^ flake.file_path, ^^^^^^^^^^^^^^^^ str(worktree_path), ^^^^^^^^^^^^^^^^^^^ ) ^ File "/build/src/tests/test_process_flake_updates.py", line 635, in update_flake_input raise FlakeServiceError(msg) update_flake_inputs.exceptions.FlakeServiceError: Simulated failure updating bad-input ERROR update_flake_inputs.flake_service:flake_service.py:223 Failed to update flake input flake-utils in flake.nix. Exit code: 1 Stdout: No stdout output Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/flake-update-x10plhr7/update-flake-utils?ref=refs/heads/update-flake-utils&rev=de1321d2eb7913fcda733fc2f46bac51c72e0e08&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-x10plhr7/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. ERROR update_flake_inputs.cli:cli.py:259 Failed to update input flake-utils in flake.nix Traceback (most recent call last): File "/build/src/src/update_flake_inputs/flake_service.py", line 191, in update_flake_input result = subprocess.run( [ ...<10 lines>... check=True, ) File "/nix/store/hba6yralbahlkci5yl40izyh49y0d971-python3-3.13.14-env/lib/python3.13/subprocess.py", line 577, in run raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-x10plhr7/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/build/src/src/update_flake_inputs/cli.py", line 223, in process_flake_updates flake_service.update_flake_input( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ input_name, ^^^^^^^^^^^ flake.file_path, ^^^^^^^^^^^^^^^^ str(worktree_path), ^^^^^^^^^^^^^^^^^^^ ) ^ File "/build/src/tests/test_process_flake_updates.py", line 636, in update_flake_input super().update_flake_input(input_name, flake_file, work_dir) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/build/src/src/update_flake_inputs/flake_service.py", line 235, in update_flake_input raise FlakeServiceError(msg) from e update_flake_inputs.exceptions.FlakeServiceError: Failed to update flake input flake-utils in flake.nix: Command '['nix', 'flake', 'update', '--flake', 'git+file:///build/flake-update-x10plhr7/update-flake-utils?shallow=1', 'flake-utils']' returned non-zero exit status 1. Stderr: warning: you don't have Internet access; disabling some network-dependent features error: … while updating the lock file of flake 'git+file:///build/flake-update-x10plhr7/update-flake-utils?ref=refs/heads/update-flake-utils&rev=de1321d2eb7913fcda733fc2f46bac51c72e0e08&shallow=1' … while updating the flake input 'flake-utils' … while fetching the input 'github:numtide/flake-utils' 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.com =========================== short test summary info ============================ FAILED tests/test_flake_service.py::TestFlakeService::test_update_flake_input FAILED tests/test_flake_service.py::TestFlakeService::test_update_subflake_input FAILED tests/test_process_flake_updates.py::TestProcessFlakeUpdates::test_with_updatable_flake_input FAILED tests/test_process_flake_updates.py::TestProcessFlakeUpdates::test_worktree_based_on_base_branch_not_head FAILED tests/test_process_flake_updates.py::TestProcessFlakeUpdates::test_custom_git_author_committer FAILED tests/test_process_flake_updates.py::TestProcessFlakeUpdates::test_branch_suffix FAILED tests/test_process_flake_updates.py::TestProcessFlakeUpdates::test_fails_at_end_when_individual_input_fails 7 failed, 16 passed in 5.59s