-
Notifications
You must be signed in to change notification settings - Fork 889
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: avoid failure when no special pip deps and better exit #1228
Conversation
de8c113
to
075895d
Compare
When building providers in a virtual environment or containers, special pip dependencies may not always be provided (e.g., for Ollama). The check should only fail if the required number of arguments is missing. Currently, two arguments are mandatory: 1. Environment name 2. Pip dependencies Additionally, return statements were replaced with sys.exit(1) in error conditions to ensure immediate termination on critical failures. Error handling in the stack build process was also improved to guarantee the program exits with status 1 when facing configuration issues or build failures. Signed-off-by: Sébastien Han <[email protected]>
075895d
to
bc89d8b
Compare
@@ -32,7 +32,7 @@ container_base="$3" | |||
build_file_path="$4" | |||
host_build_dir="$5" | |||
pip_dependencies="$6" | |||
special_pip_deps="$7" | |||
special_pip_deps="${7:-}" |
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.
in build_conda_env.sh/ build_venv.sh this is moved to before the "set -euo pipefail". Both options work, but better to align them. So, perhaps better to mimic the option in there (or change the other 2 to be like this one
do these overlap at all #1233? |
Yeah, I think it'll be great to have the renaming done after this current one is merged? What do you think? |
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.
I caught some similar stuff in my other PR, so this LGTM
What does this PR do?
When building providers in a virtual environment or containers, special
pip dependencies may not always be provided (e.g., for Ollama). The
check should only fail if the required number of arguments is missing.
Currently, two arguments are mandatory:
Additionally, return statements were replaced with sys.exit(1) in error
conditions to ensure immediate termination on critical failures. Error
handling in the stack build process was also improved to guarantee the
program exits with status 1 when facing configuration issues or build
failures.
Signed-off-by: Sébastien Han [email protected]
Test Plan
This command shouldn't fail: