Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
WalkthroughWarning Review details and warnings were omitted to fit the comment limit. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f59d89ce44
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -164,7 +164,7 @@ public void Deconstruct(out string InstanceName) | |||
| /// <inheritdoc /> | |||
| IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) | |||
| { | |||
| if ((!string.IsNullOrWhiteSpace(Address) ? 1 : 0) + (NoAddress == true ? 1 : 0) > 1) | |||
| if ((Address is not null ? 1 : 0) + (NoAddress == true ? 1 : 0) > 1 || ((Address is not null || NoAddress == true) && !(!string.IsNullOrWhiteSpace(Address) || NoAddress == true))) | |||
There was a problem hiding this comment.
Preserve valid empty-string values in optional choice validation
When Address = "" and NoAddress is unset, this new condition returns a validation error and prevents the command from executing. However, the gcloud documentation explicitly states: “Specifying an empty string will assign an ephemeral IP.” The previous validation accepted this input. The same regression affects the preview variant and GcloudDataprocClustersUpdateOptions.AutoscalingPolicy = "", which is documented as equivalent to disabling autoscaling. Extend the scraper's empty-value recognition for these supported inputs and regenerate the options rather than editing the generated validation directly.
AGENTS.md reference: AGENTS.md:L41-L41
Useful? React with 👍 / 👎.
Confidence Score: 4/5
[High impact] The update changes option validation across many Google Cloud command workflows. The PR appears safe to merge, with a non-blocking cleanup for repeated collection checks. Findings
SummaryThis PR regenerates
Reviews (1) · Last reviewed commit: "chore: Update gcloud CLI options" · Reviewed by Greptile |
| IEnumerable<ValidationResult> IValidatableObject.Validate(ValidationContext validationContext) | ||
| { | ||
| if ((((object?)AddOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)AddOrgs is not string || !string.IsNullOrWhiteSpace(AddOrgs?.ToString()) : ((object?)AddOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)AddOrgs, static item => item is not null) : (AddOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)AddOrgs), static item => item is not null)))) ? 1 : 0) + (ClearOrgs == true ? 1 : 0) + (((object?)RemoveOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)RemoveOrgs is not string || !string.IsNullOrWhiteSpace(RemoveOrgs?.ToString()) : ((object?)RemoveOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)RemoveOrgs, static item => item is not null) : (RemoveOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)RemoveOrgs), static item => item is not null)))) ? 1 : 0) + (((object?)SetOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)SetOrgs is not string || !string.IsNullOrWhiteSpace(SetOrgs?.ToString()) : ((object?)SetOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)SetOrgs, static item => item is not null) : (SetOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)SetOrgs), static item => item is not null)))) ? 1 : 0) > 1) | ||
| if ((((object?)AddOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)AddOrgs is not string || !string.IsNullOrWhiteSpace(AddOrgs?.ToString()) : ((object?)AddOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)AddOrgs, static item => item is not null) : (AddOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)AddOrgs), static item => item is not null)))) ? 1 : 0) + (ClearOrgs == true ? 1 : 0) + (((object?)RemoveOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)RemoveOrgs is not string || !string.IsNullOrWhiteSpace(RemoveOrgs?.ToString()) : ((object?)RemoveOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)RemoveOrgs, static item => item is not null) : (RemoveOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)RemoveOrgs), static item => item is not null)))) ? 1 : 0) + (((object?)SetOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)SetOrgs is not string || !string.IsNullOrWhiteSpace(SetOrgs?.ToString()) : ((object?)SetOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)SetOrgs, static item => item is not null) : (SetOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)SetOrgs), static item => item is not null)))) ? 1 : 0) > 1 || ((((object?)AddOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)AddOrgs is not string || !string.IsNullOrWhiteSpace(AddOrgs?.ToString()) : ((object?)AddOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)AddOrgs, static item => item is not null) : (AddOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)AddOrgs), static item => item is not null)))) || ClearOrgs == true || ((object?)RemoveOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)RemoveOrgs is not string || !string.IsNullOrWhiteSpace(RemoveOrgs?.ToString()) : ((object?)RemoveOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)RemoveOrgs, static item => item is not null) : (RemoveOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)RemoveOrgs), static item => item is not null)))) || ((object?)SetOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)SetOrgs is not string || !string.IsNullOrWhiteSpace(SetOrgs?.ToString()) : ((object?)SetOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)SetOrgs, static item => item is not null) : (SetOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)SetOrgs), static item => item is not null))))) && !(((object?)AddOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)AddOrgs is not string || !string.IsNullOrWhiteSpace(AddOrgs?.ToString()) : ((object?)AddOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)AddOrgs, static item => item is not null) : (AddOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)AddOrgs), static item => item is not null)))) || ClearOrgs == true || ((object?)RemoveOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)RemoveOrgs is not string || !string.IsNullOrWhiteSpace(RemoveOrgs?.ToString()) : ((object?)RemoveOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)RemoveOrgs, static item => item is not null) : (RemoveOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)RemoveOrgs), static item => item is not null)))) || ((object?)SetOrgs is global::System.Collections.Generic.IEnumerable<char> ? (object?)SetOrgs is not string || !string.IsNullOrWhiteSpace(SetOrgs?.ToString()) : ((object?)SetOrgs is global::System.Collections.Generic.IEnumerable<KeyValue> ? global::System.Linq.Enumerable.Any((global::System.Collections.Generic.IEnumerable<KeyValue>)(object)SetOrgs, static item => item is not null) : (SetOrgs is not null && global::System.Linq.Enumerable.Any(global::System.Linq.Enumerable.Cast<object>((global::System.Collections.IEnumerable)(object)SetOrgs), static item => item is not null))))))) |
There was a problem hiding this comment.
The added clause repeats the same collection tests on both sides of && !, so it cannot reject anything for stable values. It still calls Any again when the earlier count passes. Skip this clause in the generator when rendered presence and meaningful presence are identical. That avoids needless collection scans and makes the generated conditions easier to read.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Claude Review
This is an auto-generated gcloud options update for SDK 589.0.0. It changes the generated validation conditions for optional choice groups. The new clause treats empty or whitespace strings as "not meaningfully present", so it rejects values that gcloud documents as valid. I confirmed this in pr-head for GcloudDataprocClustersUpdateOptions. I did not read the whole 19.6MB diff. I checked the sampled Dataproc file, the Codex and Greptile findings, and the PR description.
Review evidence
src/ModularPipelines.Google/Options/GcloudDataprocClustersUpdateOptions.Generated.cs: Inspected the generated validation at line 244 in pr-head. The new !string.IsNullOrWhiteSpace(AutoscalingPolicy) clause rejects an empty AutoscalingPolicy, which gcloud documents as valid (it disables autoscaling). This confirms the Codex P2 regression.
The generated validation in src/ModularPipelines.Google/Options/GcloudDataprocClustersUpdateOptions.Generated.cs:244 now adds (AutoscalingPolicy is not null || DisableAutoscaling == true) && !(!string.IsNullOrWhiteSpace(AutoscalingPolicy) || DisableAutoscaling == true). It fails validation for AutoscalingPolicy = "", which gcloud documents as disabling autoscaling. The same regression affects the Compute instances network-interfaces add options (Address = "" means an ephemeral IP) and their preview variants. Fix the generator in tools/ModularPipelines.OptionsGenerator, not the generated files. Either have the scraper recognise "empty string" semantics in option descriptions and exempt those options from the whitespace check, or stop applying the meaningful-presence clause to plain string options in at-most-one groups. Regenerate afterwards. The existing presence check (is not null) already handled these inputs correctly.
The generator also emits the meaningful-presence clause for collection options where rendered presence and meaningful presence are identical. The clause repeats the same Count/Any tests on both sides of && !, so it can never reject anything and only adds work and noise. Have the generator skip the clause when the two predicates are identical, which also makes the generated conditions easier to read.
Optional follow-up notes
Ignore the command coverage output. Baseline and new command counts match (8055), and the removed commands are documented as removed upstream or absent in SDK 589.0.0.
AGENTS.md says to regenerate rather than patch this PR. Raise or reuse a generator issue and close this PR in favour of a fresh regeneration.
Summary
This PR contains automatically generated updates to gcloud CLI options classes.
The generator scraped the latest CLI help output from the installed tool.
Changes
Command coverage
Command coverage report:
Verification
Auto-merge arms once Claude and Codex clear this head and an owner or collaborator posts
<!-- generated-options-conversation-clear:<full-head-SHA> -->after dispositioning all conversation findings (see AGENTS.md). GitHub then merges after the required checks pass. A later conversation update requires fresh clearance; a PR with findings is not armed.🤖 Generated with ModularPipelines.OptionsGenerator