You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by as...@apache.org on 2022/09/09 12:35:52 UTC

[airflow] 02/04: Add better progress in CI for constraints generation. (#26253)

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

ash pushed a commit to branch v2-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit c06d8dbe9dddfb924041747cc84ae2d12799e0da
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Thu Sep 8 23:38:51 2022 +0200

    Add better progress in CI for constraints generation. (#26253)
    
    Currently constraints generation is not really showing good progress
    while the packages are being removed/installed. This adds progress
    that shows that something happens.
    
    (cherry picked from commit d6f473b31d9902290dc3a204657b4a7ed8d7843b)
---
 .../commands/release_management_commands.py               | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py
index e061bd345a..dad5161220 100644
--- a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py
@@ -65,7 +65,7 @@ from airflow_breeze.utils.docker_command_utils import (
     get_extra_docker_flags,
     perform_environment_checks,
 )
-from airflow_breeze.utils.parallel import check_async_run_results, run_with_pool
+from airflow_breeze.utils.parallel import GenericRegexpProgressMatcher, check_async_run_results, run_with_pool
 from airflow_breeze.utils.python_versions import get_python_version_list
 from airflow_breeze.utils.run_utils import (
     RunCommandResult,
@@ -305,6 +305,11 @@ def run_generate_constraints(
     )
 
 
+CONSTRAINT_PROGRESS_MATCHER = (
+    r'Found|Uninstalling|uninstalled|Collecting|Downloading|eta|Running|Installing|built|Attempting'
+)
+
+
 def run_generate_constraints_in_parallel(
     shell_params_list: List[ShellParams],
     python_version_list: List[str],
@@ -320,7 +325,13 @@ def run_generate_constraints_in_parallel(
             f"Constraints {shell_params.airflow_constraints_mode}:{shell_params.python}"
             for shell_params in shell_params_list
         ]
-        with run_with_pool(parallelism=parallelism, all_params=all_params) as (pool, outputs):
+        with run_with_pool(
+            parallelism=parallelism,
+            all_params=all_params,
+            progress_matcher=GenericRegexpProgressMatcher(
+                regexp=CONSTRAINT_PROGRESS_MATCHER, lines_to_search=6
+            ),
+        ) as (pool, outputs):
             results = [
                 pool.apply_async(
                     run_generate_constraints,