[rayapp] adding --nightly flag to test against nightly ray images#461
[rayapp] adding --nightly flag to test against nightly ray images#461elliot-barn wants to merge 4 commits intomainfrom
Conversation
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively introduces a --nightly flag for testing against nightly Ray images. The implementation is solid, with good validation for mutually exclusive flags and comprehensive new tests for the added functionality. My main feedback is around the error handling strategy. Currently, the process fails immediately if an incompatible template is found when using --nightly with test all. I've suggested a change to collect these errors and continue testing other templates for a better user experience. Overall, this is a great addition.
rayapp/template_test_runner.go
Outdated
| if nightly { | ||
| return fmt.Errorf( | ||
| "template %q uses BYOD cluster env, "+ | ||
| "which is not compatible with --nightly", | ||
| t.Name, | ||
| ) | ||
| } |
There was a problem hiding this comment.
Returning an error here will cause the entire test run to fail if a single template is incompatible with the --nightly flag. When running tests for all templates, it would be better to treat this as a failure for this specific template and continue with the others. Consider collecting these configuration errors and reporting them all at the end, similar to how test failures are aggregated in the failed slice.
rayapp/template_test_runner.go
Outdated
| if nightly { | ||
| return fmt.Errorf( | ||
| "template %q image_uri %q is not a ray image, "+ | ||
| "which is not compatible with --nightly", | ||
| t.Name, t.ClusterEnv.ImageURI, | ||
| ) | ||
| } |
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
rayapp/anyscale_cli_workspace_v2.go
Outdated
| if nightlyTagRe.MatchString(imageURI) { | ||
| // Nightly images don't need --ray-version; the version | ||
| // is embedded in the image URI tag. | ||
| } else { | ||
| args = append(args, "--ray-version", rayVersion) | ||
| } |
There was a problem hiding this comment.
The "empty-if" block seems a bit clunky. Can we have a log message or just turn it into a if !nightlyTagRe.MatchString(imageURI) with a comment explaining why we don't want to provide the --ray-version arg?
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
| var env *ClusterEnv | ||
| if nightly { | ||
| env, err = overrideClusterEnvNightly(t.ClusterEnv) | ||
| } else { | ||
| env, err = overrideClusterEnvRayVersion(t.ClusterEnv, rayVersion) | ||
| } | ||
| if err != nil { | ||
| return fmt.Errorf("override ray version for %q: %w", t.Name, err) | ||
| } | ||
| t.ClusterEnv = env | ||
| } |
There was a problem hiding this comment.
Can we have a validation after this to check that the replacement succeeded, and that the new image URI is not the same as the old image URI?
Or else, can we have a validation within the overrideClusterEnv* functions to check that t.ClusterEnv's image actually has a version that matches the regex we replace? Trying to catch edge cases such as template configs written to use latest versions or something like that.
adding --nightly flag to test against nightly ray images
when --nightly flag is provided the templates build_id/image_uri will get overridden in the following cases:
build_id(ray)anyscaleray2501-py311anyscale/ray:nightly-py311image_uri(ray)anyscale/ray:2.34.0-py311anyscale/ray:nightly-py311image_uri(non-ray)anyscale/myimage:2.37.0-py311byod.docker_imageus-docker.pkg.dev/.../template:2.51.1ex nightly image tags
anyscale/ray:nightly-py312
Tested