potiuk commented on code in PR #23052: URL: https://github.com/apache/airflow/pull/23052#discussion_r852910822
########## dev/breeze/src/airflow_breeze/breeze.py: ########## @@ -1486,5 +1487,47 @@ def __init__(self, **kwargs): width=os.environ.get('RECORD_BREEZE_WIDTH'), ) + +@main.command(name='exec') +@option_verbose +@option_dry_run +@click.argument('exec_args', nargs=-1, type=click.UNPROCESSED) +def exec( + verbose: bool, dry_run: bool, exec_args: Tuple +): + dc_run_file = BUILD_CACHE_DIR / DOCKER_COMPOSE_RUN_SCRIPT_FOR_CI + params = BuildCiParams() + ci_image_name = params.airflow_image_name + check_docker_resources(verbose, ci_image_name) + cmd = [str(dc_run_file), 'ps'] Review Comment: We should really run `docker-compose ps` here. The bash attempted to use the generated dc_run file which is not needed any more, But what we need we need exactly the same parameters that are used by ShellParams in shell commmand. Otherwise `docker-compose` does not know which file and which configuration should be used. When we run docker-compose in Shell command we add :+1: - COMPOSE_FILE variable - Some environment variables for PORTs etc. only when we use the same parameters and COMPOSE_FILE that we used for "breeze shell" we will be able to find running processes with "docker-compose ps" command. So in short: * don't use dc_run (it's the way docker compose command was run in Breeze) * run docker-compose same way as in "shell" command (with the same env variables etc). * and be a bit smarter when finding containers. I have not used the right filterring when I run the command , but it can be done a bit "smarter" with `--filter` command to only filter running `airflow` container. * in order to test all the filtering, it might actually be nice to implement `docker-compose` command from the old Breeze. This command started docker-compose (same way as Shell command) and passed all the extra arguments passed directly to docker-compose command - this might be nice way to test various filtering strings. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org