Skip to content

Commit

Permalink
Remove misleading message from CI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
potiuk committed Jun 25, 2022
1 parent d7bd72f commit bb4a4a9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dev/breeze/src/airflow_breeze/utils/path_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit bb4a4a9

Please sign in to comment.