potiuk commented on code in PR #23395:
URL: https://github.com/apache/airflow/pull/23395#discussion_r862520647
##########
dev/breeze/src/airflow_breeze/shell/enter_shell.py:
##########
@@ -116,28 +77,24 @@ def run_shell_with_build_image_checks(
:param dry_run: do not execute "write" commands - just print what would
happen
:param shell_params: parameters of the execution
"""
- check_docker_resources(verbose, shell_params.airflow_image_name,
dry_run=dry_run)
- build_ci_image_check_cache = Path(
- BUILD_CACHE_DIR, shell_params.airflow_branch,
f".built_{shell_params.python}"
- )
- ci_image_params = BuildCiParams(python=shell_params.python,
upgrade_to_newer_dependencies=False)
- if build_ci_image_check_cache.exists():
- if verbose:
- get_console().print(f'[info]{shell_params.the_image_type} image
already built locally.[/]')
- else:
- get_console().print(
- f'[warning]{shell_params.the_image_type} image not built locally.
Forcing build.[/]'
- )
- ci_image_params.force_build = True
-
- build_ci_image(verbose, dry_run=dry_run, with_ci_group=False,
ci_image_params=ci_image_params)
+ rebuild_ci_image_if_needed(build_params=shell_params, dry_run=dry_run,
verbose=verbose)
shell_params.print_badge_info()
cmd = ['docker-compose', 'run', '--service-ports', "-e", "BREEZE", '--rm',
'airflow']
cmd_added = shell_params.command_passed
env_variables =
construct_env_variables_docker_compose_command(shell_params)
if cmd_added is not None:
cmd.extend(['-c', cmd_added])
- return run_command(cmd, verbose=verbose, dry_run=dry_run,
env=env_variables, text=True)
+
Review Comment:
Better handling of exit with error from shell command
--
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]