Skip to content
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

fix(python): Fix uv install not exiting on fail #4992

Closed
wants to merge 11 commits into from

Conversation

pyranota
Copy link
Collaborator

@pyranota pyranota commented Dec 30, 2024

  • More tests

Important

Fixes uv installation process not exiting on failure by ensuring stderr is read before process exit in python_executor.rs.

  • Behavior:
    • Fixes issue where uv installation process does not exit on failure by ensuring stderr is read before process exit in handle_python_reqs().
    • Removes -q flag from spawn_uv_install() command arguments.
  • Error Handling:
    • Captures stderr output to stderr_buf and logs it if uv installation fails.
    • Returns error with stderr content if uv installation process exits unsuccessfully.
  • Misc:
    • Minor code cleanup by removing unused comments and variables.

This description was created by Ellipsis for c912150. It will automatically update as commits are pushed.

Specifically with nmslib installation was hanging without any output, even tho library build was failed.

It can be monitored with strace or catp.
Copy link

cloudflare-workers-and-pages bot commented Dec 30, 2024

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: ae3d3c1
Status:⚡️  Build in progress...

View logs

@pyranota pyranota marked this pull request as ready for review January 3, 2025 14:05
@pyranota pyranota requested a review from rubenfiszel as a code owner January 3, 2025 14:05
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a 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 c912150 in 17 seconds

More details
  • Looked at 85 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. backend/windmill-worker/src/python_executor.rs:1249
  • Draft comment:
    Removing the '-q' flag increases verbosity. If the intent was to reduce verbosity, consider keeping the '-q' flag.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR removes the '-q' flag from the command arguments in the spawn_uv_install function. This change might affect the verbosity of the command output, which could be intentional for debugging purposes. However, if the intent was to reduce verbosity, this change should be reconsidered.
2. backend/windmill-worker/src/python_executor.rs:1785
  • Draft comment:
    Reading stderr before waiting for the process prevents potential deadlocks. This is a good practice to ensure the process exits correctly.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The PR modifies the handling of stderr by reading it into a buffer before waiting for the process to exit. This change ensures that the process exits correctly by preventing a potential deadlock if the stderr buffer fills up. This is a good practice to avoid blocking issues.

Workflow ID: wflow_DsJXpRYYU5iNiXUJ


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@rubenfiszel rubenfiszel closed this Jan 3, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants