This is an automated email from the ASF dual-hosted git repository.

ephraimanierobi pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-1-test by this push:
     new 9d1e44e1dd5 [v3-1-test] Improve startup information printed when 
Breeze starts (#58926) (#58927)
9d1e44e1dd5 is described below

commit 9d1e44e1dd5f89640db5f32191b8c538d2a662d6
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Dec 2 15:06:56 2025 +0100

    [v3-1-test] Improve startup information printed when Breeze starts (#58926) 
(#58927)
    
    We were using lru_cache to only print environment check output once,
    but the method was called once with quiet = False and once without,
    which made it double-print the output.
    
    The check was done in both - commmands and "docker_utils.enter_shell"
    and that was really unnecessary.
    
    This PR changes it so that environment check is done only once at
    the command entry, also the "executable bit" information that was
    somewhat useless is now replaced with printing a detailed version
    of Python used - which might help with diagnostics of some strange
    issues in case the output is copy&pasted.
    (cherry picked from commit 6c50b62ab72fd2639e9a442897b45dd45ae33f5b)
    
    Co-authored-by: Jarek Potiuk <[email protected]>
---
 dev/breeze/src/airflow_breeze/commands/developer_commands.py | 3 ++-
 dev/breeze/src/airflow_breeze/utils/docker_command_utils.py  | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dev/breeze/src/airflow_breeze/commands/developer_commands.py 
b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
index 57da7c33c38..ceb6b701da2 100644
--- a/dev/breeze/src/airflow_breeze/commands/developer_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
@@ -490,7 +490,7 @@ def shell(
         verbose_commands=verbose_commands,
         warn_image_upgrade_needed=warn_image_upgrade_needed,
     )
-    perform_environment_checks()
+    perform_environment_checks(quiet=shell_params.quiet)
     rebuild_or_pull_ci_image_if_needed(command_params=shell_params)
     result = enter_shell(shell_params=shell_params)
     fix_ownership_using_docker()
@@ -701,6 +701,7 @@ def start_airflow(
         use_uv=use_uv,
         uv_http_timeout=uv_http_timeout,
     )
+    perform_environment_checks(quiet=shell_params.quiet)
     rebuild_or_pull_ci_image_if_needed(command_params=shell_params)
     result = enter_shell(shell_params=shell_params)
     fix_ownership_using_docker()
diff --git a/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py 
b/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py
index 40205a4ed9c..36d420692be 100644
--- a/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py
+++ b/dev/breeze/src/airflow_breeze/utils/docker_command_utils.py
@@ -531,7 +531,7 @@ def check_executable_entrypoint_permissions(quiet: bool = 
False):
                 f"repository should only be checked out on a filesystem that 
is POSIX compliant."
             )
             sys.exit(1)
-    if not quiet:
+    if get_verbose() and not quiet:
         get_console().print("[success]Executable permissions on entrypoints 
are OK[/]")
 
 
@@ -542,6 +542,8 @@ def perform_environment_checks(quiet: bool = False):
     check_docker_version(quiet)
     check_docker_compose_version(quiet)
     check_executable_entrypoint_permissions(quiet)
+    if not quiet:
+        get_console().print(f"[success]Host python version is 
{sys.version}[/]")
 
 
 def get_docker_syntax_version() -> str:
@@ -810,6 +812,7 @@ def execute_command_in_shell(
         shell_params.extra_args = (command,)
         if get_verbose():
             get_console().print(f"[info]Command to execute: '{command}'[/]")
+    perform_environment_checks(quiet=shell_params.quiet)
     return enter_shell(shell_params, output=output, signal_error=signal_error)
 
 
@@ -827,7 +830,6 @@ def enter_shell(
     * shuts down existing project
     * executes the command to drop the user to Breeze shell
     """
-    perform_environment_checks(quiet=shell_params.quiet)
     fix_ownership_using_docker(quiet=shell_params.quiet)
     cleanup_python_generated_files()
     if read_from_cache_file("suppress_asciiart") is None and not 
shell_params.quiet:

Reply via email to