Skip to content

Conversation

@arthanson
Copy link
Collaborator

@arthanson arthanson commented Nov 19, 2025

Fixes: #712

Fixes test suite running on GitHub by increasing the health check timeouts for GitHub

Updates the NetBox (and pynetbox) versions to test against.

@jnovinger
Copy link
Member

I think this is your "figure out what's up with the CI PR". It took a bit of scrolling, but I finally found the below around line 12244 of the "Run Tests" stage of the CI:

/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/pytest_docker/plugin.py:37: Exception
____ ERROR at setup of TestInterface.test_get_fixture_by_kwarg[netbox v4.3] ____

docker_compose_command = 'docker compose'
docker_compose_file = ['/home/runner/work/pynetbox/pynetbox/.netbox-docker-3.3.0/docker-compose-v4.3.yml']
docker_compose_project_name = 'pytest_pynetbox_1763519388'
docker_setup = ['up --build --wait'], docker_cleanup = 'version'

    @pytest.fixture(scope=containers_scope)
    def docker_services(
        docker_compose_command: str,
        docker_compose_file: Union[List[str], str],
        docker_compose_project_name: str,
        docker_setup: str,
        docker_cleanup: str,
    ) -> Iterator[Services]:
        """Start all services from a docker compose file (`docker-compose up`).
        After test are finished, shutdown all services (`docker-compose down`)."""
    
>       with get_docker_services(
            docker_compose_command,
            docker_compose_file,
            docker_compose_project_name,
            docker_setup,
            docker_cleanup,
        ) as docker_service:

/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/pytest_docker/plugin.py:238: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/contextlib.py:137: in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/pytest_docker/plugin.py:212: in get_docker_services
    docker_compose.execute(command)
/opt/hostedtoolcache/Python/3.12.12/x64/lib/python3.12/site-packages/pytest_docker/plugin.py:140: in execute
    return execute(command, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

command = 'docker compose -f "/home/runner/work/pynetbox/pynetbox/.netbox-docker-3.3.0/docker-compose-v4.3.yml" -p "pytest_pynetbox_1763519388" up --build --wait'
success_codes = (0,), ignore_stderr = False

    def execute(command: str, success_codes: Iterable[int] = (0,), ignore_stderr: bool = False) -> Union[bytes, Any]:
        """Run a shell command."""
        try:
            stderr_pipe = subprocess.DEVNULL if ignore_stderr else subprocess.STDOUT
            output = subprocess.check_output(command, stderr=stderr_pipe, shell=True)
            status = 0
        except subprocess.CalledProcessError as error:
            output = error.output or b""
            status = error.returncode
            command = error.cmd
    
        if status not in success_codes:
>           raise Exception(
                'Command {} returned {}: """{}""".'.format(command, status, output.decode("utf-8"))
            )
E           Exception: Command docker compose -f "/home/runner/work/pynetbox/pynetbox/.netbox-docker-3.3.0/docker-compose-v4.3.yml" -p "pytest_pynetbox_1763519388" up --build --wait returned 1: """ 

@arthanson arthanson merged commit c70d57b into master Nov 25, 2025
9 checks passed
@jeremystretch jeremystretch deleted the listset2 branch November 25, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants