potiuk commented on a change in pull request #11487:
URL: https://github.com/apache/airflow/pull/11487#discussion_r503861516
##########
File path: scripts/in_container/run_test_package_installation_separately.sh
##########
@@ -19,25 +19,45 @@
. "$( dirname "${BASH_SOURCE[0]}" )/_in_container_script_init.sh"
OUT_FILE_PRINTED_ON_ERROR=$(mktemp)
+setup_backport_packages
+
echo
-echo "Testing if all provider packages can be installed separately on Airflow
1.10 and cause no side effects"
+echo "Testing if all provider packages can be installed separately on Airflow
and cause no side effects"
echo
-if [[ ! ${INSTALL_AIRFLOW_VERSION:=""} =~ 1.10* ]]; then
+if [[ ${INSTALL_AIRFLOW_VERSION:=""} == "2.0.0-dev" ]]; then
+ echo
+ echo "Installing regular packages for Airflow 2.0 but first installing
prepared Airflow from master"
+ echo
+ pip install /dist/apache_airflow-*.whl
+ # Need to add excluded apache beam
+ pip install apache-beam[gcp]
echo
- echo "ERROR! You can only install providers package in 1.10. airflow
series."
+elif [[ ! ${INSTALL_AIRFLOW_VERSION} =~ 1.10* ]]; then
+ echo
+ echo "ERROR! You should install providers package in 1.10. Airflow series."
echo "You have: ${INSTALL_AIRFLOW_VERSION}"
echo "Set INSTALL_AIRFLOW_VERSION variable to the version you want to
install before running!"
exit 1
else
- # and install specified airflow from PyPI
+ # install specified airflow from PyPI
pip install "apache-airflow==${INSTALL_AIRFLOW_VERSION}"
>>"${OUT_FILE_PRINTED_ON_ERROR}" 2>&1
fi
+ORIGINAL_AIRFLOW_VERSION=$(pip freeze | grep "apache-airflow==" | sed
"s/apache-airflow==//")
+
+EXTRA_FLAGS=""
+
+if [[ ${BACKPORT_PACKAGES} != "true" ]]; then
+ # Install providers without deps as we do not have yet airflow 2.0 released
+ EXTRA_FLAGS="--no-deps"
+fi
+
+
# Install all packages separately one-by-one
-for PACKAGE_FILE in /dist/apache_airflow_backport_providers_*.whl
+for PACKAGE_FILE in /dist/apache_airflow*providers_*.whl
do
- if [[ ! ${PACKAGE_FILE} =~
/dist/(apache_airflow_backport_providers_[^-]*)-.* ]]; then
+ if [[ ! ${PACKAGE_FILE} =~ /dist/(apache_airflow.*_providers_[^-]*)-.* ]];
then
Review comment:
Well. Yeah, if there is a naming problem we will get an error. The
regexp is there to retrieve the package name (unfortunately pip uninstall does
not work with whl name to get the package name out of it).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]