Skip to content

Commit

Permalink
Better diagnostics for ARM for MySQL and MSSQL (apache#24185)
Browse files Browse the repository at this point in the history
Until we have debian suppor tof MySQL and MSSQL ARM, runnign
those on ARM platform is not supported. However error about it
was not clear (pulling docker image failed).

This PR adds platform checking also in breeze and fails fast
without even attempting to enter breeze shell when you are on
ARM and wants to run MsSQL or MySQL breeze shell.

Also some errors with running different backend versions via
breeze have been removed.
  • Loading branch information
potiuk authored Jun 12, 2022
1 parent 5623a5f commit 00d2a3c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dev/breeze/src/airflow_breeze/commands/developer_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from airflow_breeze.commands.main_command import main
from airflow_breeze.global_constants import (
DEFAULT_PYTHON_MAJOR_MINOR_VERSION,
DOCKER_DEFAULT_PLATFORM,
MOUNT_SELECTED,
get_available_packages,
)
Expand Down Expand Up @@ -601,7 +602,13 @@ def run_shell(verbose: bool, dry_run: bool, shell_params: ShellParams) -> RunCom
env_variables = get_env_variables_for_docker_commands(shell_params)
if cmd_added is not None:
cmd.extend(['-c', cmd_added])

if "arm64" in DOCKER_DEFAULT_PLATFORM:
if shell_params.backend == "mysql":
get_console().print('\n[error]MySQL is not supported on ARM architecture.[/]\n')
sys.exit(1)
if shell_params.backend == "mssql":
get_console().print('\n[error]MSSQL is not supported on ARM architecture[/]\n')
sys.exit(1)
command_result = run_command(
cmd, verbose=verbose, dry_run=dry_run, env=env_variables, text=True, check=False
)
Expand Down

0 comments on commit 00d2a3c

Please sign in to comment.