-
Notifications
You must be signed in to change notification settings - Fork 496
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: Handle pip install
by uv
#4517
base: main
Are you sure you want to change the base?
Conversation
Dirty and untested, but already something working
Deploying windmill with Cloudflare Pages
|
1ec8d63
to
91a3d06
Compare
c858c24
to
3cd30d2
Compare
no_uv disable compile and install where no_uv_install and no_uv_compile are a bit more specific
Reason: warning: pip's `--disable-pip-version-check` has no effect
|
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 0a1b134 in 1 minute and 26 seconds
More details
- Looked at
677
lines of code in12
files - Skipped
0
files when reviewing. - Skipped posting
6
drafted comments based on config settings.
1. backend/windmill-worker/nsjail/download_deps.py.pip.sh:1
- Draft comment:
Add a shebang line to specify the script interpreter.
#!/bin/sh
- Reason this comment was not posted:
Confidence changes required:50%
Thedownload_deps.py.pip.sh
script is missing a shebang line. This can cause issues when the script is executed in environments that rely on the shebang to determine the interpreter.
2. backend/windmill-worker/nsjail/download_deps.py.pip.sh:24
- Draft comment:
Avoid usingeval
to execute commands as it can be a security risk. Consider usingexec
or running the command directly.
exec $CMD
- Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment addresses a potential security risk with using 'eval'. The suggestion to use 'exec' is a common practice to avoid such risks. However, 'exec' changes the script's behavior by not returning control to the script after execution, which might not be the intended behavior. The comment is about a change made in the diff, specifically the use of 'eval'.
The comment assumes that replacing 'eval' with 'exec' is always a better choice, but it doesn't consider the change in script behavior. The author might have intended to use 'eval' for a specific reason.
While 'exec' changes the behavior, the security risk associated with 'eval' is significant enough to warrant the suggestion. The author can decide if the behavior change is acceptable.
Keep the comment as it highlights a valid security concern with using 'eval' and provides an actionable suggestion to mitigate it.
3. backend/windmill-worker/nsjail/download_deps.py.sh:37
- Draft comment:
Avoid usingeval
to execute commands as it can be a security risk. Consider usingexec
or running the command directly.
exec $CMD
- Reason this comment was not posted:
Marked as duplicate.
4. backend/windmill-worker/src/ansible_executor.rs:119
- Draft comment:
Consider using the appropriate logic to determine the value ofno_uv_install
instead of hardcodingfalse
. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is suggesting a potential improvement by not hardcoding a value. This is a valid suggestion as it could improve code flexibility and maintainability. The comment is directly related to the change made in the diff, which is the addition of thefalse
argument.
The comment does not provide specific guidance on what logic should be used, which might make it less actionable. However, it does highlight a potential area for improvement.
While the comment could be more specific, it still points out a hardcoded value that could be improved, which is a valid code quality suggestion.
The comment is valid as it points out a hardcoded value that could be improved by using logic to determine its value. It should be kept.
5. backend/windmill-worker/src/global_cache.rs:32
- Draft comment:
Consider refactoring the logic for determining the prefix into a helper function to improve code maintainability. - Reason this comment was not posted:
Confidence changes required:30%
Thebuild_tar_and_push
function inglobal_cache.rs
uses a conditional to determine the prefix for the tar path. This logic is repeated in multiple places and could be refactored into a helper function to improve maintainability.
6. backend/windmill-worker/src/global_cache.rs:99
- Draft comment:
Consider refactoring the logic for determining the tar path into a helper function to improve code maintainability. - Reason this comment was not posted:
Confidence changes required:30%
Thepull_from_tar
function inglobal_cache.rs
uses a conditional to determine the tar path. This logic is repeated in multiple places and could be refactored into a helper function to improve maintainability.
Workflow ID: wflow_Dt3hrydoH4g28DWs
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Ready for review, but not ready to merge (Windows testing missing) |
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 7b72b0c in 41 seconds
More details
- Looked at
64
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. backend/windmill-worker/src/python_executor.rs:1151
- Draft comment:
Usingunwrap_or_else
is safer thanunwrap
as it provides a default value in case of an error. However, consider logging the error for better debugging. This applies to other instances ofunwrap
in the code as well. - Reason this comment was not posted:
Confidence changes required:50%
The code usesunwrap
in multiple places, which can cause the program to panic if the value isNone
. This is not a safe practice, especially in production code. It's better to handle these cases gracefully.
2. backend/windmill-worker/src/python_executor.rs:1265
- Draft comment:
Usingunwrap_or_else
is safer thanunwrap
as it provides a default value in case of an error. However, consider logging the error for better debugging. This applies to other instances ofunwrap
in the code as well. - Reason this comment was not posted:
Confidence changes required:50%
The code usesunwrap
in multiple places, which can cause the program to panic if the value isNone
. This is not a safe practice, especially in production code. It's better to handle these cases gracefully.
3. backend/windmill-worker/src/python_executor.rs:1275
- Draft comment:
Usingunwrap_or_else
is safer thanunwrap
as it provides a default value in case of an error. However, consider logging the error for better debugging. This applies to other instances ofunwrap
in the code as well. - Reason this comment was not posted:
Confidence changes required:50%
The code usesunwrap
in multiple places, which can cause the program to panic if the value isNone
. This is not a safe practice, especially in production code. It's better to handle these cases gracefully.
4. backend/windmill-worker/src/python_executor.rs:1291
- Draft comment:
Usingunwrap_or_else
is safer thanunwrap
as it provides a default value in case of an error. However, consider logging the error for better debugging. This applies to other instances ofunwrap
in the code as well. - Reason this comment was not posted:
Confidence changes required:50%
The code usesunwrap
in multiple places, which can cause the program to panic if the value isNone
. This is not a safe practice, especially in production code. It's better to handle these cases gracefully.
5. backend/windmill-worker/src/python_executor.rs:1313
- Draft comment:
Usingunwrap_or_else
is safer thanunwrap
as it provides a default value in case of an error. However, consider logging the error for better debugging. This applies to other instances ofunwrap
in the code as well. - Reason this comment was not posted:
Confidence changes required:50%
The code usesunwrap
in multiple places, which can cause the program to panic if the value isNone
. This is not a safe practice, especially in production code. It's better to handle these cases gracefully.
Workflow ID: wflow_tJyLaeHTlFzZ1pJX
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
8756adb
to
41acd56
Compare
b2768d0
to
e0040fe
Compare
Replace
python pip install
withuv pip install
Important
Replace
python pip install
withuv pip install
, adding fallback mechanisms and updating cache management.python pip install
withuv pip install
indownload_deps.py.sh
andpython_executor.rs
.pip
ifUSE_PIP_INSTALL
is set orno_uv_install
is true.download.py.pip.config.proto
anddownload_deps.py.pip.sh
for fallback topip
.docker-image.yml
to trigger onpython-uv
branch.PY311_CACHE_DIR
inworker.rs
andglobal_cache.rs
foruv
installations.build_tar_and_push
andpull_from_tar
to handleuv
cache.no_uv_install
andno_uv_compile
toPythonAnnotations
inworker.rs
.This description was created by for 7b72b0c. It will automatically update as commits are pushed.