Skip to content

Commit

Permalink
Fix breeze failures when there is no buildx installed on Mac (#23988)
Browse files Browse the repository at this point in the history
If you have no buildx plugin installed on Mac (for example when
you use colima instead of Docker Desktop) the breeze check was
failing - but buildx in fact is not needed to run typical breeze
commands, and breeze already has support for it - it was just
wrongly handled.

(cherry picked from commit 148013b)
  • Loading branch information
potiuk authored and ephraimbuddy committed May 30, 2022
1 parent a4d408c commit f72217b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions dev/breeze/src/airflow_breeze/utils/run_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,22 +287,18 @@ def check_if_buildx_plugin_installed(verbose: bool) -> bool:
:param verbose: print commands when running
:return True if the buildx plugin is installed.
"""
is_buildx_available = False
check_buildx = ['docker', 'buildx', 'version']
docker_buildx_version_result = run_command(
check_buildx,
verbose=verbose,
no_output_dump_on_exception=True,
capture_output=True,
text=True,
check=False,
)
if (
docker_buildx_version_result
and docker_buildx_version_result.returncode == 0
and docker_buildx_version_result.stdout != ''
):
is_buildx_available = True
return is_buildx_available
if docker_buildx_version_result.returncode == 0:
return True
return False


def prepare_base_build_command(image_params: _CommonBuildParams, verbose: bool) -> List[str]:
Expand Down

0 comments on commit f72217b

Please sign in to comment.