-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Replace pip-compile
with uv
#4460
Conversation
- Replace pip-compile with uv packages - Pin rust version - Add var to trigger windmill print more info in stdout
Some of the flags are included by default in UV and can be safely removed: - --resolver=backtracking - --no-emit-index-url Also uv does not support `--pip-args` and suggests to directly pass args to uv.
Currently testing change. Small note: Edit: Resolved by using |
Put `# no_uv` on top the file for specific python script Or set `USE_PIP_COMPILE` variable to `true`
Add #no_uv to the end of requirements (requirements.in) That way if something breaks for customer, then they put #no_uv and new lockfile will be resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 80fbdd2 in 34 seconds
More details
- Looked at
588
lines of code in11
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. docker/DockerfileSlim:18
- Draft comment:
pip-tools
is still being installed, which is unnecessary ifuv
is replacingpip-compile
. Consider removing this line. - Reason this comment was not posted:
Comment was on unchanged code.
2. docker/DockerfileSlimEe:18
- Draft comment:
pip-tools
is still being installed, which is unnecessary ifuv
is replacingpip-compile
. Consider removing this line. - Reason this comment was not posted:
Marked as duplicate.
3. shell.nix:31
- Draft comment:
pip-tools
is still being included, which is unnecessary ifuv
is replacingpip-compile
. Consider removing this line. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_kUt9IB3lRJVitQsx
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
error[E0658]: attributes on expressions are experimental --> windmill-worker/src/python_executor.rs:144:5 | 144 | #[cfg(feature = "enterprise")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 <rust-lang/rust#15701> for more information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 175528e in 22 seconds
More details
- Looked at
15
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. backend/windmill-worker/src/python_executor.rs:146
- Draft comment:
Usingunwrap
here can cause a panic if the expected capture group is not present. Consider handling this case more gracefully to avoid potential runtime errors. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_Ac1Y9G8sFlzsPKkk
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Will force recalculation of lockfile And block uv from using cached values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 4f06bfe in 31 seconds
More details
- Looked at
15
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. backend/windmill-worker/src/python_executor.rs:261
- Draft comment:
The added arguments--python-preference only-system
and--no-python-downloads
ensure thatuv
does not manage Python installations, which aligns with the PR intent. - Reason this comment was not posted:
Confidence changes required:0%
The added arguments to theuv
command in theuv_pip_compile
function are intended to preventuv
from managing Python installations. This is consistent with the PR description and comments.
Workflow ID: wflow_aaeBOQd0dDUKyrRH
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on abee3d7 in 17 seconds
More details
- Looked at
14
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. .github/DockerfileBackendTests:47
- Draft comment:
Consider verifying the integrity of theuv
installation script before executing it to prevent potential security risks. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_1pQj35qzDhf2xDeZ
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@rubenfiszel Can't pass checks because environment of tests is managed by repository and I cant alter it to include uv |
Instead postfix hash for requirements.in with `-no_uv`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 04aac60 in 43 seconds
More details
- Looked at
41
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_NlqBFn1F4ei1slY7
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on 621e5a2 in 19 seconds
More details
- Looked at
12
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. backend/windmill-worker/src/python_executor.rs:152
- Draft comment:
Redundant log message. Consider removing this line as the fallback to pip-compile is already logged on line 180. - Reason this comment was not posted:
Confidence changes required:50%
The comment on line 152 is redundant since the same information is already logged on line 180. It's better to keep the logging consistent and avoid redundancy.
Workflow ID: wflow_3aCdEJ1ooo8gn7GV
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Makes more idiomatic and is much faster on cold starts.
Useful if starting fresh instance or/and adding new dependency to python
Important
Replace
pip-compile
withuv
for Python dependency management, update Docker and Nix configurations, and refactor TypeScript and Python annotations.pip-compile
withuv
inpython_executor.rs
andansible_executor.rs
for Python dependency resolution.get_annotation_python()
inworker.rs
to handleno_uv
annotation for Python scripts.uv_pip_compile()
to handleno_uv
flag and fallback topip-compile
if necessary.uv
inDockerfile
,DockerfileSlim
, andDockerfileSlimEe
.uv
toshell.nix
for Nix environment setup.get_annotation()
toget_annotation_ts()
inworker.rs
and update references inbun_executor.rs
,worker_lockfiles.rs
, andscripts.rs
.handle_python_deps()
andhandle_ansible_python_deps()
to useuv_pip_compile()
.RUST_LOG
to "debug" inshell.nix
for development purposes.This description was created by for 621e5a2. It will automatically update as commits are pushed.