Use uv as packaging tool used in CI builds - #37692
Merged
Merged
Conversation
potiuk
force-pushed
the
use-uv-for-ci-build
branch
5 times, most recently
from
February 25, 2024 23:35
98b31e0 to
43819fc
Compare
Member
Author
|
OK. Should be I think ready now. After disabling cache we are still way above 50% in the upgrade scenarios - so definitely worth it. |
potiuk
force-pushed
the
use-uv-for-ci-build
branch
3 times, most recently
from
February 25, 2024 23:59
2c9df56 to
1e1aa0b
Compare
amoghrajesh
reviewed
Feb 26, 2024
amoghrajesh
left a comment
Contributor
There was a problem hiding this comment.
Generally looks good, one general comment:
For the commands like pip install / uninstall replaced by ${PACKAGING_TOOL} install / uninstall do we not need -y
potiuk
commented
Feb 26, 2024
Member
Author
|
Should be good to go :). |
Lee-W
approved these changes
Feb 26, 2024
Lee-W
left a comment
Member
There was a problem hiding this comment.
Left one nitpick. Really looking forward to this one!
aritra24
approved these changes
Feb 26, 2024
aritra24
left a comment
Collaborator
There was a problem hiding this comment.
With a brief look it seems good to me.
potiuk
force-pushed
the
use-uv-for-ci-build
branch
from
February 26, 2024 09:49
97d06d2 to
f132519
Compare
The `uv` tool released in Feb 2024 by ruff creators provides a way faster drop-in replacement to `pip` and we are using it now in our CI, when it can bring significant speed improvements (and soon possibly more features). This PR replaces `pip install` and `pip uninstall` with equivalent `uv pip install` and `uv pip uninstall` commands, controlled by a single `AIRFLOW_USE_UV` ARG. In CI images it is set to "true" so CI images are prepared using UV, but PROD images (which are also used during CI tests) are built using pip. This way we can get both - stability and compliance for user-facing `pip` installation and speed and new features coming from `uv`.
potiuk
force-pushed
the
use-uv-for-ci-build
branch
from
February 26, 2024 09:58
f132519 to
ffd4f31
Compare
Member
Author
|
All review comments so far addressed. All green. |
amoghrajesh
approved these changes
Feb 26, 2024
amoghrajesh
left a comment
Contributor
There was a problem hiding this comment.
Took a second look and things look good from my end. Thanks @potiuk
LGTM +1
2 tasks
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.
The
uvtool released in Feb 2024 by ruff creators provides a way faster drop-in replacement topipand we are using it now in our CI, when it can bring significant speed improvements (and soon possibly more features).This PR replaces
pip installandpip uninstallwith equivalentuv pip installanduv pip uninstallcommands, controlled by a singleAIRFLOW_USE_UVARG. In CI images it is set to "true" so CI images are prepared using UV, but PROD images (which are also used during CI tests) are built using pip. This way we can get both - stability and compliance for user-facingpipinstallation and speed and new features coming fromuv.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.