From bb4a4a96d39e6b412098b3ff5e71dec7d7ceefa7 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sat, 25 Jun 2022 10:28:38 +0200 Subject: [PATCH] Remove misleading message from CI The CI jobs do not usually have mypy_cache volume created and almost all jobs print misleading "mypy_cache_volume" error at the beginning. This is a noise - we are not interested in this stderr printed message - we are only interested in returncode from checking if it exists. --- dev/breeze/src/airflow_breeze/utils/path_utils.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dev/breeze/src/airflow_breeze/utils/path_utils.py b/dev/breeze/src/airflow_breeze/utils/path_utils.py index da097700fd48b..830167463afe2 100644 --- a/dev/breeze/src/airflow_breeze/utils/path_utils.py +++ b/dev/breeze/src/airflow_breeze/utils/path_utils.py @@ -256,10 +256,18 @@ def create_volume_if_missing(volume_name: str): from airflow_breeze.utils.run_utils import run_command res_inspect = run_command( - cmd=["docker", "volume", "inspect", volume_name], stdout=subprocess.DEVNULL, check=False + cmd=["docker", "volume", "inspect", volume_name], + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + check=False, ) if res_inspect.returncode != 0: - run_command(cmd=["docker", "volume", "create", volume_name], check=True) + run_command( + cmd=["docker", "volume", "create", volume_name], + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + check=True, + ) def create_static_check_volumes():