You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ra...@apache.org on 2026/04/23 05:04:18 UTC

(airflow) 38/48: [v3-2-test] Fix airflow-ctl fallback for failed constrained installs (#65013) (#65619)

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

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

commit d11e3a185470a75075d66b88a540b065225985af
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Tue Apr 21 20:16:48 2026 +0200

    [v3-2-test] Fix airflow-ctl fallback for failed constrained installs (#65013) (#65619)
    
    (cherry picked from commit a6f76b1a37b606cf7d3b58d5ce93b9544b57ce4f)
    
    Co-authored-by: Henry Chen <he...@gmail.com>
---
 scripts/in_container/install_airflow_and_providers.py | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/scripts/in_container/install_airflow_and_providers.py b/scripts/in_container/install_airflow_and_providers.py
index 80d7fa601cb..c8223f3eeff 100755
--- a/scripts/in_container/install_airflow_and_providers.py
+++ b/scripts/in_container/install_airflow_and_providers.py
@@ -1192,13 +1192,16 @@ def _install_airflow_ctl_with_constraints(installation_spec: InstallationSpec, g
     if installation_spec.airflow_ctl_constraints_location:
         console.print(f"[bright_blue]Use constraints: {installation_spec.airflow_ctl_constraints_location}")
         install_airflow_ctl_cmd.extend(["--constraint", installation_spec.airflow_ctl_constraints_location])
-    console.print()
-    result = run_command(install_airflow_ctl_cmd, github_actions=github_actions, check=True)
-    if result.returncode != 0:
-        console.print(
-            "[warning]Installation with constraints failed - might be because there are"
-            " conflicting dependencies in PyPI. Falling back to a non-constraint installation."
-        )
+        console.print()
+        result = run_command(install_airflow_ctl_cmd, github_actions=github_actions, check=False)
+        if result.returncode != 0:
+            console.print(
+                "[warning]Installation with constraints failed - might be because there are"
+                " conflicting dependencies in PyPI. Falling back to a non-constraint installation."
+            )
+            run_command(base_install_airflow_ctl_cmd, github_actions=github_actions, check=True)
+    else:
+        console.print()
         run_command(base_install_airflow_ctl_cmd, github_actions=github_actions, check=True)