potiuk commented on a change in pull request #12693:
URL: https://github.com/apache/airflow/pull/12693#discussion_r537059871



##########
File path: scripts/in_container/_in_container_utils.sh
##########
@@ -263,14 +263,16 @@ function install_airflow_from_wheel() {
     echo
     echo "Install airflow wheel package from dist"
     echo
-    pip install /dist/apache_airflow-*.whl >"${OUT_FILE_PRINTED_ON_ERROR}" 2>&1
+    pip install /dist/apache_airflow-*.whl --no-deps 
>"${OUT_FILE_PRINTED_ON_ERROR}" 2>&1
 }
 
 function install_remaining_dependencies() {
     echo
     echo "Installs all remaining dependencies that are not installed by 'all' "
     echo
-    pip install apache-beam[gcp] >"${OUT_FILE_PRINTED_ON_ERROR}" 2>&1
+    pip install apache-beam[gcp] \
+        --constraint 
"https://raw.githubusercontent.com/apache/airflow/${CONSTRAINTS_BRANCH}/constraints-${PYTHON_MAJOR_MINOR_VERSION}.txt";
 \

Review comment:
       I prefer to do it explicitly. We are often telling our users to use 
constraints, and I prefer to use it everywhere where PyPI installation is 
involved. Even if someone stumbles upon this piece of code by search, the 
constraints will be there, as opposed to some global variable (which might or 
might not be set in a place which is somewhere else). or if someone wants to 
repeat this command, they might not realize constraints were set before.. 
   
   Also, I had already complaints about using too many global variables. While 
this saves a few lines of code, it's impliciness is sometimes much worse than 
that.
   




----------------------------------------------------------------
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]


Reply via email to