Skip to content

[raycicmd] Selector syntax for array depends_on#472

Merged
andrew-anyscale merged 1 commit intomainfrom
andrew/revup/main/bracket-depends-on
Mar 26, 2026
Merged

[raycicmd] Selector syntax for array depends_on#472
andrew-anyscale merged 1 commit intomainfrom
andrew/revup/main/bracket-depends-on

Conversation

@andrew-anyscale
Copy link
Copy Markdown
Contributor

@andrew-anyscale andrew-anyscale commented Mar 20, 2026

Replace the map-based depends_on syntax with a unified selector syntax using parentheses (YAML-safe, no quoting needed):

  • step-key — literal pass-through
  • step(*) — all variants
  • step(key=val, key=val) — explicit filter
  • step($) — reserved for implicit matching (errors for now)

Introduce selectorMode enum replacing the old matchAll boolean. Remove parseArraySelectorMap and parseSelectorFilter. Plain string targeting an array step is now an error.

Update .buildkite/array-test.rayci.yaml to use new syntax.

Topic: bracket-depends-on
Relative: array-validation-guards
Signed-off-by: andrew andrew@anyscale.com

@andrew-anyscale
Copy link
Copy Markdown
Contributor Author

andrew-anyscale commented Mar 20, 2026

Reviews in this chain:
#472 [raycicmd] Selector syntax for array depends_on
 └#471 [raycicmd] Implicit dimension matching for array-to-array depends_on

@andrew-anyscale
Copy link
Copy Markdown
Contributor Author

andrew-anyscale commented Mar 20, 2026

# head base diff date summary
0 c75eb0c0 56bfbd04 diff Mar 20 16:20 PM 3 files changed, 525 insertions(+), 338 deletions(-)
1 b83b51c8 03cd98f2 diff Mar 20 16:44 PM 1 file changed, 114 insertions(+), 113 deletions(-)
2 3bdbf597 7efcbc4a diff Mar 20 17:10 PM 2 files changed, 178 insertions(+), 412 deletions(-)
3 68277da0 7efcbc4a diff Mar 20 17:19 PM 2 files changed, 345 insertions(+), 339 deletions(-)
4 3b3be0c4 2ca9c576 diff Mar 20 17:37 PM 2 files changed, 11 insertions(+), 724 deletions(-)
5 66c37638 2ca9c576 diff Mar 20 17:55 PM 2 files changed, 7 insertions(+), 10 deletions(-)
6 91b2dcd9 f649330c diff Mar 20 17:57 PM 0 files changed
7 f2f670d9 f649330c diff Mar 20 18:35 PM 1 file changed, 2 insertions(+), 4 deletions(-)
8 fb306e41 f649330c diff Mar 20 21:50 PM 5 files changed, 73 insertions(+), 74 deletions(-)
9 28bf469b f649330c diff Mar 23 8:10 AM 0 files changed
10 5528dfca 3f8632d5 diff Mar 26 10:40 AM 0 files changed

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 refactors how array step dependencies are specified and resolved within the raycicmd tool. The primary goal is to provide a more intuitive, expressive, and less error-prone way to define complex dependencies between array steps and their variants, moving from a map-based YAML structure to a concise bracket-based string syntax. This change improves the user experience by offering clearer syntax and better validation, making it easier to understand and manage CI/CD pipeline configurations.

Highlights

  • New Bracket Syntax for Array Dependencies: Introduced a new bracket syntax for defining array step dependencies, allowing for more explicit and flexible control over how steps depend on array variants. This replaces the previous map-based syntax for string inputs.
  • Dependency Selector Modes: Added a selectorMode enum to categorize dependency types: selectorLiteral (no brackets), selectorImplicit ([$] for shared dimensions), selectorMatchAll ([*] for all variants), and selectorFilter ([key=val] for explicit filtering).
  • Robust Parsing and Error Handling: Implemented parseBracketSelector and parseBracketFilter functions to parse the new syntax, including comprehensive error checking for malformed inputs such as empty brackets, missing closing brackets, invalid key-value pairs, trailing commas, and duplicate filter entries.
  • Improved Clarity and Safety: Enhanced error messages and introduced checks to prevent common misconfigurations, such as using array selectors on non-array steps or implicit matching ([$]) from non-array steps or when no overlapping dimensions exist.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new, more expressive bracket syntax for depends_on in array steps, which is a great improvement over the old map-based syntax. The implementation is solid, with good error handling and comprehensive test coverage for the new functionality. I have a few suggestions to further improve the robustness of the parsing logic and the tests.

Comment thread raycicmd/array_expand.go Outdated
Comment thread raycicmd/array_expand.go Outdated
Comment thread raycicmd/array_expand_test.go Outdated
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/bracket-depends-on branch from c75eb0c to b83b51c Compare March 20, 2026 23:45
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/implicit-dim-matching branch from 56bfbd0 to 03cd98f Compare March 20, 2026 23:45
@andrew-anyscale
Copy link
Copy Markdown
Contributor Author

added skip-prcheck since a majority is testing.

@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/implicit-dim-matching branch from 03cd98f to 7efcbc4 Compare March 21, 2026 00:10
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/bracket-depends-on branch 2 times, most recently from 3bdbf59 to 68277da Compare March 21, 2026 00:19
@andrew-anyscale andrew-anyscale changed the title [raycicmd] Add bracket syntax for array depends_on parsing [raycicmd] Bracket syntax for array depends_on Mar 21, 2026
@andrew-anyscale andrew-anyscale changed the base branch from andrew/revup/main/implicit-dim-matching to andrew/revup/main/array-validation-guards March 21, 2026 00:37
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/bracket-depends-on branch from 68277da to 3ea8142 Compare March 21, 2026 00:37
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/implicit-dim-matching branch from 7efcbc4 to ee66d67 Compare March 21, 2026 00:37
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/bracket-depends-on branch 3 times, most recently from 66c3763 to 91b2dcd Compare March 21, 2026 00:57
@andrew-anyscale andrew-anyscale marked this pull request as ready for review March 21, 2026 00:57
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/array-validation-guards branch from 2ca9c57 to f649330 Compare March 21, 2026 00:57
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/bracket-depends-on branch from 91b2dcd to f2f670d Compare March 21, 2026 01:35
Comment thread .buildkite/array-test.rayci.yaml Outdated
@andrew-anyscale andrew-anyscale changed the title [raycicmd] Bracket syntax for array depends_on [raycicmd] Selector syntax for array depends_on Mar 21, 2026
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/bracket-depends-on branch from f2f670d to fb306e4 Compare March 21, 2026 04:50
@andrew-anyscale andrew-anyscale marked this pull request as draft March 21, 2026 04:50
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/bracket-depends-on branch from fb306e4 to 28bf469 Compare March 23, 2026 15:10
@andrew-anyscale andrew-anyscale marked this pull request as ready for review March 23, 2026 15:10
Base automatically changed from andrew/revup/main/array-validation-guards to main March 26, 2026 17:38
Replace the map-based depends_on syntax with a unified selector syntax using parentheses (YAML-safe, no quoting needed):
- step-key — literal pass-through
- step(*) — all variants
- step(key=val, key=val) — explicit filter
- step($) — reserved for implicit matching (errors for now)

Introduce selectorMode enum replacing the old matchAll boolean. Remove parseArraySelectorMap and parseSelectorFilter. Plain string targeting an array step is now an error.

Update .buildkite/array-test.rayci.yaml to use new syntax.

Topic: bracket-depends-on
Relative: array-validation-guards
Signed-off-by: andrew <andrew@anyscale.com>
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/bracket-depends-on branch from 28bf469 to 5528dfc Compare March 26, 2026 17:40
@andrew-anyscale andrew-anyscale enabled auto-merge (squash) March 26, 2026 17:43
@andrew-anyscale andrew-anyscale merged commit 3460594 into main Mar 26, 2026
2 checks passed
@andrew-anyscale andrew-anyscale deleted the andrew/revup/main/bracket-depends-on branch March 26, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants