Use uv as packaging tool used in CI builds - #37683
Closed
potiuk wants to merge 1 commit into
Closed
Conversation
potiuk
requested review from
Taragolis,
eladkal,
ephraimbuddy,
hussein-awala and
pierrejeambrun
February 24, 2024 23:04
hussein-awala
approved these changes
Feb 24, 2024
hussein-awala
left a comment
Member
There was a problem hiding this comment.
Excited 😄
Looks good, I hope the CI will pass
Member
Author
Not yet (expected) - but it's close :). |
Member
Author
|
And the numbers are REALLY REALLY good - see https://lists.apache.org/thread/t7pd78ktcs2s4b8mv3trwb7bdyjthcpz |
potiuk
force-pushed
the
use-uv-for-ci-build
branch
2 times, most recently
from
February 25, 2024 07:52
108d490 to
1994e33
Compare
andresitorusz
approved these changes
Feb 25, 2024
potiuk
force-pushed
the
use-uv-for-ci-build
branch
from
February 25, 2024 10:49
1994e33 to
40ad435
Compare
1 task
potiuk
force-pushed
the
use-uv-for-ci-build
branch
from
February 25, 2024 14:22
40ad435 to
256981b
Compare
potiuk
added a commit
to potiuk/airflow
that referenced
this pull request
Feb 25, 2024
The pintodb python package had a very old and very low lower limit, that introduced possible weird resolutions for dependencies when pinotdb had been downgraded to **really** low version - this has been observed in apache#37683 when we test replacing pip with uv in our CI environment. Bumping it to version >= 5.1.0 released last year in september - that was the first one that was not 0.N.*.
potiuk
added a commit
that referenced
this pull request
Feb 25, 2024
The pintodb python package had a very old and very low lower limit, that introduced possible weird resolutions for dependencies when pinotdb had been downgraded to **really** low version - this has been observed in #37683 when we test replacing pip with uv in our CI environment. Bumping it to version >= 5.1.0 released last year in september - that was the first one that was not 0.N.*.
potiuk
force-pushed
the
use-uv-for-ci-build
branch
from
February 25, 2024 16:48
256981b to
e6a18e3
Compare
potiuk
added a commit
to potiuk/airflow
that referenced
this pull request
Feb 25, 2024
The openapi validators in older versions do not work well for some moto tests which use the validators. Bumping specifically the min versions of those validators should help with better dependency resolving (wheb using uv and lowest transitive versions strategy it will downgrade the validators and will cause the tests to fail as seen in apache#37683. Those are only test and development dependencies and we already use the min version specified in our CI, so it should have no impact on production airflow (but should help wiht CI/dependency resolution)
potiuk
added a commit
that referenced
this pull request
Feb 25, 2024
The openapi validators in older versions do not work well for some moto tests which use the validators. Bumping specifically the min versions of those validators should help with better dependency resolving (wheb using uv and lowest transitive versions strategy it will downgrade the validators and will cause the tests to fail as seen in #37683. Those are only test and development dependencies and we already use the min version specified in our CI, so it should have no impact on production airflow (but should help wiht CI/dependency resolution)
potiuk
force-pushed
the
use-uv-for-ci-build
branch
from
February 25, 2024 17:28
6f85cbd to
5571a04
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 25, 2024 18:26
5571a04 to
0470aee
Compare
Member
Author
|
I need to close it and re-open it in |
Member
Author
|
Reopened it as #37692 |
ephraimbuddy
pushed a commit
that referenced
this pull request
Mar 6, 2024
The openapi validators in older versions do not work well for some moto tests which use the validators. Bumping specifically the min versions of those validators should help with better dependency resolving (wheb using uv and lowest transitive versions strategy it will downgrade the validators and will cause the tests to fail as seen in #37683. Those are only test and development dependencies and we already use the min version specified in our CI, so it should have no impact on production airflow (but should help wiht CI/dependency resolution) (cherry picked from commit f3159df)
14 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.