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

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


The following commit(s) were added to refs/heads/v2-11-test by this push:
     new 67116f84e80 Add one more constraint fallback - v2-11-test only (#63073)
67116f84e80 is described below

commit 67116f84e80f78691545d2617928f6a35238422c
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat Mar 7 22:08:57 2026 +0100

    Add one more constraint fallback - v2-11-test only (#63073)
    
    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

Reply via email to