Skip to content

[raycicmd] Parse array adjustments config#463

Merged
andrew-anyscale merged 1 commit intomainfrom
andrew/revup/main/parse-adjustments
Mar 18, 2026
Merged

[raycicmd] Parse array adjustments config#463
andrew-anyscale merged 1 commit intomainfrom
andrew/revup/main/parse-adjustments

Conversation

@andrew-anyscale
Copy link
Copy Markdown
Contributor

Add arrayAdjustment struct and parseArrayAdjustments() to parse the adjustments field nested under array. Each adjustment has a required with map (dimension→value) and optional skip (bool). The adjustments key in the array map is reserved and excluded from dimension parsing. Duplicate with values are rejected.

Topic: parse-adjustments
Signed-off-by: andrew andrew@anyscale.com

Add arrayAdjustment struct and parseArrayAdjustments() to parse the adjustments field nested under array. Each adjustment has a required `with` map (dimension→value) and optional `skip` (bool). The `adjustments` key in the array map is reserved and excluded from dimension parsing. Duplicate `with` values are rejected.

Topic: parse-adjustments
Signed-off-by: andrew <andrew@anyscale.com>
@andrew-anyscale
Copy link
Copy Markdown
Contributor Author

Reviews in this chain:
#463 [raycicmd] Parse array adjustments config
 └#464 [raycicmd] Apply array adjustments during expansion

@andrew-anyscale
Copy link
Copy Markdown
Contributor Author

andrew-anyscale commented Mar 18, 2026

# head base diff date summary
0 f497edeb d450ad62 diff Mar 18 8:49 AM 2 files changed, 206 insertions(+)
1 d45cc29a d450ad62 diff Mar 18 8:54 AM 2 files changed, 20 insertions(+), 1 deletion(-)

@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 enhances the array configuration parsing logic by introducing support for conditional adjustments. It allows users to define specific combinations of array dimensions that can be skipped or modified, providing greater flexibility in workflow definitions. The changes include new data structures and parsing functions, along with comprehensive validation to ensure the integrity and correctness of the adjustment configurations.

Highlights

  • Array Adjustments Configuration: Introduced a new arrayAdjustment struct and parseArrayAdjustments function to handle conditional adjustments within the array configuration, allowing for with (dimension-value map) and optional skip (boolean) fields.
  • Reserved 'adjustments' Key: The adjustments key is now reserved within the array map and is explicitly excluded from dimension parsing, ensuring it's handled separately as a list of adjustments.
  • Input Validation and Error Handling: Implemented robust validation for array adjustments, including checks for missing or empty with maps, incorrect types, and duplicate with configurations to prevent misconfigurations.
  • Helper Functions: Added toStringMap to convert map[string]any to map[string]string and marshalStringMap for deterministic string representation of maps, used for duplicate detection.
  • Dimension Validation: Added a check to ensure that an array configuration must define at least one dimension.

🧠 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 parsing for the adjustments field within an array configuration. The changes include new data structures and parsing logic, along with corresponding tests. The implementation is solid, but I have a few suggestions to improve error handling and test coverage. Specifically, I've recommended clarifying an error message, adding validation to reject unknown configuration keys, and including a test case for a new validation path. These changes will make the new feature more robust and easier for users to work with.

Comment thread raycicmd/array_config.go
Comment thread raycicmd/array_config.go
Comment thread raycicmd/array_config.go
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/main/parse-adjustments branch from f497ede to d45cc29 Compare March 18, 2026 15:54
@andrew-anyscale andrew-anyscale merged commit c00f147 into main Mar 18, 2026
2 checks passed
@andrew-anyscale andrew-anyscale deleted the andrew/revup/main/parse-adjustments branch March 18, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants