Conversation
Implement core dependency graph functionality to support automatic building of prerequisite images. This enables a more bazel-like UX where `wanda build spec.yaml` can discover and build dependencies. - Add `Deps` field to Spec for declaring dependency wanda files - Export ParseSpecFile for use by dependency resolver - Implement DepGraph with topological sort (Kahn's algorithm) - Add cycle detection and validation for @ref dependencies - Support transitive dependency discovery Topic: wanda-deps Generated with help from Claude Opus 4.5 Signed-off-by: andrew <andrew@anyscale.com>
|
Summary of ChangesHello @andrew-anyscale, 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 significantly 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. 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 introduces a new deps command to the wanda CLI, which allows users to visualize the dependency build order for a given Wanda spec file. The implementation adds subcommand parsing to main.go and a new runDeps function to handle the logic. The changes are straightforward and achieve the goal. My main feedback is to suggest a more robust way of handling subcommands in Go to improve maintainability and prevent potential ambiguities, using flag.NewFlagSet from the standard library.
| // Check for subcommand before flag parsing | ||
| if len(os.Args) > 1 && !strings.HasPrefix(os.Args[1], "-") { | ||
| switch os.Args[1] { | ||
| case "deps": | ||
| runDeps(os.Args[2:]) | ||
| return | ||
| } | ||
| } |
There was a problem hiding this comment.
This approach to subcommand parsing by manually checking os.Args is simple, but it can be brittle and hard to extend. For instance, it creates an ambiguity if a spec file is named deps. Also, adding flags to the deps command in the future would be difficult with this setup.
A more robust and idiomatic Go solution is to use flag.NewFlagSet for each subcommand. This would make your CLI more maintainable and prevent potential conflicts between command names and arguments.
You could structure your main function to switch on os.Args[1] and then use the appropriate FlagSet to parse the remaining arguments. This would cleanly separate the logic and flags for each command.
e632ccc to
f74ad64
Compare
e08ff18 to
30996fa
Compare
Topic: wanda-deps Signed-off-by: andrew <andrew@anyscale.com>
Implement build integration for wanda dependency resolution. The CLI now automatically builds all dependencies in topological order before building the target spec. - Add BuildWithDeps function that builds specs in dependency order - Tag each built image with spec.Name for @ref resolution - Update CLI to use BuildWithDeps (backward compatible) - In RayCI mode, skip dep building (handled by prior pipeline steps) - Add test fixtures and tests for dependency chain builds Topic: wanda-build-deps Relative: wanda-deps Generated with help from Claude Opus 4.5 Signed-off-by: andrew <andrew@anyscale.com>
30996fa to
ad573f9
Compare
f74ad64 to
56e00c6
Compare
Used for parsing a Wanda file to get a visual on all dependent targets. Topic: wanda-cli-dep Relative: wanda-build-deps Labels: draft Generated with help from Claude Opus 4.5 Signed-off-by: andrew <andrew@anyscale.com>
56e00c6 to
f319704
Compare
ad573f9 to
d1d2155
Compare
f319704 to
ae47f27
Compare
d1d2155 to
1e1f0d2
Compare
b838030 to
a289e51
Compare
35530d6 to
a384fdf
Compare
Used for parsing a Wanda file to get a visual
on all dependent targets.
Topic: wanda-cli-dep
Relative: wanda-build-deps
Labels: draft
Generated with help from Claude Opus 4.5
Signed-off-by: andrew andrew@anyscale.com