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 7bd44d9c9e3 One more constraints fallback for v2-11-test branch
(#63076)
7bd44d9c9e3 is described below
commit 7bd44d9c9e32c2c47264e75060f41e4f309dcda9
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat Mar 7 22:44:51 2026 +0100
One more constraints fallback for v2-11-test branch (#63076)
---
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}"