You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2026/03/07 21:08:42 UTC

(airflow) branch one-more-constraint-fallback-2-11-only created (now 5824b716ed7)

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

potiuk pushed a change to branch one-more-constraint-fallback-2-11-only
in repository https://gitbox.apache.org/repos/asf/airflow.git


      at 5824b716ed7 Add one more constraint fallback - v2-11-test only

This branch includes the following new commits:

     new 5824b716ed7 Add one more constraint fallback - v2-11-test only

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(airflow) 01/01: Add one more constraint fallback - v2-11-test only

Posted by po...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch one-more-constraint-fallback-2-11-only
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 5824b716ed7f1840d81bdd73022d91cbc03dc0ff
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sat Mar 7 22:07:23 2026 +0100

    Add one more constraint fallback - v2-11-test only
    
    There is one more case that needs to be handled in v2-11-test for
    no-constraints fallback.
---
 Dockerfile                                          | 21 +++++++++++++++++++--
 scripts/docker/install_from_docker_context_files.sh | 21 +++++++++++++++++++--
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index d0c95d4aa80..bca5303f2f3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -700,10 +700,27 @@ function install_airflow_and_providers_from_docker_context_files(){
             echo "${COLOR_BLUE}Installing docker-context-files packages with constraints from GitHub${COLOR_RESET}"
             echo
             set -x
-            ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} \
+            if ! ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} \
                 ${ADDITIONAL_PIP_INSTALL_FLAGS} \
                 --constraint "${HOME}/constraints.txt" \
-                "${install_airflow_package[@]}" "${installing_providers_packages[@]}"
+                "${install_airflow_package[@]}" "${installing_providers_packages[@]}"; then
+                set +x
+                if [[ ${AIRFLOW_FALLBACK_NO_CONSTRAINTS_INSTALLATION} != "true" ]]; then
+                    echo
+                    echo "${COLOR_RED}Failing because constraints installation failed and fallback is disabled.${COLOR_RESET}"
+                    echo
+                    exit 1
+                fi
+                echo
+                echo "${COLOR_YELLOW}Likely there are new dependencies conflicting with constraints.${COLOR_RESET}"
+                echo
+                echo "${COLOR_BLUE}Falling back to no-constraints installation.${COLOR_RESET}"
+                echo
+                set -x
+                ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} \
+                    ${ADDITIONAL_PIP_INSTALL_FLAGS} \
+                    "${install_airflow_package[@]}" "${installing_providers_packages[@]}"
+            fi
             set +x
         fi
     else
diff --git a/scripts/docker/install_from_docker_context_files.sh b/scripts/docker/install_from_docker_context_files.sh
index 5e416b30763..1370123e003 100644
--- a/scripts/docker/install_from_docker_context_files.sh
+++ b/scripts/docker/install_from_docker_context_files.sh
@@ -95,10 +95,27 @@ function install_airflow_and_providers_from_docker_context_files(){
             echo "${COLOR_BLUE}Installing docker-context-files packages with constraints from GitHub${COLOR_RESET}"
             echo
             set -x
-            ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} \
+            if ! ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} \
                 ${ADDITIONAL_PIP_INSTALL_FLAGS} \
                 --constraint "${HOME}/constraints.txt" \
-                "${install_airflow_package[@]}" "${installing_providers_packages[@]}"
+                "${install_airflow_package[@]}" "${installing_providers_packages[@]}"; then
+                set +x
+                if [[ ${AIRFLOW_FALLBACK_NO_CONSTRAINTS_INSTALLATION} != "true" ]]; then
+                    echo
+                    echo "${COLOR_RED}Failing because constraints installation failed and fallback is disabled.${COLOR_RESET}"
+                    echo
+                    exit 1
+                fi
+                echo
+                echo "${COLOR_YELLOW}Likely there are new dependencies conflicting with constraints.${COLOR_RESET}"
+                echo
+                echo "${COLOR_BLUE}Falling back to no-constraints installation.${COLOR_RESET}"
+                echo
+                set -x
+                ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} \
+                    ${ADDITIONAL_PIP_INSTALL_FLAGS} \
+                    "${install_airflow_package[@]}" "${installing_providers_packages[@]}"
+            fi
             set +x
         fi
     else