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 <[email protected]> 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
