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

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

commit 119407d81990e61a1983b287234f5806d70efdf0
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon Aug 14 22:09:52 2023 +0200

    Fix eager upgrade failures for canary builds (#33395)
    
    The canary builds continued failing after fixing aibotocore
    in #33364 when aiobotocore dependency limit dependency limit. This was
    because the main build is now using "empty" eager upgrade requirements
    which override the embedded aiobotocore and continue trigger
    backtracking.
    
    This is not easily visible on CI because the backtracking
    error is under a folded CI image build group in CI.
    
    This PR fixes both:
    
    * only overrides eager requirements if they are not empty
    * make sure that eager upgrade output is in the unfolded output
      of CI job
    
    (cherry picked from commit 3857d3399c2e5f4c3e0a838b7a76296c4aa19b3e)
---
 dev/breeze/src/airflow_breeze/commands/ci_image_commands.py |  2 ++
 dev/breeze/src/airflow_breeze/params/build_ci_params.py     | 13 +++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py 
b/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py
index 133d02255a..124d6ca318 100644
--- a/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py
@@ -174,6 +174,8 @@ def build_timout_handler(build_process_group_id: int, 
signum, frame):
     os.waitpid(build_process_group_id, 0)
     # give the output a little time to flush so that the helpful error message 
is not hidden
     time.sleep(5)
+    if os.environ.get("GITHUB_ACTIONS", "false") != "true":
+        get_console().print("::endgroup::")
     get_console().print()
     get_console().print(
         "[error]The build timed out. This is likely because `pip` "
diff --git a/dev/breeze/src/airflow_breeze/params/build_ci_params.py 
b/dev/breeze/src/airflow_breeze/params/build_ci_params.py
index 5748ac5a34..8888a7398f 100644
--- a/dev/breeze/src/airflow_breeze/params/build_ci_params.py
+++ b/dev/breeze/src/airflow_breeze/params/build_ci_params.py
@@ -58,12 +58,13 @@ class BuildCiParams(CommonBuildParams):
             )
         if self.upgrade_to_newer_dependencies:
             eager_upgrade_arg = 
self.eager_upgrade_additional_requirements.strip().replace("\n", "")
-            extra_ci_flags.extend(
-                [
-                    "--build-arg",
-                    
f"EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS={eager_upgrade_arg}",
-                ]
-            )
+            if eager_upgrade_arg:
+                extra_ci_flags.extend(
+                    [
+                        "--build-arg",
+                        
f"EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS={eager_upgrade_arg}",
+                    ]
+                )
         return extra_ci_flags
 
     @property

Reply via email to