This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 00d2a3c931 Better diagnostics for ARM for MySQL and MSSQL (#24185)
00d2a3c931 is described below
commit 00d2a3c9319af6e145b8e03f5ac33a95fa8acd66
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Jun 12 17:14:09 2022 +0200
Better diagnostics for ARM for MySQL and MSSQL (#24185)
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.
---
dev/breeze/src/airflow_breeze/commands/developer_commands.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dev/breeze/src/airflow_breeze/commands/developer_commands.py
b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
index e10e79d0a8..a8ad686c70 100644
--- a/dev/breeze/src/airflow_breeze/commands/developer_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
@@ -25,6 +25,7 @@ from airflow_breeze.commands.ci_image_commands import
rebuild_ci_image_if_needed
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,
)
@@ -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
)