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

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

commit 1672a7b9244ec0e0ad382a358adcb4396deb742d
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat Mar 7 22:43:04 2026 +0100

    One more constraints fallback for v2-11-test branch
---
 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 bca5303f2f3..dc05d17fc7c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -687,9 +687,26 @@ function 
install_airflow_and_providers_from_docker_context_files(){
             echo
             # force reinstall all airflow + provider packages with constraints 
found in
             set -x
-            ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} --upgrade \
+            if ! ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} 
--upgrade \
                 ${ADDITIONAL_PIP_INSTALL_FLAGS} --constraint 
"${local_constraints_file}" \
-                "${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} --upgrade 
\
+                                ${ADDITIONAL_PIP_INSTALL_FLAGS} \
+                                "${install_airflow_package[@]}" 
"${installing_providers_packages[@]}"
+            fi
             set +x
             echo
             echo "${COLOR_BLUE}Copying ${local_constraints_file} to 
${HOME}/constraints.txt${COLOR_RESET}"
diff --git a/scripts/docker/install_from_docker_context_files.sh 
b/scripts/docker/install_from_docker_context_files.sh
index 1370123e003..5c69b540feb 100644
--- a/scripts/docker/install_from_docker_context_files.sh
+++ b/scripts/docker/install_from_docker_context_files.sh
@@ -82,9 +82,26 @@ function 
install_airflow_and_providers_from_docker_context_files(){
             echo
             # force reinstall all airflow + provider packages with constraints 
found in
             set -x
-            ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} --upgrade \
+            if ! ${PACKAGING_TOOL_CMD} install ${EXTRA_INSTALL_FLAGS} 
--upgrade \
                 ${ADDITIONAL_PIP_INSTALL_FLAGS} --constraint 
"${local_constraints_file}" \
-                "${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} --upgrade 
\
+                                ${ADDITIONAL_PIP_INSTALL_FLAGS} \
+                                "${install_airflow_package[@]}" 
"${installing_providers_packages[@]}"
+            fi
             set +x
             echo
             echo "${COLOR_BLUE}Copying ${local_constraints_file} to 
${HOME}/constraints.txt${COLOR_RESET}"

Reply via email to