Disable pip latest version check when building python native helper#5493
Merged
jeffwidman merged 1 commit intodependabot:mainfrom Aug 8, 2022
Merged
Conversation
a8a09b2 to
42119d5
Compare
This python helper is being run during the build of `Dependabot-core` docker image, triggering the following warning: ``` You are using pip version 22.0.4; however, version 22.2.2 is available. You should consider upgrading via the '/usr/local/.pyenv/versions/3.10.5/bin/python3.10 -m pip install --upgrade pip' command. ``` Beyond the annoyance of the warning message, this means that `pip` is making an unnecessary call to a remote server to check the version. A blogger [benchmarked this as costing ~0.2s](https://pythonspeed.com/articles/faster-pip-installs/), so disable it. This option can also be set globally using a config file or env var: * https://stackoverflow.com/a/46288945 * https://stackoverflow.com/a/60270281 However, we have a number of different use cases for calling `pip`, and in some cases we _may_ end up wanting the version check... for example it feels wrong/unpredictable to simultaneously disable the version check while we are [upgrading to the latest version](dependabot#5195).
42119d5 to
78cc70b
Compare
deivid-rodriguez
approved these changes
Aug 8, 2022
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This python helper is being run during the build of
Dependabot-coredocker image, triggering the following warning:
Beyond the annoyance of the warning message, this means that
pipismaking an unnecessary call to a remote server to check the version.
This won't be a huge savings, a blogger benchmarked this as costing ~0.2s, but still might as well disable it.
This option can also be set globally using a config file or env var:
However, we have a number of different use cases for calling
pip, andin some cases we may end up wanting the version check... for example
it feels wrong/unpredictable to simultaneously disable the version check
while we are upgrading to the latest version.