potiuk commented on code in PR #23391:
URL: https://github.com/apache/airflow/pull/23391#discussion_r865872650
##########
dev/breeze/src/airflow_breeze/commands/release_management.py:
##########
@@ -378,6 +398,228 @@ def generate_constraints(
sys.exit(return_code)
+def update_build_args_for_backend(installed_backend: str, build_args:
Dict[str, str]):
+ for backend in ALLOWED_PROD_BACKENDS:
+ build_args[f'INSTALL_{backend.upper()}'] = "true" if installed_backend
== backend else "false"
+
+
+def get_platform_per_backend(installed_backend: str, platform: str) -> str:
+
+ if installed_backend in ['mysql', 'mssql']:
+ if platform != "linux/amd64":
+ platform = "linux/amd64"
+ get_console().print(f"[warning]For {installed_backend} the
platform is forced to {platform}")
+ return platform
+
+
+def convert_build_args_dict_to_array_of_args(build_args: Dict[str, str]) ->
List[str]:
+ array_of_args = []
+ for key, value in build_args.items():
+ array_of_args.append("--build-arg")
+ array_of_args.append(f'{key}={value}')
+ return array_of_args
+
+
+def alias_image(image_from: str, image_to: str, dry_run: bool, verbose: bool):
+ get_console().print(f"[info]Creating {image_to} alias for {image_from}[/]")
+ run_command(["regctl", "image", "copy", image_from, image_to],
dry_run=dry_run, verbose=verbose)
+
+
[email protected](
Review Comment:
It's very cool indeed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]