Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Replace docker-compose by python-on-whales #38678

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

belimawr
Copy link
Contributor

Proposed commit message

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 28, 2024
@botelastic
Copy link

botelastic bot commented Mar 28, 2024

This pull request doesn't have a Team:<team> label.

Copy link
Contributor

mergify bot commented Mar 28, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @belimawr? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@elasticmachine
Copy link
Collaborator

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2024-03-28T20:11:45.039+0000

  • Duration: 140 min 53 sec

Test stats 🧪

Test Results
Failed 206
Passed 29028
Skipped 2059
Total 31293

Test errors 206

Expand to view the tests failures

> Show only the first 10 test failures

Build&Test / metricbeat-pythonIntegTest / test_namespace – metricbeat.module.aerospike.test_aerospike.Test
    Expand to view the error details

     failed on setup with "python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/aerospike/docker-compose.yml --project-name aerospike_7918a246f6f8 down --volumes`.
    It returned with code 125
    The content of stdout can be found above the stacktrace (it wasn't captured).
    The content of stderr can be found above the stacktrace (it wasn't captured)." 
    

    Expand to view the stacktrace

     cls = <class 'test_aerospike.Test'>
    
        @classmethod
        def compose_up_with_retries(cls):
            """
            compose_up_with_retries runs docker compose to start the test containers
            """
            retries = 3
            for i in range(retries):
                try:
    >               cls.compose_up()
    
    ../libbeat/tests/system/beat/beat.py:218: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    cls = <class 'test_aerospike.Test'>
    
        @classmethod
        def compose_up(cls):
            """
            Ensure *only* the services defined under `COMPOSE_SERVICES` are running and healthy
            """
            if not INTEGRATION_TESTS or not cls.COMPOSE_SERVICES:
                return
        
            if os.environ.get('NO_COMPOSE'):
                return
        
            def print_logs(container):
                print("---- " + container.name_without_project)
                print(container.logs())
                print("----")
        
            def is_healthy(container):
                return container.state.health.status == 'healthy' #container.inspect()['State']['Health']['Status'] == 'healthy'
        
            project = cls.compose_project()
        
            with disabled_logger('compose.service'):
    >           project.pull(
                    ignore_pull_failures=True,
                    services=cls.COMPOSE_SERVICES)
    
    ../libbeat/tests/system/beat/compose.py:62: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <python_on_whales.components.compose.cli_wrapper.ComposeCLI object at 0x7f2b9e8e4f50>
    services = ['aerospike'], ignore_pull_failures = True, include_deps = False
    quiet = False, stream_logs = False
    
        def pull(
            self,
            services: Union[List[str], str, None] = None,
            ignore_pull_failures: bool = False,
            include_deps: bool = False,
            quiet: bool = False,
            stream_logs: bool = False,
        ) -> Union[Iterable[Tuple[str, bytes]], None]:
            """Pull service images
        
            Parameters:
                services: The list of services to select. Only the images of those
                    services will be pulled. If no services are specified (`None`) (the default
                    behavior) all images of all services are pulled.
                    If an empty list is provided, then the function call is a no-op.
                ignore_pull_failures: Pull what it can and ignores images with pull failures
                include_deps: Also pull services declared as dependencies
                quiet: By default, the progress bars are printed in stdout and stderr (both).
                    To disable all output, use `quiet=True`
                stream_logs: If `False` this function returns None. If `True`, this
                    function returns an Iterable of `Tuple[str, bytes]` where the first element
                    is the type of log (`"stdin"` or `"stdout"`). The second element is the log itself,
                    as bytes, you'll need to call `.decode()` if you want the logs as `str`.
                    See [the streaming guide](https://gabrieldemarmiesse.github.io/python-on-whales/user_guide/docker_run/#stream-the-output) if you are
                    not familiar with the streaming of logs in Python-on-whales.
        
            """
            if quiet and stream_logs:
                raise ValueError(
                    "It's not possible to have stream_logs=True and quiet=True at the same time. "
                    "Only one can be activated at a time."
                )
            full_cmd = self.docker_compose_cmd + ["pull"]
            full_cmd.add_flag("--ignore-pull-failures", ignore_pull_failures)
            full_cmd.add_flag("--include-deps", include_deps)
            full_cmd.add_flag("--quiet", quiet)
            if services == []:
                return
            elif services is not None:
                services = to_list(services)
                full_cmd += services
            if stream_logs:
                return stream_stdout_and_stderr(full_cmd)
            else:
    >           run(full_cmd, capture_stdout=False, capture_stderr=False)
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:570: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/aerospike/docker-compose.yml', '--project-name', 'aerospike_7918a246f6f8', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/aerospike/docker-compose.yml --project-name aerospike_7918a246f6f8 pull --ignore-pull-failures aerospike`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException
    
    During handling of the above exception, another exception occurred:
    
    cls = <class 'test_aerospike.Test'>
    
        @classmethod
        def setUpClass(cls):  # pylint: disable=invalid-name
            """
            initializes the Test class
            """
            if not hasattr(cls, 'beat_name'):
                cls.beat_name = "metricbeat"
        
            if not hasattr(cls, 'beat_path'):
                cls.beat_path = os.path.abspath(
                    os.path.join(os.path.dirname(__file__), "../../"))
        
    >       super().setUpClass()
    
    tests/system/metricbeat.py:42: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:204: in setUpClass
        cls.compose_up_with_retries()
    ../libbeat/tests/system/beat/beat.py:224: in compose_up_with_retries
        cls.compose_down()
    ../libbeat/tests/system/beat/compose.py:148: in compose_down
        cls.compose_project().down(volumes=True)
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:272: in down
        run(full_cmd, capture_stderr=quiet, capture_stdout=quiet)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/aerospike/docker-compose.yml', '--project-name', 'aerospike_7918a246f6f8', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/aerospike/docker-compose.yml --project-name aerospike_7918a246f6f8 down --volumes`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException 
    

Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.apache.test_apache.ApacheStatusTest_0
    Expand to view the error details

     failed on setup with "python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/apache/docker-compose.yml --project-name apache_38fb44bdb2fbe4e9 down --volumes`.
    It returned with code 125
    The content of stdout can be found above the stacktrace (it wasn't captured).
    The content of stderr can be found above the stacktrace (it wasn't captured)." 
    

    Expand to view the stacktrace

     cls = <class 'test_apache.ApacheStatusTest_0'>
    
        @classmethod
        def compose_up_with_retries(cls):
            """
            compose_up_with_retries runs docker compose to start the test containers
            """
            retries = 3
            for i in range(retries):
                try:
    >               cls.compose_up()
    
    ../libbeat/tests/system/beat/beat.py:218: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    cls = <class 'test_apache.ApacheStatusTest_0'>
    
        @classmethod
        def compose_up(cls):
            """
            Ensure *only* the services defined under `COMPOSE_SERVICES` are running and healthy
            """
            if not INTEGRATION_TESTS or not cls.COMPOSE_SERVICES:
                return
        
            if os.environ.get('NO_COMPOSE'):
                return
        
            def print_logs(container):
                print("---- " + container.name_without_project)
                print(container.logs())
                print("----")
        
            def is_healthy(container):
                return container.state.health.status == 'healthy' #container.inspect()['State']['Health']['Status'] == 'healthy'
        
            project = cls.compose_project()
        
            with disabled_logger('compose.service'):
    >           project.pull(
                    ignore_pull_failures=True,
                    services=cls.COMPOSE_SERVICES)
    
    ../libbeat/tests/system/beat/compose.py:62: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <python_on_whales.components.compose.cli_wrapper.ComposeCLI object at 0x7f2b9ea4e510>
    services = ['apache'], ignore_pull_failures = True, include_deps = False
    quiet = False, stream_logs = False
    
        def pull(
            self,
            services: Union[List[str], str, None] = None,
            ignore_pull_failures: bool = False,
            include_deps: bool = False,
            quiet: bool = False,
            stream_logs: bool = False,
        ) -> Union[Iterable[Tuple[str, bytes]], None]:
            """Pull service images
        
            Parameters:
                services: The list of services to select. Only the images of those
                    services will be pulled. If no services are specified (`None`) (the default
                    behavior) all images of all services are pulled.
                    If an empty list is provided, then the function call is a no-op.
                ignore_pull_failures: Pull what it can and ignores images with pull failures
                include_deps: Also pull services declared as dependencies
                quiet: By default, the progress bars are printed in stdout and stderr (both).
                    To disable all output, use `quiet=True`
                stream_logs: If `False` this function returns None. If `True`, this
                    function returns an Iterable of `Tuple[str, bytes]` where the first element
                    is the type of log (`"stdin"` or `"stdout"`). The second element is the log itself,
                    as bytes, you'll need to call `.decode()` if you want the logs as `str`.
                    See [the streaming guide](https://gabrieldemarmiesse.github.io/python-on-whales/user_guide/docker_run/#stream-the-output) if you are
                    not familiar with the streaming of logs in Python-on-whales.
        
            """
            if quiet and stream_logs:
                raise ValueError(
                    "It's not possible to have stream_logs=True and quiet=True at the same time. "
                    "Only one can be activated at a time."
                )
            full_cmd = self.docker_compose_cmd + ["pull"]
            full_cmd.add_flag("--ignore-pull-failures", ignore_pull_failures)
            full_cmd.add_flag("--include-deps", include_deps)
            full_cmd.add_flag("--quiet", quiet)
            if services == []:
                return
            elif services is not None:
                services = to_list(services)
                full_cmd += services
            if stream_logs:
                return stream_stdout_and_stderr(full_cmd)
            else:
    >           run(full_cmd, capture_stdout=False, capture_stderr=False)
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:570: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/apache/docker-compose.yml', '--project-name', 'apache_38fb44bdb2fbe4e9', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/apache/docker-compose.yml --project-name apache_38fb44bdb2fbe4e9 pull --ignore-pull-failures apache`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException
    
    During handling of the above exception, another exception occurred:
    
    cls = <class 'test_apache.ApacheStatusTest_0'>
    
        @classmethod
        def setUpClass(cls):  # pylint: disable=invalid-name
            """
            initializes the Test class
            """
            if not hasattr(cls, 'beat_name'):
                cls.beat_name = "metricbeat"
        
            if not hasattr(cls, 'beat_path'):
                cls.beat_path = os.path.abspath(
                    os.path.join(os.path.dirname(__file__), "../../"))
        
    >       super().setUpClass()
    
    tests/system/metricbeat.py:42: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:204: in setUpClass
        cls.compose_up_with_retries()
    ../libbeat/tests/system/beat/beat.py:224: in compose_up_with_retries
        cls.compose_down()
    ../libbeat/tests/system/beat/compose.py:148: in compose_down
        cls.compose_project().down(volumes=True)
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:272: in down
        run(full_cmd, capture_stderr=quiet, capture_stdout=quiet)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/apache/docker-compose.yml', '--project-name', 'apache_38fb44bdb2fbe4e9', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/apache/docker-compose.yml --project-name apache_38fb44bdb2fbe4e9 down --volumes`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException 
    

Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.apache.test_apache.ApacheStatusTest_1
    Expand to view the error details

     failed on setup with "python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/apache/docker-compose.yml --project-name apache_89425b5b2588cd29 down --volumes`.
    It returned with code 125
    The content of stdout can be found above the stacktrace (it wasn't captured).
    The content of stderr can be found above the stacktrace (it wasn't captured)." 
    

    Expand to view the stacktrace

     cls = <class 'test_apache.ApacheStatusTest_1'>
    
        @classmethod
        def compose_up_with_retries(cls):
            """
            compose_up_with_retries runs docker compose to start the test containers
            """
            retries = 3
            for i in range(retries):
                try:
    >               cls.compose_up()
    
    ../libbeat/tests/system/beat/beat.py:218: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    cls = <class 'test_apache.ApacheStatusTest_1'>
    
        @classmethod
        def compose_up(cls):
            """
            Ensure *only* the services defined under `COMPOSE_SERVICES` are running and healthy
            """
            if not INTEGRATION_TESTS or not cls.COMPOSE_SERVICES:
                return
        
            if os.environ.get('NO_COMPOSE'):
                return
        
            def print_logs(container):
                print("---- " + container.name_without_project)
                print(container.logs())
                print("----")
        
            def is_healthy(container):
                return container.state.health.status == 'healthy' #container.inspect()['State']['Health']['Status'] == 'healthy'
        
            project = cls.compose_project()
        
            with disabled_logger('compose.service'):
    >           project.pull(
                    ignore_pull_failures=True,
                    services=cls.COMPOSE_SERVICES)
    
    ../libbeat/tests/system/beat/compose.py:62: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <python_on_whales.components.compose.cli_wrapper.ComposeCLI object at 0x7f2b9ea0ea10>
    services = ['apache'], ignore_pull_failures = True, include_deps = False
    quiet = False, stream_logs = False
    
        def pull(
            self,
            services: Union[List[str], str, None] = None,
            ignore_pull_failures: bool = False,
            include_deps: bool = False,
            quiet: bool = False,
            stream_logs: bool = False,
        ) -> Union[Iterable[Tuple[str, bytes]], None]:
            """Pull service images
        
            Parameters:
                services: The list of services to select. Only the images of those
                    services will be pulled. If no services are specified (`None`) (the default
                    behavior) all images of all services are pulled.
                    If an empty list is provided, then the function call is a no-op.
                ignore_pull_failures: Pull what it can and ignores images with pull failures
                include_deps: Also pull services declared as dependencies
                quiet: By default, the progress bars are printed in stdout and stderr (both).
                    To disable all output, use `quiet=True`
                stream_logs: If `False` this function returns None. If `True`, this
                    function returns an Iterable of `Tuple[str, bytes]` where the first element
                    is the type of log (`"stdin"` or `"stdout"`). The second element is the log itself,
                    as bytes, you'll need to call `.decode()` if you want the logs as `str`.
                    See [the streaming guide](https://gabrieldemarmiesse.github.io/python-on-whales/user_guide/docker_run/#stream-the-output) if you are
                    not familiar with the streaming of logs in Python-on-whales.
        
            """
            if quiet and stream_logs:
                raise ValueError(
                    "It's not possible to have stream_logs=True and quiet=True at the same time. "
                    "Only one can be activated at a time."
                )
            full_cmd = self.docker_compose_cmd + ["pull"]
            full_cmd.add_flag("--ignore-pull-failures", ignore_pull_failures)
            full_cmd.add_flag("--include-deps", include_deps)
            full_cmd.add_flag("--quiet", quiet)
            if services == []:
                return
            elif services is not None:
                services = to_list(services)
                full_cmd += services
            if stream_logs:
                return stream_stdout_and_stderr(full_cmd)
            else:
    >           run(full_cmd, capture_stdout=False, capture_stderr=False)
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:570: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/apache/docker-compose.yml', '--project-name', 'apache_89425b5b2588cd29', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/apache/docker-compose.yml --project-name apache_89425b5b2588cd29 pull --ignore-pull-failures apache`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException
    
    During handling of the above exception, another exception occurred:
    
    cls = <class 'test_apache.ApacheStatusTest_1'>
    
        @classmethod
        def setUpClass(cls):  # pylint: disable=invalid-name
            """
            initializes the Test class
            """
            if not hasattr(cls, 'beat_name'):
                cls.beat_name = "metricbeat"
        
            if not hasattr(cls, 'beat_path'):
                cls.beat_path = os.path.abspath(
                    os.path.join(os.path.dirname(__file__), "../../"))
        
    >       super().setUpClass()
    
    tests/system/metricbeat.py:42: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:204: in setUpClass
        cls.compose_up_with_retries()
    ../libbeat/tests/system/beat/beat.py:224: in compose_up_with_retries
        cls.compose_down()
    ../libbeat/tests/system/beat/compose.py:148: in compose_down
        cls.compose_project().down(volumes=True)
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:272: in down
        run(full_cmd, capture_stderr=quiet, capture_stdout=quiet)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/apache/docker-compose.yml', '--project-name', 'apache_89425b5b2588cd29', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/apache/docker-compose.yml --project-name apache_89425b5b2588cd29 down --volumes`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException 
    

Build&Test / metricbeat-pythonIntegTest / test_metricsets_0_stats – metricbeat.module.beat.test_beat.Test
    Expand to view the error details

     failed on setup with "python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/docker-compose.yml --project-name metricbeat_7918a246f6f8 kill metricbeat elasticsearch`.
    It returned with code 125
    The content of stdout is ''
    The content of stderr is 'unknown flag: --file
    See 'docker --help'.
    
    Usage:  docker [OPTIONS] COMMAND
    
    A self-sufficient runtime for containers
    
    Options:
          --config string      Location of client config files (default
                               "/root/.docker")
      -c, --context string     Name of the context to use to connect to the
                               daemon (overrides DOCKER_HOST env var and
                               default context set with "docker context use")
      -D, --debug              Enable debug mode
      -H, --host list          Daemon socket(s) to connect to
      -l, --log-level string   Set the logging level
                               ("debug"|"info"|"warn"|"error"|"fatal")
                               (default "info")
          --tls                Use TLS; implied by --tlsverify
          --tlscacert string   Trust certs signed only by this CA (default
                               "/root/.docker/ca.pem")
          --tlscert string     Path to TLS certificate file (default
                               "/root/.docker/cert.pem")
          --tlskey string      Path to TLS key file (default
                               "/root/.docker/key.pem")
          --tlsverify          Use TLS and verify the remote
      -v, --version            Print version information and quit
    
    Management Commands:
      builder     Manage builds
      config      Manage Docker configs
      container   Manage containers
      context     Manage contexts
      image       Manage images
      manifest    Manage Docker image manifests and manifest lists
      network     Manage networks
      node        Manage Swarm nodes
      plugin      Manage plugins
      secret      Manage Docker secrets
      service     Manage services
      stack       Manage Docker stacks
      swarm       Manage Swarm
      system      Manage Docker
      trust       Manage trust on Docker images
      volume      Manage volumes
    
    Commands:
      attach      Attach local standard input, output, and error streams to a running container
      build       Build an image from a Dockerfile
      commit      Create a new image from a container's changes
      cp          Copy files/folders between a container and the local filesystem
      create      Create a new container
      diff        Inspect changes to files or directories on a container's filesystem
      events      Get real time events from the server
      exec        Run a command in a running container
      export      Export a container's filesystem as a tar archive
      history     Show the history of an image
      images      List images
      import      Import the contents from a tarball to create a filesystem image
      info        Display system-wide information
      inspect     Return low-level information on Docker objects
      kill        Kill one or more running containers
      load        Load an image from a tar archive or STDIN
      login       Log in to a Docker registry
      logout      Log out from a Docker registry
      logs        Fetch the logs of a container
      pause       Pause all processes within one or more containers
      port        List port mappings or a specific mapping for the container
      ps          List containers
      pull        Pull an image or a repository from a registry
      push        Push an image or a repository to a registry
      rename      Rename a container
      restart     Restart one or more containers
      rm          Remove one or more containers
      rmi         Remove one or more images
      run         Run a command in a new container
      save        Save one or more images to a tar archive (streamed to STDOUT by default)
      search      Search the Docker Hub for images
      start       Start one or more stopped containers
      stats       Display a live stream of container(s) resource usage statistics
      stop        Stop one or more running containers
      tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
      top         Display the running processes of a container
      unpause     Unpause all processes within one or more containers
      update      Update configuration of one or more containers
      version     Show the Docker version information
      wait        Block until one or more containers stop, then print their exit codes
    
    Run 'docker COMMAND --help' for more information on a command.
    
    #x1B[1mTo get more help with docker, check out our guides at https://docs.docker.com/go/guides/#x1B[0m
    
    '" 
    

    Expand to view the stacktrace

     cls = <class 'test_beat.Test'>
    
        @classmethod
        def compose_up_with_retries(cls):
            """
            compose_up_with_retries runs docker compose to start the test containers
            """
            retries = 3
            for i in range(retries):
                try:
    >               cls.compose_up()
    
    ../libbeat/tests/system/beat/beat.py:218: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    cls = <class 'test_beat.Test'>
    
        @classmethod
        def compose_up(cls):
            """
            Ensure *only* the services defined under `COMPOSE_SERVICES` are running and healthy
            """
            if not INTEGRATION_TESTS or not cls.COMPOSE_SERVICES:
                return
        
            if os.environ.get('NO_COMPOSE'):
                return
        
            def print_logs(container):
                print("---- " + container.name_without_project)
                print(container.logs())
                print("----")
        
            def is_healthy(container):
                return container.state.health.status == 'healthy' #container.inspect()['State']['Health']['Status'] == 'healthy'
        
            project = cls.compose_project()
        
            with disabled_logger('compose.service'):
    >           project.pull(
                    ignore_pull_failures=True,
                    services=cls.COMPOSE_SERVICES)
    
    ../libbeat/tests/system/beat/compose.py:62: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <python_on_whales.components.compose.cli_wrapper.ComposeCLI object at 0x7f2b9eafaa50>
    services = ['metricbeat', 'elasticsearch'], ignore_pull_failures = True
    include_deps = False, quiet = False, stream_logs = False
    
        def pull(
            self,
            services: Union[List[str], str, None] = None,
            ignore_pull_failures: bool = False,
            include_deps: bool = False,
            quiet: bool = False,
            stream_logs: bool = False,
        ) -> Union[Iterable[Tuple[str, bytes]], None]:
            """Pull service images
        
            Parameters:
                services: The list of services to select. Only the images of those
                    services will be pulled. If no services are specified (`None`) (the default
                    behavior) all images of all services are pulled.
                    If an empty list is provided, then the function call is a no-op.
                ignore_pull_failures: Pull what it can and ignores images with pull failures
                include_deps: Also pull services declared as dependencies
                quiet: By default, the progress bars are printed in stdout and stderr (both).
                    To disable all output, use `quiet=True`
                stream_logs: If `False` this function returns None. If `True`, this
                    function returns an Iterable of `Tuple[str, bytes]` where the first element
                    is the type of log (`"stdin"` or `"stdout"`). The second element is the log itself,
                    as bytes, you'll need to call `.decode()` if you want the logs as `str`.
                    See [the streaming guide](https://gabrieldemarmiesse.github.io/python-on-whales/user_guide/docker_run/#stream-the-output) if you are
                    not familiar with the streaming of logs in Python-on-whales.
        
            """
            if quiet and stream_logs:
                raise ValueError(
                    "It's not possible to have stream_logs=True and quiet=True at the same time. "
                    "Only one can be activated at a time."
                )
            full_cmd = self.docker_compose_cmd + ["pull"]
            full_cmd.add_flag("--ignore-pull-failures", ignore_pull_failures)
            full_cmd.add_flag("--include-deps", include_deps)
            full_cmd.add_flag("--quiet", quiet)
            if services == []:
                return
            elif services is not None:
                services = to_list(services)
                full_cmd += services
            if stream_logs:
                return stream_stdout_and_stderr(full_cmd)
            else:
    >           run(full_cmd, capture_stdout=False, capture_stderr=False)
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:570: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/docker-compose.yml', '--project-name', 'metricbeat_7918a246f6f8', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/docker-compose.yml --project-name metricbeat_7918a246f6f8 pull --ignore-pull-failures metricbeat elasticsearch`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException
    
    During handling of the above exception, another exception occurred:
    
    cls = <class 'test_beat.Test'>
    
        @classmethod
        def setUpClass(cls):  # pylint: disable=invalid-name
            """
            initializes the Test class
            """
            if not hasattr(cls, 'beat_name'):
                cls.beat_name = "metricbeat"
        
            if not hasattr(cls, 'beat_path'):
                cls.beat_path = os.path.abspath(
                    os.path.join(os.path.dirname(__file__), "../../"))
        
    >       super().setUpClass()
    
    tests/system/metricbeat.py:42: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:204: in setUpClass
        cls.compose_up_with_retries()
    ../libbeat/tests/system/beat/beat.py:224: in compose_up_with_retries
        cls.compose_down()
    ../libbeat/tests/system/beat/compose.py:150: in compose_down
        cls.compose_project().kill(services=cls.COMPOSE_SERVICES)
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:340: in kill
        run(full_cmd)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/docker-compose.yml', '--project-name', 'metricbeat_7918a246f6f8', ...]
    capture_stdout = True, capture_stderr = True, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/docker-compose.yml --project-name metricbeat_7918a246f6f8 kill metricbeat elasticsearch`.
    E           It returned with code 125
    E           The content of stdout is ''
    E           The content of stderr is 'unknown flag: --file
    E           See 'docker --help'.
    E           
    E           Usage:  docker [OPTIONS] COMMAND
    E           
    E           A self-sufficient runtime for containers
    E           
    E           Options:
    E                 --config string      Location of client config files (default
    E                                      "/root/.docker")
    E             -c, --context string     Name of the context to use to connect to the
    E                                      daemon (overrides DOCKER_HOST env var and
    E                                      default context set with "docker context use")
    E             -D, --debug              Enable debug mode
    E             -H, --host list          Daemon socket(s) to connect to
    E             -l, --log-level string   Set the logging level
    E                                      ("debug"|"info"|"warn"|"error"|"fatal")
    E                                      (default "info")
    E                 --tls                Use TLS; implied by --tlsverify
    E                 --tlscacert string   Trust certs signed only by this CA (default
    E                                      "/root/.docker/ca.pem")
    E                 --tlscert string     Path to TLS certificate file (default
    E                                      "/root/.docker/cert.pem")
    E                 --tlskey string      Path to TLS key file (default
    E                                      "/root/.docker/key.pem")
    E                 --tlsverify          Use TLS and verify the remote
    E             -v, --version            Print version information and quit
    E           
    E           Management Commands:
    E             builder     Manage builds
    E             config      Manage Docker configs
    E             container   Manage containers
    E             context     Manage contexts
    E             image       Manage images
    E             manifest    Manage Docker image manifests and manifest lists
    E             network     Manage networks
    E             node        Manage Swarm nodes
    E             plugin      Manage plugins
    E             secret      Manage Docker secrets
    E             service     Manage services
    E             stack       Manage Docker stacks
    E             swarm       Manage Swarm
    E             system      Manage Docker
    E             trust       Manage trust on Docker images
    E             volume      Manage volumes
    E           
    E           Commands:
    E             attach      Attach local standard input, output, and error streams to a running container
    E             build       Build an image from a Dockerfile
    E             commit      Create a new image from a container's changes
    E             cp          Copy files/folders between a container and the local filesystem
    E             create      Create a new container
    E             diff        Inspect changes to files or directories on a container's filesystem
    E             events      Get real time events from the server
    E             exec        Run a command in a running container
    E             export      Export a container's filesystem as a tar archive
    E             history     Show the history of an image
    E             images      List images
    E             import      Import the contents from a tarball to create a filesystem image
    E             info        Display system-wide information
    E             inspect     Return low-level information on Docker objects
    E             kill        Kill one or more running containers
    E             load        Load an image from a tar archive or STDIN
    E             login       Log in to a Docker registry
    E             logout      Log out from a Docker registry
    E             logs        Fetch the logs of a container
    E             pause       Pause all processes within one or more containers
    E             port        List port mappings or a specific mapping for the container
    E             ps          List containers
    E             pull        Pull an image or a repository from a registry
    E             push        Push an image or a repository to a registry
    E             rename      Rename a container
    E             restart     Restart one or more containers
    E             rm          Remove one or more containers
    E             rmi         Remove one or more images
    E             run         Run a command in a new container
    E             save        Save one or more images to a tar archive (streamed to STDOUT by default)
    E             search      Search the Docker Hub for images
    E             start       Start one or more stopped containers
    E             stats       Display a live stream of container(s) resource usage statistics
    E             stop        Stop one or more running containers
    E             tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
    E             top         Display the running processes of a container
    E             unpause     Unpause all processes within one or more containers
    E             update      Update configuration of one or more containers
    E             version     Show the Docker version information
    E             wait        Block until one or more containers stop, then print their exit codes
    E           
    E           Run 'docker COMMAND --help' for more information on a command.
    E           
    E           #x1B[1mTo get more help with docker, check out our guides at https://docs.docker.com/go/guides/#x1B[0m
    E           
    E           '
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException 
    

Build&Test / metricbeat-pythonIntegTest / test_metricsets_1_state – metricbeat.module.beat.test_beat.Test
    Expand to view the error details

     failed on setup with "python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/docker-compose.yml --project-name metricbeat_7918a246f6f8 kill metricbeat elasticsearch`.
    It returned with code 125
    The content of stdout is ''
    The content of stderr is 'unknown flag: --file
    See 'docker --help'.
    
    Usage:  docker [OPTIONS] COMMAND
    
    A self-sufficient runtime for containers
    
    Options:
          --config string      Location of client config files (default
                               "/root/.docker")
      -c, --context string     Name of the context to use to connect to the
                               daemon (overrides DOCKER_HOST env var and
                               default context set with "docker context use")
      -D, --debug              Enable debug mode
      -H, --host list          Daemon socket(s) to connect to
      -l, --log-level string   Set the logging level
                               ("debug"|"info"|"warn"|"error"|"fatal")
                               (default "info")
          --tls                Use TLS; implied by --tlsverify
          --tlscacert string   Trust certs signed only by this CA (default
                               "/root/.docker/ca.pem")
          --tlscert string     Path to TLS certificate file (default
                               "/root/.docker/cert.pem")
          --tlskey string      Path to TLS key file (default
                               "/root/.docker/key.pem")
          --tlsverify          Use TLS and verify the remote
      -v, --version            Print version information and quit
    
    Management Commands:
      builder     Manage builds
      config      Manage Docker configs
      container   Manage containers
      context     Manage contexts
      image       Manage images
      manifest    Manage Docker image manifests and manifest lists
      network     Manage networks
      node        Manage Swarm nodes
      plugin      Manage plugins
      secret      Manage Docker secrets
      service     Manage services
      stack       Manage Docker stacks
      swarm       Manage Swarm
      system      Manage Docker
      trust       Manage trust on Docker images
      volume      Manage volumes
    
    Commands:
      attach      Attach local standard input, output, and error streams to a running container
      build       Build an image from a Dockerfile
      commit      Create a new image from a container's changes
      cp          Copy files/folders between a container and the local filesystem
      create      Create a new container
      diff        Inspect changes to files or directories on a container's filesystem
      events      Get real time events from the server
      exec        Run a command in a running container
      export      Export a container's filesystem as a tar archive
      history     Show the history of an image
      images      List images
      import      Import the contents from a tarball to create a filesystem image
      info        Display system-wide information
      inspect     Return low-level information on Docker objects
      kill        Kill one or more running containers
      load        Load an image from a tar archive or STDIN
      login       Log in to a Docker registry
      logout      Log out from a Docker registry
      logs        Fetch the logs of a container
      pause       Pause all processes within one or more containers
      port        List port mappings or a specific mapping for the container
      ps          List containers
      pull        Pull an image or a repository from a registry
      push        Push an image or a repository to a registry
      rename      Rename a container
      restart     Restart one or more containers
      rm          Remove one or more containers
      rmi         Remove one or more images
      run         Run a command in a new container
      save        Save one or more images to a tar archive (streamed to STDOUT by default)
      search      Search the Docker Hub for images
      start       Start one or more stopped containers
      stats       Display a live stream of container(s) resource usage statistics
      stop        Stop one or more running containers
      tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
      top         Display the running processes of a container
      unpause     Unpause all processes within one or more containers
      update      Update configuration of one or more containers
      version     Show the Docker version information
      wait        Block until one or more containers stop, then print their exit codes
    
    Run 'docker COMMAND --help' for more information on a command.
    
    #x1B[1mTo get more help with docker, check out our guides at https://docs.docker.com/go/guides/#x1B[0m
    
    '" 
    

    Expand to view the stacktrace

     cls = <class 'test_beat.Test'>
    
        @classmethod
        def compose_up_with_retries(cls):
            """
            compose_up_with_retries runs docker compose to start the test containers
            """
            retries = 3
            for i in range(retries):
                try:
    >               cls.compose_up()
    
    ../libbeat/tests/system/beat/beat.py:218: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    cls = <class 'test_beat.Test'>
    
        @classmethod
        def compose_up(cls):
            """
            Ensure *only* the services defined under `COMPOSE_SERVICES` are running and healthy
            """
            if not INTEGRATION_TESTS or not cls.COMPOSE_SERVICES:
                return
        
            if os.environ.get('NO_COMPOSE'):
                return
        
            def print_logs(container):
                print("---- " + container.name_without_project)
                print(container.logs())
                print("----")
        
            def is_healthy(container):
                return container.state.health.status == 'healthy' #container.inspect()['State']['Health']['Status'] == 'healthy'
        
            project = cls.compose_project()
        
            with disabled_logger('compose.service'):
    >           project.pull(
                    ignore_pull_failures=True,
                    services=cls.COMPOSE_SERVICES)
    
    ../libbeat/tests/system/beat/compose.py:62: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <python_on_whales.components.compose.cli_wrapper.ComposeCLI object at 0x7f2b9eafaa50>
    services = ['metricbeat', 'elasticsearch'], ignore_pull_failures = True
    include_deps = False, quiet = False, stream_logs = False
    
        def pull(
            self,
            services: Union[List[str], str, None] = None,
            ignore_pull_failures: bool = False,
            include_deps: bool = False,
            quiet: bool = False,
            stream_logs: bool = False,
        ) -> Union[Iterable[Tuple[str, bytes]], None]:
            """Pull service images
        
            Parameters:
                services: The list of services to select. Only the images of those
                    services will be pulled. If no services are specified (`None`) (the default
                    behavior) all images of all services are pulled.
                    If an empty list is provided, then the function call is a no-op.
                ignore_pull_failures: Pull what it can and ignores images with pull failures
                include_deps: Also pull services declared as dependencies
                quiet: By default, the progress bars are printed in stdout and stderr (both).
                    To disable all output, use `quiet=True`
                stream_logs: If `False` this function returns None. If `True`, this
                    function returns an Iterable of `Tuple[str, bytes]` where the first element
                    is the type of log (`"stdin"` or `"stdout"`). The second element is the log itself,
                    as bytes, you'll need to call `.decode()` if you want the logs as `str`.
                    See [the streaming guide](https://gabrieldemarmiesse.github.io/python-on-whales/user_guide/docker_run/#stream-the-output) if you are
                    not familiar with the streaming of logs in Python-on-whales.
        
            """
            if quiet and stream_logs:
                raise ValueError(
                    "It's not possible to have stream_logs=True and quiet=True at the same time. "
                    "Only one can be activated at a time."
                )
            full_cmd = self.docker_compose_cmd + ["pull"]
            full_cmd.add_flag("--ignore-pull-failures", ignore_pull_failures)
            full_cmd.add_flag("--include-deps", include_deps)
            full_cmd.add_flag("--quiet", quiet)
            if services == []:
                return
            elif services is not None:
                services = to_list(services)
                full_cmd += services
            if stream_logs:
                return stream_stdout_and_stderr(full_cmd)
            else:
    >           run(full_cmd, capture_stdout=False, capture_stderr=False)
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:570: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/docker-compose.yml', '--project-name', 'metricbeat_7918a246f6f8', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/docker-compose.yml --project-name metricbeat_7918a246f6f8 pull --ignore-pull-failures metricbeat elasticsearch`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException
    
    During handling of the above exception, another exception occurred:
    
    cls = <class 'test_beat.Test'>
    
        @classmethod
        def setUpClass(cls):  # pylint: disable=invalid-name
            """
            initializes the Test class
            """
            if not hasattr(cls, 'beat_name'):
                cls.beat_name = "metricbeat"
        
            if not hasattr(cls, 'beat_path'):
                cls.beat_path = os.path.abspath(
                    os.path.join(os.path.dirname(__file__), "../../"))
        
    >       super().setUpClass()
    
    tests/system/metricbeat.py:42: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:204: in setUpClass
        cls.compose_up_with_retries()
    ../libbeat/tests/system/beat/beat.py:224: in compose_up_with_retries
        cls.compose_down()
    ../libbeat/tests/system/beat/compose.py:150: in compose_down
        cls.compose_project().kill(services=cls.COMPOSE_SERVICES)
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:340: in kill
        run(full_cmd)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/docker-compose.yml', '--project-name', 'metricbeat_7918a246f6f8', ...]
    capture_stdout = True, capture_stderr = True, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/docker-compose.yml --project-name metricbeat_7918a246f6f8 kill metricbeat elasticsearch`.
    E           It returned with code 125
    E           The content of stdout is ''
    E           The content of stderr is 'unknown flag: --file
    E           See 'docker --help'.
    E           
    E           Usage:  docker [OPTIONS] COMMAND
    E           
    E           A self-sufficient runtime for containers
    E           
    E           Options:
    E                 --config string      Location of client config files (default
    E                                      "/root/.docker")
    E             -c, --context string     Name of the context to use to connect to the
    E                                      daemon (overrides DOCKER_HOST env var and
    E                                      default context set with "docker context use")
    E             -D, --debug              Enable debug mode
    E             -H, --host list          Daemon socket(s) to connect to
    E             -l, --log-level string   Set the logging level
    E                                      ("debug"|"info"|"warn"|"error"|"fatal")
    E                                      (default "info")
    E                 --tls                Use TLS; implied by --tlsverify
    E                 --tlscacert string   Trust certs signed only by this CA (default
    E                                      "/root/.docker/ca.pem")
    E                 --tlscert string     Path to TLS certificate file (default
    E                                      "/root/.docker/cert.pem")
    E                 --tlskey string      Path to TLS key file (default
    E                                      "/root/.docker/key.pem")
    E                 --tlsverify          Use TLS and verify the remote
    E             -v, --version            Print version information and quit
    E           
    E           Management Commands:
    E             builder     Manage builds
    E             config      Manage Docker configs
    E             container   Manage containers
    E             context     Manage contexts
    E             image       Manage images
    E             manifest    Manage Docker image manifests and manifest lists
    E             network     Manage networks
    E             node        Manage Swarm nodes
    E             plugin      Manage plugins
    E             secret      Manage Docker secrets
    E             service     Manage services
    E             stack       Manage Docker stacks
    E             swarm       Manage Swarm
    E             system      Manage Docker
    E             trust       Manage trust on Docker images
    E             volume      Manage volumes
    E           
    E           Commands:
    E             attach      Attach local standard input, output, and error streams to a running container
    E             build       Build an image from a Dockerfile
    E             commit      Create a new image from a container's changes
    E             cp          Copy files/folders between a container and the local filesystem
    E             create      Create a new container
    E             diff        Inspect changes to files or directories on a container's filesystem
    E             events      Get real time events from the server
    E             exec        Run a command in a running container
    E             export      Export a container's filesystem as a tar archive
    E             history     Show the history of an image
    E             images      List images
    E             import      Import the contents from a tarball to create a filesystem image
    E             info        Display system-wide information
    E             inspect     Return low-level information on Docker objects
    E             kill        Kill one or more running containers
    E             load        Load an image from a tar archive or STDIN
    E             login       Log in to a Docker registry
    E             logout      Log out from a Docker registry
    E             logs        Fetch the logs of a container
    E             pause       Pause all processes within one or more containers
    E             port        List port mappings or a specific mapping for the container
    E             ps          List containers
    E             pull        Pull an image or a repository from a registry
    E             push        Push an image or a repository to a registry
    E             rename      Rename a container
    E             restart     Restart one or more containers
    E             rm          Remove one or more containers
    E             rmi         Remove one or more images
    E             run         Run a command in a new container
    E             save        Save one or more images to a tar archive (streamed to STDOUT by default)
    E             search      Search the Docker Hub for images
    E             start       Start one or more stopped containers
    E             stats       Display a live stream of container(s) resource usage statistics
    E             stop        Stop one or more running containers
    E             tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
    E             top         Display the running processes of a container
    E             unpause     Unpause all processes within one or more containers
    E             update      Update configuration of one or more containers
    E             version     Show the Docker version information
    E             wait        Block until one or more containers stop, then print their exit codes
    E           
    E           Run 'docker COMMAND --help' for more information on a command.
    E           
    E           #x1B[1mTo get more help with docker, check out our guides at https://docs.docker.com/go/guides/#x1B[0m
    E           
    E           '
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException 
    

Build&Test / metricbeat-pythonIntegTest / test_xpack – metricbeat.module.beat.test_beat.Test
    Expand to view the error details

     failed on setup with "python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/docker-compose.yml --project-name metricbeat_7918a246f6f8 kill metricbeat elasticsearch`.
    It returned with code 125
    The content of stdout is ''
    The content of stderr is 'unknown flag: --file
    See 'docker --help'.
    
    Usage:  docker [OPTIONS] COMMAND
    
    A self-sufficient runtime for containers
    
    Options:
          --config string      Location of client config files (default
                               "/root/.docker")
      -c, --context string     Name of the context to use to connect to the
                               daemon (overrides DOCKER_HOST env var and
                               default context set with "docker context use")
      -D, --debug              Enable debug mode
      -H, --host list          Daemon socket(s) to connect to
      -l, --log-level string   Set the logging level
                               ("debug"|"info"|"warn"|"error"|"fatal")
                               (default "info")
          --tls                Use TLS; implied by --tlsverify
          --tlscacert string   Trust certs signed only by this CA (default
                               "/root/.docker/ca.pem")
          --tlscert string     Path to TLS certificate file (default
                               "/root/.docker/cert.pem")
          --tlskey string      Path to TLS key file (default
                               "/root/.docker/key.pem")
          --tlsverify          Use TLS and verify the remote
      -v, --version            Print version information and quit
    
    Management Commands:
      builder     Manage builds
      config      Manage Docker configs
      container   Manage containers
      context     Manage contexts
      image       Manage images
      manifest    Manage Docker image manifests and manifest lists
      network     Manage networks
      node        Manage Swarm nodes
      plugin      Manage plugins
      secret      Manage Docker secrets
      service     Manage services
      stack       Manage Docker stacks
      swarm       Manage Swarm
      system      Manage Docker
      trust       Manage trust on Docker images
      volume      Manage volumes
    
    Commands:
      attach      Attach local standard input, output, and error streams to a running container
      build       Build an image from a Dockerfile
      commit      Create a new image from a container's changes
      cp          Copy files/folders between a container and the local filesystem
      create      Create a new container
      diff        Inspect changes to files or directories on a container's filesystem
      events      Get real time events from the server
      exec        Run a command in a running container
      export      Export a container's filesystem as a tar archive
      history     Show the history of an image
      images      List images
      import      Import the contents from a tarball to create a filesystem image
      info        Display system-wide information
      inspect     Return low-level information on Docker objects
      kill        Kill one or more running containers
      load        Load an image from a tar archive or STDIN
      login       Log in to a Docker registry
      logout      Log out from a Docker registry
      logs        Fetch the logs of a container
      pause       Pause all processes within one or more containers
      port        List port mappings or a specific mapping for the container
      ps          List containers
      pull        Pull an image or a repository from a registry
      push        Push an image or a repository to a registry
      rename      Rename a container
      restart     Restart one or more containers
      rm          Remove one or more containers
      rmi         Remove one or more images
      run         Run a command in a new container
      save        Save one or more images to a tar archive (streamed to STDOUT by default)
      search      Search the Docker Hub for images
      start       Start one or more stopped containers
      stats       Display a live stream of container(s) resource usage statistics
      stop        Stop one or more running containers
      tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
      top         Display the running processes of a container
      unpause     Unpause all processes within one or more containers
      update      Update configuration of one or more containers
      version     Show the Docker version information
      wait        Block until one or more containers stop, then print their exit codes
    
    Run 'docker COMMAND --help' for more information on a command.
    
    #x1B[1mTo get more help with docker, check out our guides at https://docs.docker.com/go/guides/#x1B[0m
    
    '" 
    

    Expand to view the stacktrace

     cls = <class 'test_beat.Test'>
    
        @classmethod
        def compose_up_with_retries(cls):
            """
            compose_up_with_retries runs docker compose to start the test containers
            """
            retries = 3
            for i in range(retries):
                try:
    >               cls.compose_up()
    
    ../libbeat/tests/system/beat/beat.py:218: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    cls = <class 'test_beat.Test'>
    
        @classmethod
        def compose_up(cls):
            """
            Ensure *only* the services defined under `COMPOSE_SERVICES` are running and healthy
            """
            if not INTEGRATION_TESTS or not cls.COMPOSE_SERVICES:
                return
        
            if os.environ.get('NO_COMPOSE'):
                return
        
            def print_logs(container):
                print("---- " + container.name_without_project)
                print(container.logs())
                print("----")
        
            def is_healthy(container):
                return container.state.health.status == 'healthy' #container.inspect()['State']['Health']['Status'] == 'healthy'
        
            project = cls.compose_project()
        
            with disabled_logger('compose.service'):
    >           project.pull(
                    ignore_pull_failures=True,
                    services=cls.COMPOSE_SERVICES)
    
    ../libbeat/tests/system/beat/compose.py:62: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <python_on_whales.components.compose.cli_wrapper.ComposeCLI object at 0x7f2b9eafaa50>
    services = ['metricbeat', 'elasticsearch'], ignore_pull_failures = True
    include_deps = False, quiet = False, stream_logs = False
    
        def pull(
            self,
            services: Union[List[str], str, None] = None,
            ignore_pull_failures: bool = False,
            include_deps: bool = False,
            quiet: bool = False,
            stream_logs: bool = False,
        ) -> Union[Iterable[Tuple[str, bytes]], None]:
            """Pull service images
        
            Parameters:
                services: The list of services to select. Only the images of those
                    services will be pulled. If no services are specified (`None`) (the default
                    behavior) all images of all services are pulled.
                    If an empty list is provided, then the function call is a no-op.
                ignore_pull_failures: Pull what it can and ignores images with pull failures
                include_deps: Also pull services declared as dependencies
                quiet: By default, the progress bars are printed in stdout and stderr (both).
                    To disable all output, use `quiet=True`
                stream_logs: If `False` this function returns None. If `True`, this
                    function returns an Iterable of `Tuple[str, bytes]` where the first element
                    is the type of log (`"stdin"` or `"stdout"`). The second element is the log itself,
                    as bytes, you'll need to call `.decode()` if you want the logs as `str`.
                    See [the streaming guide](https://gabrieldemarmiesse.github.io/python-on-whales/user_guide/docker_run/#stream-the-output) if you are
                    not familiar with the streaming of logs in Python-on-whales.
        
            """
            if quiet and stream_logs:
                raise ValueError(
                    "It's not possible to have stream_logs=True and quiet=True at the same time. "
                    "Only one can be activated at a time."
                )
            full_cmd = self.docker_compose_cmd + ["pull"]
            full_cmd.add_flag("--ignore-pull-failures", ignore_pull_failures)
            full_cmd.add_flag("--include-deps", include_deps)
            full_cmd.add_flag("--quiet", quiet)
            if services == []:
                return
            elif services is not None:
                services = to_list(services)
                full_cmd += services
            if stream_logs:
                return stream_stdout_and_stderr(full_cmd)
            else:
    >           run(full_cmd, capture_stdout=False, capture_stderr=False)
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:570: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/docker-compose.yml', '--project-name', 'metricbeat_7918a246f6f8', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/docker-compose.yml --project-name metricbeat_7918a246f6f8 pull --ignore-pull-failures metricbeat elasticsearch`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException
    
    During handling of the above exception, another exception occurred:
    
    cls = <class 'test_beat.Test'>
    
        @classmethod
        def setUpClass(cls):  # pylint: disable=invalid-name
            """
            initializes the Test class
            """
            if not hasattr(cls, 'beat_name'):
                cls.beat_name = "metricbeat"
        
            if not hasattr(cls, 'beat_path'):
                cls.beat_path = os.path.abspath(
                    os.path.join(os.path.dirname(__file__), "../../"))
        
    >       super().setUpClass()
    
    tests/system/metricbeat.py:42: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:204: in setUpClass
        cls.compose_up_with_retries()
    ../libbeat/tests/system/beat/beat.py:224: in compose_up_with_retries
        cls.compose_down()
    ../libbeat/tests/system/beat/compose.py:150: in compose_down
        cls.compose_project().kill(services=cls.COMPOSE_SERVICES)
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:340: in kill
        run(full_cmd)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/docker-compose.yml', '--project-name', 'metricbeat_7918a246f6f8', ...]
    capture_stdout = True, capture_stderr = True, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/docker-compose.yml --project-name metricbeat_7918a246f6f8 kill metricbeat elasticsearch`.
    E           It returned with code 125
    E           The content of stdout is ''
    E           The content of stderr is 'unknown flag: --file
    E           See 'docker --help'.
    E           
    E           Usage:  docker [OPTIONS] COMMAND
    E           
    E           A self-sufficient runtime for containers
    E           
    E           Options:
    E                 --config string      Location of client config files (default
    E                                      "/root/.docker")
    E             -c, --context string     Name of the context to use to connect to the
    E                                      daemon (overrides DOCKER_HOST env var and
    E                                      default context set with "docker context use")
    E             -D, --debug              Enable debug mode
    E             -H, --host list          Daemon socket(s) to connect to
    E             -l, --log-level string   Set the logging level
    E                                      ("debug"|"info"|"warn"|"error"|"fatal")
    E                                      (default "info")
    E                 --tls                Use TLS; implied by --tlsverify
    E                 --tlscacert string   Trust certs signed only by this CA (default
    E                                      "/root/.docker/ca.pem")
    E                 --tlscert string     Path to TLS certificate file (default
    E                                      "/root/.docker/cert.pem")
    E                 --tlskey string      Path to TLS key file (default
    E                                      "/root/.docker/key.pem")
    E                 --tlsverify          Use TLS and verify the remote
    E             -v, --version            Print version information and quit
    E           
    E           Management Commands:
    E             builder     Manage builds
    E             config      Manage Docker configs
    E             container   Manage containers
    E             context     Manage contexts
    E             image       Manage images
    E             manifest    Manage Docker image manifests and manifest lists
    E             network     Manage networks
    E             node        Manage Swarm nodes
    E             plugin      Manage plugins
    E             secret      Manage Docker secrets
    E             service     Manage services
    E             stack       Manage Docker stacks
    E             swarm       Manage Swarm
    E             system      Manage Docker
    E             trust       Manage trust on Docker images
    E             volume      Manage volumes
    E           
    E           Commands:
    E             attach      Attach local standard input, output, and error streams to a running container
    E             build       Build an image from a Dockerfile
    E             commit      Create a new image from a container's changes
    E             cp          Copy files/folders between a container and the local filesystem
    E             create      Create a new container
    E             diff        Inspect changes to files or directories on a container's filesystem
    E             events      Get real time events from the server
    E             exec        Run a command in a running container
    E             export      Export a container's filesystem as a tar archive
    E             history     Show the history of an image
    E             images      List images
    E             import      Import the contents from a tarball to create a filesystem image
    E             info        Display system-wide information
    E             inspect     Return low-level information on Docker objects
    E             kill        Kill one or more running containers
    E             load        Load an image from a tar archive or STDIN
    E             login       Log in to a Docker registry
    E             logout      Log out from a Docker registry
    E             logs        Fetch the logs of a container
    E             pause       Pause all processes within one or more containers
    E             port        List port mappings or a specific mapping for the container
    E             ps          List containers
    E             pull        Pull an image or a repository from a registry
    E             push        Push an image or a repository to a registry
    E             rename      Rename a container
    E             restart     Restart one or more containers
    E             rm          Remove one or more containers
    E             rmi         Remove one or more images
    E             run         Run a command in a new container
    E             save        Save one or more images to a tar archive (streamed to STDOUT by default)
    E             search      Search the Docker Hub for images
    E             start       Start one or more stopped containers
    E             stats       Display a live stream of container(s) resource usage statistics
    E             stop        Stop one or more running containers
    E             tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
    E             top         Display the running processes of a container
    E             unpause     Unpause all processes within one or more containers
    E             update      Update configuration of one or more containers
    E             version     Show the Docker version information
    E             wait        Block until one or more containers stop, then print their exit codes
    E           
    E           Run 'docker COMMAND --help' for more information on a command.
    E           
    E           #x1B[1mTo get more help with docker, check out our guides at https://docs.docker.com/go/guides/#x1B[0m
    E           
    E           '
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException 
    

Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.consul.test_consul.ConsulAgentTest_0
    Expand to view the error details

     failed on setup with "python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/consul/docker-compose.yml --project-name consul_4084ebe81b08b72c down --volumes`.
    It returned with code 125
    The content of stdout can be found above the stacktrace (it wasn't captured).
    The content of stderr can be found above the stacktrace (it wasn't captured)." 
    

    Expand to view the stacktrace

     cls = <class 'test_consul.ConsulAgentTest_0'>
    
        @classmethod
        def compose_up_with_retries(cls):
            """
            compose_up_with_retries runs docker compose to start the test containers
            """
            retries = 3
            for i in range(retries):
                try:
    >               cls.compose_up()
    
    ../libbeat/tests/system/beat/beat.py:218: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    cls = <class 'test_consul.ConsulAgentTest_0'>
    
        @classmethod
        def compose_up(cls):
            """
            Ensure *only* the services defined under `COMPOSE_SERVICES` are running and healthy
            """
            if not INTEGRATION_TESTS or not cls.COMPOSE_SERVICES:
                return
        
            if os.environ.get('NO_COMPOSE'):
                return
        
            def print_logs(container):
                print("---- " + container.name_without_project)
                print(container.logs())
                print("----")
        
            def is_healthy(container):
                return container.state.health.status == 'healthy' #container.inspect()['State']['Health']['Status'] == 'healthy'
        
            project = cls.compose_project()
        
            with disabled_logger('compose.service'):
    >           project.pull(
                    ignore_pull_failures=True,
                    services=cls.COMPOSE_SERVICES)
    
    ../libbeat/tests/system/beat/compose.py:62: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <python_on_whales.components.compose.cli_wrapper.ComposeCLI object at 0x7f2b9eab1310>
    services = ['consul'], ignore_pull_failures = True, include_deps = False
    quiet = False, stream_logs = False
    
        def pull(
            self,
            services: Union[List[str], str, None] = None,
            ignore_pull_failures: bool = False,
            include_deps: bool = False,
            quiet: bool = False,
            stream_logs: bool = False,
        ) -> Union[Iterable[Tuple[str, bytes]], None]:
            """Pull service images
        
            Parameters:
                services: The list of services to select. Only the images of those
                    services will be pulled. If no services are specified (`None`) (the default
                    behavior) all images of all services are pulled.
                    If an empty list is provided, then the function call is a no-op.
                ignore_pull_failures: Pull what it can and ignores images with pull failures
                include_deps: Also pull services declared as dependencies
                quiet: By default, the progress bars are printed in stdout and stderr (both).
                    To disable all output, use `quiet=True`
                stream_logs: If `False` this function returns None. If `True`, this
                    function returns an Iterable of `Tuple[str, bytes]` where the first element
                    is the type of log (`"stdin"` or `"stdout"`). The second element is the log itself,
                    as bytes, you'll need to call `.decode()` if you want the logs as `str`.
                    See [the streaming guide](https://gabrieldemarmiesse.github.io/python-on-whales/user_guide/docker_run/#stream-the-output) if you are
                    not familiar with the streaming of logs in Python-on-whales.
        
            """
            if quiet and stream_logs:
                raise ValueError(
                    "It's not possible to have stream_logs=True and quiet=True at the same time. "
                    "Only one can be activated at a time."
                )
            full_cmd = self.docker_compose_cmd + ["pull"]
            full_cmd.add_flag("--ignore-pull-failures", ignore_pull_failures)
            full_cmd.add_flag("--include-deps", include_deps)
            full_cmd.add_flag("--quiet", quiet)
            if services == []:
                return
            elif services is not None:
                services = to_list(services)
                full_cmd += services
            if stream_logs:
                return stream_stdout_and_stderr(full_cmd)
            else:
    >           run(full_cmd, capture_stdout=False, capture_stderr=False)
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:570: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/consul/docker-compose.yml', '--project-name', 'consul_4084ebe81b08b72c', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/consul/docker-compose.yml --project-name consul_4084ebe81b08b72c pull --ignore-pull-failures consul`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException
    
    During handling of the above exception, another exception occurred:
    
    cls = <class 'test_consul.ConsulAgentTest_0'>
    
        @classmethod
        def setUpClass(cls):  # pylint: disable=invalid-name
            """
            initializes the Test class
            """
            if not hasattr(cls, 'beat_name'):
                cls.beat_name = "metricbeat"
        
            if not hasattr(cls, 'beat_path'):
                cls.beat_path = os.path.abspath(
                    os.path.join(os.path.dirname(__file__), "../../"))
        
    >       super().setUpClass()
    
    tests/system/metricbeat.py:42: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:204: in setUpClass
        cls.compose_up_with_retries()
    ../libbeat/tests/system/beat/beat.py:224: in compose_up_with_retries
        cls.compose_down()
    ../libbeat/tests/system/beat/compose.py:148: in compose_down
        cls.compose_project().down(volumes=True)
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:272: in down
        run(full_cmd, capture_stderr=quiet, capture_stdout=quiet)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/consul/docker-compose.yml', '--project-name', 'consul_4084ebe81b08b72c', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/consul/docker-compose.yml --project-name consul_4084ebe81b08b72c down --volumes`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException 
    

Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.consul.test_consul.ConsulAgentTest_1
    Expand to view the error details

     failed on setup with "python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/consul/docker-compose.yml --project-name consul_2681c7c243da7800 down --volumes`.
    It returned with code 125
    The content of stdout can be found above the stacktrace (it wasn't captured).
    The content of stderr can be found above the stacktrace (it wasn't captured)." 
    

    Expand to view the stacktrace

     cls = <class 'test_consul.ConsulAgentTest_1'>
    
        @classmethod
        def compose_up_with_retries(cls):
            """
            compose_up_with_retries runs docker compose to start the test containers
            """
            retries = 3
            for i in range(retries):
                try:
    >               cls.compose_up()
    
    ../libbeat/tests/system/beat/beat.py:218: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    cls = <class 'test_consul.ConsulAgentTest_1'>
    
        @classmethod
        def compose_up(cls):
            """
            Ensure *only* the services defined under `COMPOSE_SERVICES` are running and healthy
            """
            if not INTEGRATION_TESTS or not cls.COMPOSE_SERVICES:
                return
        
            if os.environ.get('NO_COMPOSE'):
                return
        
            def print_logs(container):
                print("---- " + container.name_without_project)
                print(container.logs())
                print("----")
        
            def is_healthy(container):
                return container.state.health.status == 'healthy' #container.inspect()['State']['Health']['Status'] == 'healthy'
        
            project = cls.compose_project()
        
            with disabled_logger('compose.service'):
    >           project.pull(
                    ignore_pull_failures=True,
                    services=cls.COMPOSE_SERVICES)
    
    ../libbeat/tests/system/beat/compose.py:62: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <python_on_whales.components.compose.cli_wrapper.ComposeCLI object at 0x7f2b9ea357d0>
    services = ['consul'], ignore_pull_failures = True, include_deps = False
    quiet = False, stream_logs = False
    
        def pull(
            self,
            services: Union[List[str], str, None] = None,
            ignore_pull_failures: bool = False,
            include_deps: bool = False,
            quiet: bool = False,
            stream_logs: bool = False,
        ) -> Union[Iterable[Tuple[str, bytes]], None]:
            """Pull service images
        
            Parameters:
                services: The list of services to select. Only the images of those
                    services will be pulled. If no services are specified (`None`) (the default
                    behavior) all images of all services are pulled.
                    If an empty list is provided, then the function call is a no-op.
                ignore_pull_failures: Pull what it can and ignores images with pull failures
                include_deps: Also pull services declared as dependencies
                quiet: By default, the progress bars are printed in stdout and stderr (both).
                    To disable all output, use `quiet=True`
                stream_logs: If `False` this function returns None. If `True`, this
                    function returns an Iterable of `Tuple[str, bytes]` where the first element
                    is the type of log (`"stdin"` or `"stdout"`). The second element is the log itself,
                    as bytes, you'll need to call `.decode()` if you want the logs as `str`.
                    See [the streaming guide](https://gabrieldemarmiesse.github.io/python-on-whales/user_guide/docker_run/#stream-the-output) if you are
                    not familiar with the streaming of logs in Python-on-whales.
        
            """
            if quiet and stream_logs:
                raise ValueError(
                    "It's not possible to have stream_logs=True and quiet=True at the same time. "
                    "Only one can be activated at a time."
                )
            full_cmd = self.docker_compose_cmd + ["pull"]
            full_cmd.add_flag("--ignore-pull-failures", ignore_pull_failures)
            full_cmd.add_flag("--include-deps", include_deps)
            full_cmd.add_flag("--quiet", quiet)
            if services == []:
                return
            elif services is not None:
                services = to_list(services)
                full_cmd += services
            if stream_logs:
                return stream_stdout_and_stderr(full_cmd)
            else:
    >           run(full_cmd, capture_stdout=False, capture_stderr=False)
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:570: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/consul/docker-compose.yml', '--project-name', 'consul_2681c7c243da7800', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/consul/docker-compose.yml --project-name consul_2681c7c243da7800 pull --ignore-pull-failures consul`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException
    
    During handling of the above exception, another exception occurred:
    
    cls = <class 'test_consul.ConsulAgentTest_1'>
    
        @classmethod
        def setUpClass(cls):  # pylint: disable=invalid-name
            """
            initializes the Test class
            """
            if not hasattr(cls, 'beat_name'):
                cls.beat_name = "metricbeat"
        
            if not hasattr(cls, 'beat_path'):
                cls.beat_path = os.path.abspath(
                    os.path.join(os.path.dirname(__file__), "../../"))
        
    >       super().setUpClass()
    
    tests/system/metricbeat.py:42: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:204: in setUpClass
        cls.compose_up_with_retries()
    ../libbeat/tests/system/beat/beat.py:224: in compose_up_with_retries
        cls.compose_down()
    ../libbeat/tests/system/beat/compose.py:148: in compose_down
        cls.compose_project().down(volumes=True)
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:272: in down
        run(full_cmd, capture_stderr=quiet, capture_stdout=quiet)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/consul/docker-compose.yml', '--project-name', 'consul_2681c7c243da7800', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/consul/docker-compose.yml --project-name consul_2681c7c243da7800 down --volumes`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException 
    

Build&Test / metricbeat-pythonIntegTest / test_couchbase_0_bucket – metricbeat.module.couchbase.test_couchbase.Test
    Expand to view the error details

     failed on setup with "python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/couchbase/docker-compose.yml --project-name couchbase_7918a246f6f8 down --volumes`.
    It returned with code 125
    The content of stdout can be found above the stacktrace (it wasn't captured).
    The content of stderr can be found above the stacktrace (it wasn't captured)." 
    

    Expand to view the stacktrace

     cls = <class 'test_couchbase.Test'>
    
        @classmethod
        def compose_up_with_retries(cls):
            """
            compose_up_with_retries runs docker compose to start the test containers
            """
            retries = 3
            for i in range(retries):
                try:
    >               cls.compose_up()
    
    ../libbeat/tests/system/beat/beat.py:218: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    cls = <class 'test_couchbase.Test'>
    
        @classmethod
        def compose_up(cls):
            """
            Ensure *only* the services defined under `COMPOSE_SERVICES` are running and healthy
            """
            if not INTEGRATION_TESTS or not cls.COMPOSE_SERVICES:
                return
        
            if os.environ.get('NO_COMPOSE'):
                return
        
            def print_logs(container):
                print("---- " + container.name_without_project)
                print(container.logs())
                print("----")
        
            def is_healthy(container):
                return container.state.health.status == 'healthy' #container.inspect()['State']['Health']['Status'] == 'healthy'
        
            project = cls.compose_project()
        
            with disabled_logger('compose.service'):
    >           project.pull(
                    ignore_pull_failures=True,
                    services=cls.COMPOSE_SERVICES)
    
    ../libbeat/tests/system/beat/compose.py:62: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <python_on_whales.components.compose.cli_wrapper.ComposeCLI object at 0x7f2b9e8c41d0>
    services = ['couchbase'], ignore_pull_failures = True, include_deps = False
    quiet = False, stream_logs = False
    
        def pull(
            self,
            services: Union[List[str], str, None] = None,
            ignore_pull_failures: bool = False,
            include_deps: bool = False,
            quiet: bool = False,
            stream_logs: bool = False,
        ) -> Union[Iterable[Tuple[str, bytes]], None]:
            """Pull service images
        
            Parameters:
                services: The list of services to select. Only the images of those
                    services will be pulled. If no services are specified (`None`) (the default
                    behavior) all images of all services are pulled.
                    If an empty list is provided, then the function call is a no-op.
                ignore_pull_failures: Pull what it can and ignores images with pull failures
                include_deps: Also pull services declared as dependencies
                quiet: By default, the progress bars are printed in stdout and stderr (both).
                    To disable all output, use `quiet=True`
                stream_logs: If `False` this function returns None. If `True`, this
                    function returns an Iterable of `Tuple[str, bytes]` where the first element
                    is the type of log (`"stdin"` or `"stdout"`). The second element is the log itself,
                    as bytes, you'll need to call `.decode()` if you want the logs as `str`.
                    See [the streaming guide](https://gabrieldemarmiesse.github.io/python-on-whales/user_guide/docker_run/#stream-the-output) if you are
                    not familiar with the streaming of logs in Python-on-whales.
        
            """
            if quiet and stream_logs:
                raise ValueError(
                    "It's not possible to have stream_logs=True and quiet=True at the same time. "
                    "Only one can be activated at a time."
                )
            full_cmd = self.docker_compose_cmd + ["pull"]
            full_cmd.add_flag("--ignore-pull-failures", ignore_pull_failures)
            full_cmd.add_flag("--include-deps", include_deps)
            full_cmd.add_flag("--quiet", quiet)
            if services == []:
                return
            elif services is not None:
                services = to_list(services)
                full_cmd += services
            if stream_logs:
                return stream_stdout_and_stderr(full_cmd)
            else:
    >           run(full_cmd, capture_stdout=False, capture_stderr=False)
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:570: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/couchbase/docker-compose.yml', '--project-name', 'couchbase_7918a246f6f8', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/couchbase/docker-compose.yml --project-name couchbase_7918a246f6f8 pull --ignore-pull-failures couchbase`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException
    
    During handling of the above exception, another exception occurred:
    
    cls = <class 'test_couchbase.Test'>
    
        @classmethod
        def setUpClass(cls):  # pylint: disable=invalid-name
            """
            initializes the Test class
            """
            if not hasattr(cls, 'beat_name'):
                cls.beat_name = "metricbeat"
        
            if not hasattr(cls, 'beat_path'):
                cls.beat_path = os.path.abspath(
                    os.path.join(os.path.dirname(__file__), "../../"))
        
    >       super().setUpClass()
    
    tests/system/metricbeat.py:42: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:204: in setUpClass
        cls.compose_up_with_retries()
    ../libbeat/tests/system/beat/beat.py:224: in compose_up_with_retries
        cls.compose_down()
    ../libbeat/tests/system/beat/compose.py:148: in compose_down
        cls.compose_project().down(volumes=True)
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:272: in down
        run(full_cmd, capture_stderr=quiet, capture_stdout=quiet)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/couchbase/docker-compose.yml', '--project-name', 'couchbase_7918a246f6f8', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/couchbase/docker-compose.yml --project-name couchbase_7918a246f6f8 down --volumes`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException 
    

Build&Test / metricbeat-pythonIntegTest / test_couchbase_1_cluster – metricbeat.module.couchbase.test_couchbase.Test
    Expand to view the error details

     failed on setup with "python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/couchbase/docker-compose.yml --project-name couchbase_7918a246f6f8 down --volumes`.
    It returned with code 125
    The content of stdout can be found above the stacktrace (it wasn't captured).
    The content of stderr can be found above the stacktrace (it wasn't captured)." 
    

    Expand to view the stacktrace

     cls = <class 'test_couchbase.Test'>
    
        @classmethod
        def compose_up_with_retries(cls):
            """
            compose_up_with_retries runs docker compose to start the test containers
            """
            retries = 3
            for i in range(retries):
                try:
    >               cls.compose_up()
    
    ../libbeat/tests/system/beat/beat.py:218: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    cls = <class 'test_couchbase.Test'>
    
        @classmethod
        def compose_up(cls):
            """
            Ensure *only* the services defined under `COMPOSE_SERVICES` are running and healthy
            """
            if not INTEGRATION_TESTS or not cls.COMPOSE_SERVICES:
                return
        
            if os.environ.get('NO_COMPOSE'):
                return
        
            def print_logs(container):
                print("---- " + container.name_without_project)
                print(container.logs())
                print("----")
        
            def is_healthy(container):
                return container.state.health.status == 'healthy' #container.inspect()['State']['Health']['Status'] == 'healthy'
        
            project = cls.compose_project()
        
            with disabled_logger('compose.service'):
    >           project.pull(
                    ignore_pull_failures=True,
                    services=cls.COMPOSE_SERVICES)
    
    ../libbeat/tests/system/beat/compose.py:62: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <python_on_whales.components.compose.cli_wrapper.ComposeCLI object at 0x7f2b9e8c41d0>
    services = ['couchbase'], ignore_pull_failures = True, include_deps = False
    quiet = False, stream_logs = False
    
        def pull(
            self,
            services: Union[List[str], str, None] = None,
            ignore_pull_failures: bool = False,
            include_deps: bool = False,
            quiet: bool = False,
            stream_logs: bool = False,
        ) -> Union[Iterable[Tuple[str, bytes]], None]:
            """Pull service images
        
            Parameters:
                services: The list of services to select. Only the images of those
                    services will be pulled. If no services are specified (`None`) (the default
                    behavior) all images of all services are pulled.
                    If an empty list is provided, then the function call is a no-op.
                ignore_pull_failures: Pull what it can and ignores images with pull failures
                include_deps: Also pull services declared as dependencies
                quiet: By default, the progress bars are printed in stdout and stderr (both).
                    To disable all output, use `quiet=True`
                stream_logs: If `False` this function returns None. If `True`, this
                    function returns an Iterable of `Tuple[str, bytes]` where the first element
                    is the type of log (`"stdin"` or `"stdout"`). The second element is the log itself,
                    as bytes, you'll need to call `.decode()` if you want the logs as `str`.
                    See [the streaming guide](https://gabrieldemarmiesse.github.io/python-on-whales/user_guide/docker_run/#stream-the-output) if you are
                    not familiar with the streaming of logs in Python-on-whales.
        
            """
            if quiet and stream_logs:
                raise ValueError(
                    "It's not possible to have stream_logs=True and quiet=True at the same time. "
                    "Only one can be activated at a time."
                )
            full_cmd = self.docker_compose_cmd + ["pull"]
            full_cmd.add_flag("--ignore-pull-failures", ignore_pull_failures)
            full_cmd.add_flag("--include-deps", include_deps)
            full_cmd.add_flag("--quiet", quiet)
            if services == []:
                return
            elif services is not None:
                services = to_list(services)
                full_cmd += services
            if stream_logs:
                return stream_stdout_and_stderr(full_cmd)
            else:
    >           run(full_cmd, capture_stdout=False, capture_stderr=False)
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:570: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/couchbase/docker-compose.yml', '--project-name', 'couchbase_7918a246f6f8', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/couchbase/docker-compose.yml --project-name couchbase_7918a246f6f8 pull --ignore-pull-failures couchbase`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException
    
    During handling of the above exception, another exception occurred:
    
    cls = <class 'test_couchbase.Test'>
    
        @classmethod
        def setUpClass(cls):  # pylint: disable=invalid-name
            """
            initializes the Test class
            """
            if not hasattr(cls, 'beat_name'):
                cls.beat_name = "metricbeat"
        
            if not hasattr(cls, 'beat_path'):
                cls.beat_path = os.path.abspath(
                    os.path.join(os.path.dirname(__file__), "../../"))
        
    >       super().setUpClass()
    
    tests/system/metricbeat.py:42: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ../libbeat/tests/system/beat/beat.py:204: in setUpClass
        cls.compose_up_with_retries()
    ../libbeat/tests/system/beat/beat.py:224: in compose_up_with_retries
        cls.compose_down()
    ../libbeat/tests/system/beat/compose.py:148: in compose_down
        cls.compose_project().down(volumes=True)
    /opt/venv/lib/python3.11/site-packages/python_on_whales/components/compose/cli_wrapper.py:272: in down
        run(full_cmd, capture_stderr=quiet, capture_stdout=quiet)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    args = ['/root/.cache/python-on-whales/docker-cli/20.10.5/docker', 'compose', '--file', '/go/src/github.com/elastic/beats/metricbeat/module/couchbase/docker-compose.yml', '--project-name', 'couchbase_7918a246f6f8', ...]
    capture_stdout = False, capture_stderr = False, input = None
    return_stderr = False, env = {}, tty = False
    
        def run(
            args: List[Any],
            capture_stdout: bool = True,
            capture_stderr: bool = True,
            input: Optional[bytes] = None,
            return_stderr: bool = False,
            env: Dict[str, str] = {},
            tty: bool = False,
        ) -> Union[str, Tuple[str, str]]:
            args = [str(x) for x in args]
            subprocess_env = dict(os.environ)
            subprocess_env.update(env)
            if args[1] == "buildx":
                subprocess_env["DOCKER_CLI_EXPERIMENTAL"] = "enabled"
            if tty:
                stdout_dest = sys.stdout
            elif capture_stdout:
                stdout_dest = subprocess.PIPE
            else:
                stdout_dest = None
            if tty:
                stderr_dest = sys.stderr
            elif capture_stderr:
                stderr_dest = subprocess.PIPE
            else:
                stderr_dest = None
            if os.environ.get("PYTHON_ON_WHALES_DEBUG", "0") == "1":
                print("------------------------------")
                print("command: " + " ".join(args))
                print(f"Env: {subprocess_env}")
                print("------------------------------")
            completed_process = subprocess.run(
                args, input=input, stdout=stdout_dest, stderr=stderr_dest, env=subprocess_env
            )
        
            if completed_process.returncode != 0:
                if completed_process.stderr is not None:
                    decoded_stderr = completed_process.stderr.decode().lower()
                    if "no such image" in decoded_stderr or "image not known" in decoded_stderr:
                        raise NoSuchImage(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such service" in decoded_stderr or (
                        "service" in decoded_stderr and "not found" in decoded_stderr
                    ):
                        raise NoSuchService(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such container" in decoded_stderr:
                        raise NoSuchContainer(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "this node is not a swarm manager" in decoded_stderr:
                        raise NotASwarmManager(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
                    if "no such volume" in decoded_stderr:
                        raise NoSuchVolume(
                            args,
                            completed_process.returncode,
                            completed_process.stdout,
                            completed_process.stderr,
                        )
        
    >           raise DockerException(
                    args,
                    completed_process.returncode,
                    completed_process.stdout,
                    completed_process.stderr,
                )
    E           python_on_whales.exceptions.DockerException: The docker command executed was `/root/.cache/python-on-whales/docker-cli/20.10.5/docker compose --file /go/src/github.com/elastic/beats/metricbeat/module/couchbase/docker-compose.yml --project-name couchbase_7918a246f6f8 down --volumes`.
    E           It returned with code 125
    E           The content of stdout can be found above the stacktrace (it wasn't captured).
    E           The content of stderr can be found above the stacktrace (it wasn't captured).
    
    /opt/venv/lib/python3.11/site-packages/python_on_whales/utils.py:194: DockerException 
    

Steps errors 7

Expand to view the steps failures

metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 7 min 51 sec . View more details here
  • Description: mage pythonIntegTest
metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 3 min 32 sec . View more details here
  • Description: mage pythonIntegTest
metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 2 min 24 sec . View more details here
  • Description: mage pythonIntegTest
x-pack/metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 7 min 41 sec . View more details here
  • Description: mage pythonIntegTest
x-pack/metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 2 min 40 sec . View more details here
  • Description: mage pythonIntegTest
x-pack/metricbeat-pythonIntegTest - mage pythonIntegTest
  • Took 2 min 37 sec . View more details here
  • Description: mage pythonIntegTest
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'hudson.AbortException: script returned exit code 1'

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Genuine test errors 206

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Build&Test / metricbeat-pythonIntegTest / test_namespace – metricbeat.module.aerospike.test_aerospike.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.apache.test_apache.ApacheStatusTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.apache.test_apache.ApacheStatusTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricsets_0_stats – metricbeat.module.beat.test_beat.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricsets_1_state – metricbeat.module.beat.test_beat.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_xpack – metricbeat.module.beat.test_beat.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.consul.test_consul.ConsulAgentTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.consul.test_consul.ConsulAgentTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_couchbase_0_bucket – metricbeat.module.couchbase.test_couchbase.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_couchbase_1_cluster – metricbeat.module.couchbase.test_couchbase.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_couchbase_2_node – metricbeat.module.couchbase.test_couchbase.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stats – metricbeat.module.couchdb.test_couchdb.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_container_fields – metricbeat.module.docker.test_docker.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_cpu_fields – metricbeat.module.docker.test_docker.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_diskio_fields – metricbeat.module.docker.test_docker.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_event_fields – metricbeat.module.docker.test_docker.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_health_fields – metricbeat.module.docker.test_docker.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_image_fields – metricbeat.module.docker.test_docker.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_info_fields – metricbeat.module.docker.test_docker.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_memory_fields – metricbeat.module.docker.test_docker.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_network_fields – metricbeat.module.docker.test_docker.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_dropwizard – metricbeat.module.dropwizard.test_dropwizard.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_dropwizard – metricbeat.module.dropwizard.test_dropwizard.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_dropwizard – metricbeat.module.dropwizard.test_dropwizard.Test_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricsets_0_ccr – metricbeat.module.elasticsearch.test_elasticsearch.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricsets_1_enrich – metricbeat.module.elasticsearch.test_elasticsearch.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricsets_2_index – metricbeat.module.elasticsearch.test_elasticsearch.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricsets_3_index_summary – metricbeat.module.elasticsearch.test_elasticsearch.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricsets_4_ml_job – metricbeat.module.elasticsearch.test_elasticsearch.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricsets_5_index_recovery – metricbeat.module.elasticsearch.test_elasticsearch.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricsets_6_node_stats – metricbeat.module.elasticsearch.test_elasticsearch.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricsets_7_node – metricbeat.module.elasticsearch.test_elasticsearch.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricsets_8_shard – metricbeat.module.elasticsearch.test_elasticsearch.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_xpack – metricbeat.module.elasticsearch.test_elasticsearch.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_xpack_cluster_stats – metricbeat.module.elasticsearch.test_elasticsearch.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stats – metricbeat.module.envoyproxy.test_envoyproxy.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stats – metricbeat.module.envoyproxy.test_envoyproxy.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricset_0_self – metricbeat.module.etcd.test_etcd.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricset_1_store – metricbeat.module.etcd.test_etcd.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricset_2_metrics – metricbeat.module.etcd.test_etcd.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricset_0_self – metricbeat.module.etcd.test_etcd.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricset_1_store – metricbeat.module.etcd.test_etcd.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_metricset_2_metrics – metricbeat.module.etcd.test_etcd.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_info_socket – metricbeat.module.haproxy.test_haproxy.HaproxyTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_http – metricbeat.module.haproxy.test_haproxy.HaproxyTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_http_auth – metricbeat.module.haproxy.test_haproxy.HaproxyTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_https – metricbeat.module.haproxy.test_haproxy.HaproxyTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_socket – metricbeat.module.haproxy.test_haproxy.HaproxyTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_info_socket – metricbeat.module.haproxy.test_haproxy.HaproxyTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_http – metricbeat.module.haproxy.test_haproxy.HaproxyTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_http_auth – metricbeat.module.haproxy.test_haproxy.HaproxyTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_https – metricbeat.module.haproxy.test_haproxy.HaproxyTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_socket – metricbeat.module.haproxy.test_haproxy.HaproxyTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_info_socket – metricbeat.module.haproxy.test_haproxy.HaproxyTest_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_http – metricbeat.module.haproxy.test_haproxy.HaproxyTest_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_http_auth – metricbeat.module.haproxy.test_haproxy.HaproxyTest_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_https – metricbeat.module.haproxy.test_haproxy.HaproxyTest_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_socket – metricbeat.module.haproxy.test_haproxy.HaproxyTest_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_info_socket – metricbeat.module.haproxy.test_haproxy.HaproxyTest_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_http – metricbeat.module.haproxy.test_haproxy.HaproxyTest_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_http_auth – metricbeat.module.haproxy.test_haproxy.HaproxyTest_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_https – metricbeat.module.haproxy.test_haproxy.HaproxyTest_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_socket – metricbeat.module.haproxy.test_haproxy.HaproxyTest_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_info_socket – metricbeat.module.haproxy.test_haproxy.HaproxyTest_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_http – metricbeat.module.haproxy.test_haproxy.HaproxyTest_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_http_auth – metricbeat.module.haproxy.test_haproxy.HaproxyTest_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_https – metricbeat.module.haproxy.test_haproxy.HaproxyTest_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stat_socket – metricbeat.module.haproxy.test_haproxy.HaproxyTest_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_json – metricbeat.module.http.test_http.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_server – metricbeat.module.http.test_http.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_jmx_0_java_lang_name_PS_MarkSweep_type_GarbageCollector – metricbeat.module.jolokia.test_jolokia.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_jmx_1_java_lang_type_GarbageCollector_name_PS_MarkSweep – metricbeat.module.jolokia.test_jolokia.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_jmx_2_java_lang_name_type_GarbageCollector – metricbeat.module.jolokia.test_jolokia.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_jmx_3_java_lang_type_GarbageCollector_name_ – metricbeat.module.jolokia.test_jolokia.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_0_consumer – metricbeat.module.kafka.test_kafka.KafkaTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_1_producer – metricbeat.module.kafka.test_kafka.KafkaTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_2_broker – metricbeat.module.kafka.test_kafka.KafkaTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_partition – metricbeat.module.kafka.test_kafka.KafkaTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_0_consumer – metricbeat.module.kafka.test_kafka.KafkaTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_1_producer – metricbeat.module.kafka.test_kafka.KafkaTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_2_broker – metricbeat.module.kafka.test_kafka.KafkaTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_partition – metricbeat.module.kafka.test_kafka.KafkaTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_0_consumer – metricbeat.module.kafka.test_kafka.KafkaTest_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_1_producer – metricbeat.module.kafka.test_kafka.KafkaTest_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_2_broker – metricbeat.module.kafka.test_kafka.KafkaTest_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_partition – metricbeat.module.kafka.test_kafka.KafkaTest_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_0_consumer – metricbeat.module.kafka.test_kafka.KafkaTest_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_1_producer – metricbeat.module.kafka.test_kafka.KafkaTest_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_2_broker – metricbeat.module.kafka.test_kafka.KafkaTest_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_partition – metricbeat.module.kafka.test_kafka.KafkaTest_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_0_consumer – metricbeat.module.kafka.test_kafka.KafkaTest_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_1_producer – metricbeat.module.kafka.test_kafka.KafkaTest_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_kafka_jmx_2_broker – metricbeat.module.kafka.test_kafka.KafkaTest_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_partition – metricbeat.module.kafka.test_kafka.KafkaTest_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_status – metricbeat.module.kibana.test_kibana.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_xpack – metricbeat.module.kibana.test_kibana.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stats – metricbeat.module.memcached.test_memcached.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_status – metricbeat.module.mongodb.test_mongodb.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_munin_node – metricbeat.module.munin.test_munin.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_status – metricbeat.module.mysql.test_mysql.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_status – metricbeat.module.mysql.test_mysql.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_status – metricbeat.module.mysql.test_mysql.Test_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_status – metricbeat.module.mysql.test_mysql.Test_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_status – metricbeat.module.mysql.test_mysql.Test_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_status – metricbeat.module.mysql.test_mysql.Test_5
  • Name: Build&Test / metricbeat-pythonIntegTest / test_status – metricbeat.module.mysql.test_mysql.Test_6
  • Name: Build&Test / metricbeat-pythonIntegTest / test_connection – metricbeat.module.nats.test_nats.TestNats_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_connections – metricbeat.module.nats.test_nats.TestNats_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_route – metricbeat.module.nats.test_nats.TestNats_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_routes – metricbeat.module.nats.test_nats.TestNats_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stats – metricbeat.module.nats.test_nats.TestNats_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_subscriptions – metricbeat.module.nats.test_nats.TestNats_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_connection – metricbeat.module.nats.test_nats.TestNats_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_connections – metricbeat.module.nats.test_nats.TestNats_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_route – metricbeat.module.nats.test_nats.TestNats_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_routes – metricbeat.module.nats.test_nats.TestNats_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stats – metricbeat.module.nats.test_nats.TestNats_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_subscriptions – metricbeat.module.nats.test_nats.TestNats_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_connection – metricbeat.module.nats.test_nats.TestNats_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_connections – metricbeat.module.nats.test_nats.TestNats_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_route – metricbeat.module.nats.test_nats.TestNats_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_routes – metricbeat.module.nats.test_nats.TestNats_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stats – metricbeat.module.nats.test_nats.TestNats_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_subscriptions – metricbeat.module.nats.test_nats.TestNats_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_openmetrics – metricbeat.module.openmetrics.test_openmetrics.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_info – metricbeat.module.php_fpm.test_phpfpm.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_activity – metricbeat.module.postgresql.test_postgresql.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_bgwriter – metricbeat.module.postgresql.test_postgresql.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_database – metricbeat.module.postgresql.test_postgresql.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_statement – metricbeat.module.postgresql.test_postgresql.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_activity – metricbeat.module.postgresql.test_postgresql.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_bgwriter – metricbeat.module.postgresql.test_postgresql.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_database – metricbeat.module.postgresql.test_postgresql.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_statement – metricbeat.module.postgresql.test_postgresql.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_activity – metricbeat.module.postgresql.test_postgresql.Test_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_bgwriter – metricbeat.module.postgresql.test_postgresql.Test_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_database – metricbeat.module.postgresql.test_postgresql.Test_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_statement – metricbeat.module.postgresql.test_postgresql.Test_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_activity – metricbeat.module.postgresql.test_postgresql.Test_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_bgwriter – metricbeat.module.postgresql.test_postgresql.Test_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_database – metricbeat.module.postgresql.test_postgresql.Test_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_statement – metricbeat.module.postgresql.test_postgresql.Test_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_activity – metricbeat.module.postgresql.test_postgresql.Test_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_bgwriter – metricbeat.module.postgresql.test_postgresql.Test_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_database – metricbeat.module.postgresql.test_postgresql.Test_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_statement – metricbeat.module.postgresql.test_postgresql.Test_4
  • Name: Build&Test / metricbeat-pythonIntegTest / test_query – metricbeat.module.prometheus.test_prometheus.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_stats – metricbeat.module.prometheus.test_prometheus.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_remote_write – metricbeat.module.prometheus.test_prometheus.TestRemoteWrite
  • Name: Build&Test / metricbeat-pythonIntegTest / test_info – metricbeat.module.redis.test_redis.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_key – metricbeat.module.redis.test_redis.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_keyspace – metricbeat.module.redis.test_redis.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_module_processors – metricbeat.module.redis.test_redis.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_info – metricbeat.module.redis.test_redis.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_key – metricbeat.module.redis.test_redis.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_keyspace – metricbeat.module.redis.test_redis.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_module_processors – metricbeat.module.redis.test_redis.Test_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_info – metricbeat.module.redis.test_redis.Test_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_key – metricbeat.module.redis.test_redis.Test_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_keyspace – metricbeat.module.redis.test_redis.Test_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_module_processors – metricbeat.module.redis.test_redis.Test_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_info – metricbeat.module.redis.test_redis.Test_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_key – metricbeat.module.redis.test_redis.Test_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_keyspace – metricbeat.module.redis.test_redis.Test_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_module_processors – metricbeat.module.redis.test_redis.Test_3
  • Name: Build&Test / metricbeat-pythonIntegTest / test_health_0_health – metricbeat.module.traefik.test_traefik.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_status_0_http – metricbeat.module.uwsgi.test_uwsgi.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_status_1_tcp – metricbeat.module.uwsgi.test_uwsgi.Test_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_datastore – metricbeat.module.vsphere.test_vsphere.TestVsphere_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_host – metricbeat.module.vsphere.test_vsphere.TestVsphere_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_virtualmachine – metricbeat.module.vsphere.test_vsphere.TestVsphere_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_connection – metricbeat.module.zookeeper.test_zookeeper.ZooKeeperMntrTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.zookeeper.test_zookeeper.ZooKeeperMntrTest_0
  • Name: Build&Test / metricbeat-pythonIntegTest / test_connection – metricbeat.module.zookeeper.test_zookeeper.ZooKeeperMntrTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.zookeeper.test_zookeeper.ZooKeeperMntrTest_1
  • Name: Build&Test / metricbeat-pythonIntegTest / test_connection – metricbeat.module.zookeeper.test_zookeeper.ZooKeeperMntrTest_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_output – metricbeat.module.zookeeper.test_zookeeper.ZooKeeperMntrTest_2
  • Name: Build&Test / metricbeat-pythonIntegTest / test_jolokia_jmx – metricbeat.tests.system.test_autodiscover_jolokia.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_dashboards – metricbeat.tests.system.test_base.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_export_config – metricbeat.tests.system.test_base.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_export_ilm_policy – metricbeat.tests.system.test_base.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_export_index_pattern – metricbeat.tests.system.test_base.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_export_index_pattern_migration – metricbeat.tests.system.test_base.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_export_template – metricbeat.tests.system.test_base.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_index_management – metricbeat.tests.system.test_base.Test
  • Name: Build&Test / metricbeat-pythonIntegTest / test_start_stop – metricbeat.tests.system.test_base.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_status – x-pack.metricbeat.module.cockroachdb.test_cockroachdb.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_stats – x-pack.metricbeat.module.coredns.test_coredns.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_health – x-pack.metricbeat.module.enterprisesearch.test_enterprisesearch.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_stats – x-pack.metricbeat.module.enterprisesearch.test_enterprisesearch.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_qmgr – x-pack.metricbeat.module.ibmmq.test_ibmmq.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_performance – x-pack.metricbeat.module.mssql.test_mssql.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_status – x-pack.metricbeat.module.mssql.test_mssql.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_metricset_0_node – x-pack.metricbeat.module.redisenterprise.test_redisenterprise.Test_0
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_metricset_1_proxy – x-pack.metricbeat.module.redisenterprise.test_redisenterprise.Test_0
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_query_with_fetch_from_all_databases – x-pack.metricbeat.module.sql.query.test_sql_mssql.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_query_without_fetch_from_all_databases – x-pack.metricbeat.module.sql.query.test_sql_mssql.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_query – x-pack.metricbeat.module.sql.test_sql.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_dashboards – x-pack.metricbeat.tests.system.test_xpack_base.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_export_config – x-pack.metricbeat.tests.system.test_xpack_base.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_export_ilm_policy – x-pack.metricbeat.tests.system.test_xpack_base.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_export_index_pattern – x-pack.metricbeat.tests.system.test_xpack_base.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_export_index_pattern_migration – x-pack.metricbeat.tests.system.test_xpack_base.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_export_template – x-pack.metricbeat.tests.system.test_xpack_base.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_index_management – x-pack.metricbeat.tests.system.test_xpack_base.Test
  • Name: Build&Test / x-pack/metricbeat-pythonIntegTest / test_start_stop – x-pack.metricbeat.tests.system.test_xpack_base.Test

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@pkoutsovasilis
Copy link
Contributor

another temporary fix just got merged in main, however here are two things that this PR needs to consider when handling the more long-term migration to python-on-whales:

  1. this it is not needed with python-on-whales (cc @dliappis )
  2. this, this, this need to be removed or if for some reason they are still required the repo must come under the elastic org (cc @alexsapran ) [happy to help with this one]

Copy link
Contributor

mergify bot commented Apr 15, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b fix-python-tests-docker-issue upstream/fix-python-tests-docker-issue
git merge upstream/main
git push upstream fix-python-tests-docker-issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants