You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/06 16:51:04 UTC

[GitHub] [airflow] potiuk opened a new pull request #20726: Modernizes usage of PIP in Airflow images

potiuk opened a new pull request #20726:
URL: https://github.com/apache/airflow/pull/20726


   * removes PIP_INSTALL_USER variable
   * upgrades PIP to 21.3.1
   * removes AIRFLOW_INSTALL_USER_FLAG as it is not needed
   * removes spurious usage of --upgrade flag for PIP
   * adds better diagnostics during the build for PIP location and version
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md).
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#discussion_r780306178



##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the latest released one, then we run `pip install --disable-pip-version-check pip==21.3.4` - because I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4). If I skip the flag here, I will see "You should use PIP 21.3.4". But I am just going to do that :)
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk merged pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #20726:
URL: https://github.com/apache/airflow/pull/20726


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#issuecomment-1007141007


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#discussion_r780306178



##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the latest released one, then we run `pip install --disable-pip-version-check pip==21.3.4` - because I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4). If I skip the flag here, I will see "You should use PIP 21.3.4". But I am just doing it, so I do not want that warning :)
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#discussion_r780183220



##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Good point. Will add 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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#discussion_r780306178



##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the latest released one, then we run `pip install --disable-pip-version-check pip==21.3.4` - because I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4. If I skip the flag here, I will see "You should use PIP 21.3.4". But I am just going to do that :)
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] uranusjr commented on a change in pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#discussion_r780027275



##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       It may be a good idea to set `PIP_DISABLE_PIP_VERSION_CHECK` globally to disable the warning, since `AIRFLOW_PIP_VERSION` hardcodes the pip version, and the warning does not make too much sense when you do 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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #20726: Modernizes usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#issuecomment-1006747714


   (I did not cherry-pick properly- fixing 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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #20726: Modernizes usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#issuecomment-1006744759


   This is the same as previously approved #20678 (and merge-squashed in #20679) but with fixed bug that caused PROD tests to fail (the bug was that PIP_USER was missing in the build segment resulting in empty ".local" folder in final image. This made teh image much smaller (50%) but also much less useful (airflow was not installed effectively). 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk merged pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #20726:
URL: https://github.com/apache/airflow/pull/20726


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#discussion_r780306178



##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the newest one, then we run `pip install --disable-pip-version-check pip==21.3.4` - I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#discussion_r780308197



##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       This is basically chicken-egg problem :)




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #20726: Modernizes usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#issuecomment-1006751410


   OK. It's ready for re-review.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#issuecomment-1006884986


   Looks like it's good to go :) . The failure of one of the tests seems like virtual machine killed mid-flight, Not a real error.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#discussion_r780306178



##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the latest released one, then we run `pip install --disable-pip-version-check pip==21.3.4` - I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#discussion_r780306178



##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the latest released one, then we run `pip install --disable-pip-version-check pip==21.3.4` - because I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4). If I skip the flag here, I will see "You should use PIP 21.3.4". But I am just upgrading it, so I do not want that warning :)
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#issuecomment-1006917221


   Yep. Just one failure - coming from killing the machine.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#discussion_r780183220



##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Good point. Will add it.

##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the newest one, then we run `pip install --disable-pip-version-check pip==21.3.4` - I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   

##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the latest released one, then we run `pip install --disable-pip-version-check pip==21.3.4` - I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   

##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the latest released one, then we run `pip install --disable-pip-version-check pip==21.3.4` - because I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4. If I skip the flag here, I will see "You should use PIP 21.3.4". But I am just going to do that :)
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   

##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the latest released one, then we run `pip install --disable-pip-version-check pip==21.3.4` - because I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4). If I skip the flag here, I will see "You should use PIP 21.3.4". But I am just going to do that :)
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   

##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       This is basically chicken-egg problem :)

##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the latest released one, then we run `pip install --disable-pip-version-check pip==21.3.4` - because I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4). If I skip the flag here, I will see "You should use PIP 21.3.4". But I am just doing it, so I do not want that warning :)
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   

##########
File path: scripts/in_container/run_prepare_airflow_packages.sh
##########
@@ -34,7 +34,7 @@ function prepare_airflow_packages() {
     rm -rf -- *egg-info*
     rm -rf -- build
 
-    pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"
+    pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}"

Review comment:
       Ah... I know why it's good this way. I just recalled why.
   
   I actually want to have the warning if new version of PIP is released. The problem that i wanted to silence here was that pip which comes preinstalled in the image will be almost always an older version and it will also print the warnign when I actually want to upgrade PIP.
   
   So:
   
   * From the python image I got PIP 20.0.0 (for example)
   * When PIP 21.3.4 (which we chose as the supported one) is the latest released one, then we run `pip install --disable-pip-version-check pip==21.3.4` - because I do not want to see the warning here that PIP 20.0.0 is outdated (I know it - that's why I want to upgrade to 21.3.4). If I skip the flag here, I will see "You should use PIP 21.3.4". But I am just upgrading it, so I do not want that warning :)
   * But any following `pip install` (of airflow and deps) **should** generate warning in case PIP 21.3.5 is installed. I want to see it, because this is a way for me or anyone else who notices, that we should attempt to upgrade PIP
   
   So actually the "--disable-pip-version-check" flag only at the "pip upgrade" step makes perfect sense if I do not want to see any warning in case I am using latest released PIP version.
   
   
   
   
   
   
   




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #20726: Modernize usage of PIP in Airflow images

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #20726:
URL: https://github.com/apache/airflow/pull/20726#issuecomment-1006935543


   @ashb @uranusjr  -> I am waiting with the next one to avoid the confusion with multiple commits per pr


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org