From a927c772a1f32f2fdf712fa8445ead806e819ca8 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sat, 20 Aug 2022 13:47:28 +0200 Subject: [PATCH] Filter out non-editable apache-airflow from constraints. (#25847) The constraint files should not contain apache-airflow. So far apache-airflow has been automatically filtered out by the fact that it has been an editable installation and we filtered out all editable and file installations from `pip freeze`. However as of ~12 August 2022, likely setuptools change triggered a slight behaviour change when `eager-upgrade` installation of providers from PyPi was run in the CI image. Previously airflow remained an editable install, but as of 12th of August, such an installation causes removal of editable airlfow install and reinstalls it in non-editable mode. While this change is somewhat confusing, we have to protect against it and remove apache-airflow from `pip freeze` also in non-editable mode. (cherry picked from commit cdbad44932c6d066c72ef82ef4e96dc8880da518) --- scripts/in_container/run_generate_constraints.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/in_container/run_generate_constraints.sh b/scripts/in_container/run_generate_constraints.sh index e85c2fb9c992a..a9d3781402b17 100755 --- a/scripts/in_container/run_generate_constraints.sh +++ b/scripts/in_container/run_generate_constraints.sh @@ -102,6 +102,7 @@ echo pip freeze | sort | \ grep -v "apache_airflow" | \ + grep -v "apache-airflow==" | \ grep -v "@" | \ grep -v "/opt/airflow" >>"${CURRENT_CONSTRAINT_FILE}"