potiuk commented on code in PR #23562:
URL: https://github.com/apache/airflow/pull/23562#discussion_r867459623
##########
Dockerfile:
##########
@@ -563,40 +565,19 @@ function
install_airflow_and_providers_from_docker_context_files(){
return
fi
- if [[ "${UPGRADE_TO_NEWER_DEPENDENCIES}" != "false" ]]; then
- echo
- echo "${COLOR_BLUE}Force re-installing airflow and providers from
local files with eager upgrade${COLOR_RESET}"
- echo
- # force reinstall all airflow + provider package local files with
eager upgrade
- pip install "${pip_flags[@]}" --upgrade --upgrade-strategy eager \
- ${reinstalling_apache_airflow_package}
${reinstalling_apache_airflow_providers_packages} \
- ${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS}
- else
- echo
- echo "${COLOR_BLUE}Force re-installing airflow and providers from
local files with constraints and upgrade if needed${COLOR_RESET}"
- echo
- if [[ ${AIRFLOW_CONSTRAINTS_LOCATION} == "/"* ]]; then
- grep -ve '^apache-airflow' <"${AIRFLOW_CONSTRAINTS_LOCATION}" >
/tmp/constraints.txt
- else
- # Remove provider packages from constraint files because they are
locally prepared
- curl -L "${AIRFLOW_CONSTRAINTS_LOCATION}" | grep -ve
'^apache-airflow' > /tmp/constraints.txt
- fi
- # force reinstall airflow + provider package local files with
constraints + upgrade if needed
- pip install "${pip_flags[@]}" --force-reinstall \
- ${reinstalling_apache_airflow_package}
${reinstalling_apache_airflow_providers_packages} \
- --constraint /tmp/constraints.txt
- rm /tmp/constraints.txt
- # make sure correct PIP version is used \
- pip install "pip==${AIRFLOW_PIP_VERSION}"
- # then upgrade if needed without using constraints to account for new
limits in setup.py
- pip install --upgrade --upgrade-strategy only-if-needed \
- ${reinstalling_apache_airflow_package}
${reinstalling_apache_airflow_providers_packages}
- fi
+ echo
Review Comment:
There are cases where the newly generated provider package will require
upgrading the dependencies. It does not matter for prod image to have upgraded
constraints because we only run k8s tests for those prod images, so even if
there are some incompatible dependencies they will be detected via running
tests in CI image in "upgrade" builds.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]