-
Notifications
You must be signed in to change notification settings - Fork 115
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
Honor RAMALAMA_IMAGE if set #733
Conversation
Reviewer's Guide by SourceryThis PR ensures that the RAMALAMA_IMAGE environment variable is respected, preventing the application from defaulting to the CUDA image when a custom image is specified via the environment variable. It also introduces a DEFAULT_IMAGE constant to avoid hardcoding the default image. Class diagram showing the updated image handlingclassDiagram
class common {
+DEFAULT_IMAGE: string
+default_image(): string
+container_manager()
}
class model {
-_image(args)
+attempt_to_use_versioned(conman, image, vers, args)
}
note for common "DEFAULT_IMAGE constant added"
note for model "Updated image comparison logic"
Flow diagram for image selection logic after changesgraph TD
A[Start] --> B{RAMALAMA_IMAGE set?}
B -->|Yes| C[Use RAMALAMA_IMAGE]
B -->|No| D{args.image != DEFAULT_IMAGE?}
D -->|Yes| E[Use args.image]
D -->|No| F[Use DEFAULT_IMAGE]
C --> G[End]
E --> G
F --> G
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @rhatdan - I've reviewed your changes - here's some feedback:
Overall Comments:
- In model.py, comparing against DEFAULT_IMAGE instead of default_image() bypasses the environment variable check. This will prevent RAMALAMA_IMAGE from being honored. Please continue using default_image() for the comparison.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Currently on my cuda laptop, if I set RAMALAMA_IMAGE to something, ramalama ignores it and forces cuda image. Signed-off-by: Daniel J Walsh <[email protected]>
Currently on my cuda laptop, if I set RAMALAMA_IMAGE to something, ramalama ignores it and forces cuda image.
Summary by Sourcery
Bug Fixes: