Conversation
There was a problem hiding this comment.
Code Review: [Automated] Update gcloud CLI Options
This is auto-generated code from the OptionsGenerator scraping the latest gcloud CLI help output, so no manual edits apply here. The review focuses on the correctness and implications of the generated output.
Summary of Changes
| Category | Details |
|---|---|
| Timestamp update | AssemblyInfo.Generated.cs — expected |
| Enum update | GcloudUpdateRedisConfig — order + casing changed |
| Doc comment fixes | Several options files — improved descriptions |
| New options | DisableMultiNicLustre, ConsolidationDelay |
| New commands/services | GcloudNetworksecuritySecurityProfiles, GcloudPrivatecaOperations |
| Removed method | SetUsageBucket from GcloudComputeProjectInfo |
| Source URL fix | GcloudNetworkSecuritySecurityProfilesListOptions — was pointing to wrong source |
Notable Concern: GcloudUpdateRedisConfig Enum — Potential Breaking Change
File: src/ModularPipelines.Google/Enums/GcloudUpdateRedisConfig.Generated.cs
Two things changed simultaneously:
- Order changed — alphabetical → calendar week order (Sun, Mon, Tue…)
- Case changed — lowercase descriptions (
"friday") → UPPERCASE ("FRIDAY")
The case change in [Description] is the important runtime concern. These values are what gets passed to the gcloud CLI. If the gcloud Redis API changed from accepting lowercase day names to uppercase, this is correct and necessary. But it does mean any code that hardcodes the enum integer value (e.g., (int)GcloudUpdateRedisConfig.Friday was previously 0, now it's 5) would silently break.
Since the description attribute drives the actual CLI argument value, the case change is the more impactful part and appears to reflect a real upstream gcloud CLI change — the generator scraped it, so it should be correct.
Suggestion for the generator (not this PR): Consider assigning explicit integer values to generated enums to protect against re-ordering:
public enum GcloudUpdateRedisConfig
{
[Description("SUNDAY")] Sunday = 0,
[Description("MONDAY")] Monday = 1,
// ...
}This would be a resilience improvement worth considering in tools/ModularPipelines.OptionsGenerator/.
Notable Change: SetUsageBucket Removed
File: src/ModularPipelines.Google/Services/GcloudComputeProjectInfo.Generated.cs
The SetUsageBucket method and its corresponding options class have been removed. This is a breaking API change — any consumer code calling GcloudComputeProjectInfo.SetUsageBucket(...) will fail to compile after this update. This appears to reflect the gcloud CLI removing this command, but worth flagging so a CHANGELOG note or major version bump is considered.
Source URL Bug Fix
File: src/ModularPipelines.Google/Options/GcloudNetworkSecuritySecurityProfilesListOptions.Generated.cs
-// Source: https://cloud.google.com/sdk/gcloud/reference/compute/project-info/set-usage-bucket
+// Source: https://cloud.google.com/sdk/gcloud/reference/network-security/security-profiles/listThe file previously had completely wrong source metadata and class definition — it was using GcloudComputeProjectInfoSetUsageBucketOptions rather than GcloudNetworkSecuritySecurityProfilesListOptions. This is now correctly fixed.
Doc Comment Issue: Embedded Shell Command
File: src/ModularPipelines.Google/Options/GcloudContainerNodePoolsCreateOptions.Generated.cs
The ConsolidationDelay property's XML doc comment contains an embedded shell command example:
/// Set the duration after which the Cluster Autoscaler can scale down underutilized nodes. $ gcloud container node-pools create node-pool-1 \ --cluster=example-cluster --consolidation-delay=3600s
This is technically valid XML but noisy in IDE tooltips. The generator could consider stripping or formatting shell example blocks differently (e.g., into <example> or <code> XML tags). Not a functional issue, but worth a generator improvement.
Everything Else Looks Good
- New
GcloudPrivatecaOperationsservice and options classes follow the established pattern correctly. - New
GcloudNetworksecuritySecurityProfilesmethods (Delete,Describe,Export,Import,List) are consistent with the rest of the service class pattern. DisableMultiNicLustreandConsolidationDelayadditions follow the correct attribute/type patterns.- Description text fixes are improvements (e.g., spacing corrections, clearer wording for
ModelServerVersion,ServingStackVersion).
Overall: the generated output correctly reflects upstream gcloud CLI changes. The main items to be aware of are the GcloudUpdateRedisConfig casing change and the removal of SetUsageBucket as potential breaking changes for consumers.
There was a problem hiding this comment.
Code Review: [Automated] Update gcloud CLI Options
This is auto-generated code from the OptionsGenerator scraping the latest gcloud CLI help output, so no manual edits apply here. The review focuses on the correctness and implications of the generated output.
Summary of Changes
| Category | Details |
|---|---|
| Timestamp update | AssemblyInfo.Generated.cs — expected |
| Enum update | GcloudUpdateRedisConfig — order + casing changed |
| Doc comment fixes | Several options files — improved descriptions |
| New options | DisableMultiNicLustre, ConsolidationDelay |
| New commands/services | GcloudNetworksecuritySecurityProfiles, GcloudPrivatecaOperations |
| Removed method | SetUsageBucket from GcloudComputeProjectInfo |
| Source URL fix | GcloudNetworkSecuritySecurityProfilesListOptions was pointing to wrong source |
Notable Concern: GcloudUpdateRedisConfig Enum — Potential Breaking Change
File: src/ModularPipelines.Google/Enums/GcloudUpdateRedisConfig.Generated.cs
Two things changed simultaneously:
- Order changed — alphabetical to calendar week order (Sun, Mon, Tue...)
- Case changed — lowercase descriptions (
"friday") to UPPERCASE ("FRIDAY")
The case change in [Description] is the important runtime concern since these values are what gets passed to the gcloud CLI. If the gcloud Redis API changed from accepting lowercase day names to uppercase, this is correct and necessary. However, any code relying on enum integer values (e.g., (int)GcloudUpdateRedisConfig.Friday was previously 0, now it's 5) would silently break.
Suggestion for the generator (future improvement in tools/ModularPipelines.OptionsGenerator/): Assign explicit integer values to generated enums to guard against re-ordering:
public enum GcloudUpdateRedisConfig
{
[Description("SUNDAY")] Sunday = 0,
[Description("MONDAY")] Monday = 1,
// ...
}Notable Change: SetUsageBucket Removed
File: src/ModularPipelines.Google/Services/GcloudComputeProjectInfo.Generated.cs
The SetUsageBucket method and its corresponding options class have been removed. This is a breaking API change — any consumer code calling GcloudComputeProjectInfo.SetUsageBucket(...) will fail to compile after this update. This appears to reflect the gcloud CLI removing this command, but worth flagging for a CHANGELOG note or major version bump consideration.
Source URL Bug Fix
File: src/ModularPipelines.Google/Options/GcloudNetworkSecuritySecurityProfilesListOptions.Generated.cs
The file previously had completely wrong source metadata and class definition (was GcloudComputeProjectInfoSetUsageBucketOptions pointing to the compute/project-info source). Now correctly fixed to GcloudNetworkSecuritySecurityProfilesListOptions pointing to network-security/security-profiles/list. Good catch.
Minor: Embedded Shell Command in Doc Comment
File: src/ModularPipelines.Google/Options/GcloudContainerNodePoolsCreateOptions.Generated.cs
The ConsolidationDelay property XML doc comment contains an embedded shell command example inline in the description text. Not a functional issue, but a generator improvement opportunity: consider stripping or formatting shell example blocks into <code> or <example> XML tags for cleaner IDE tooltips.
Everything Else Looks Good
- New
GcloudPrivatecaOperationsservice and options classes follow the established pattern correctly. - New
GcloudNetworksecuritySecurityProfilesmethods (Delete, Describe, Export, Import, List) are consistent with the rest of the service class pattern. DisableMultiNicLustreandConsolidationDelayadditions follow the correct attribute/type patterns.- Description text fixes are clear improvements (spacing corrections, clearer wording for ModelServerVersion, ServingStackVersion).
Overall the generated output correctly reflects upstream gcloud CLI changes. The main items to be aware of are the GcloudUpdateRedisConfig casing/ordering change and the removal of SetUsageBucket as potential breaking changes for consumers.
702686c to
bdad853
Compare
There was a problem hiding this comment.
Code Review: [Automated] Update gcloud CLI Options (Updated PR)
This is a follow-up review of the updated PR. Two prior reviews from 2026-03-08 covered the earlier commit — this review focuses on the new changes in the latest commit.
Previous Review Points — Status
The concerns raised previously (GcloudUpdateRedisConfig casing/ordering, SetUsageBucket removal, generic XML doc comments with embedded shell commands) are all generator-level issues and remain present. No action expected on this PR for those.
New in This Commit: GcloudVectorsearch Service (~2000 lines added)
The bulk of this update is a new vectorsearch service with collections, data-objects, indexes, and operations sub-commands. The structure follows established patterns correctly. However, there is a naming inconsistency between the service class and its options classes:
Service class (registration + interface):
services.TryAddScoped<GcloudVectorsearch>(); // lowercase 's' in search
GcloudVectorsearch Vectorsearch { get; }Options classes:
public record GcloudVectorSearchCollectionsCreateOptions // capital 'S' in Search
public record GcloudVectorSearchOperationsCancelOptions // capital 'S' in SearchThis means the service is GcloudVectorsearch but the options it uses are GcloudVectorSearch*. While this doesn't break runtime behavior, it is inconsistent and confusing — a generator fix would be the right place to address this.
GcloudVectorsearchOperations — Generic Class Summary
/// <summary>
/// gcloud operations commands.
/// </summary>
[GeneratedCode("ModularPipelines.OptionsGenerator", "")]
public class GcloudVectorsearchOperationsThe summary "gcloud operations commands." is the generic fallback description and doesn't identify this as the vector search operations sub-service. Compare to GcloudVectorsearchCollectionsIndexes which correctly says "gcloud vectorsearch collections indexes commands." The generator appears to be missing the context for the operations sub-group specifically.
Breaking API Change: GcloudIamWorkforcePoolsProvidersScimTenantsTokensUndeleteOptions Removed
rename from src/.../GcloudIamWorkforcePoolsProvidersScimTenantsTokensUndeleteOptions.Generated.cs
rename to src/.../GcloudAccessContextManagerSupportedPermissionsListOptions.Generated.csThis is a git rename, but the class inside is completely different (different name, different CLI sub-command, different purpose). Any consumer code referencing GcloudIamWorkforcePoolsProvidersScimTenantsTokensUndeleteOptions will fail to compile. This appears to reflect gcloud removing the iam workforce-pools providers scim-tenants tokens undelete command — worth noting in release notes if that command existed in a public release.
Everything Else Looks Good
- New enum values
GcloudMode.SystemTrustDomainandGcloudScimUsage.EnabledForUsersGroupsare correctly structured. GcloudAccessContextManagerSupportedPermissionsoptions (list/describe) follow the established record pattern correctly.GcloudComputeReservationsUpdateOptions.EarlyAccessMaintenanceis a clean addition.almalinux-cloudaddition toGcloudComputeImagesListOptions.StandardImagesdescription reflects upstream changes.- Description text fixes across container AI profiles options are improvements.
Overall: the new vectorsearch surface is large but structurally sound. The naming inconsistency (GcloudVectorsearch vs GcloudVectorSearch) is the only issue worth fixing in the generator.
bdad853 to
eb08433
Compare
There was a problem hiding this comment.
Code Review: Automated gcloud CLI Options Update
This is an auto-generated PR from ModularPipelines.OptionsGenerator, so the review focuses on correctness of generation and potential issues that warrant attention.
Good
The generator correctly:
- Marks all files with
[GeneratedCode]and[ExcludeFromCodeCoverage] - Applies
[SecretValue]to--active-directory-secret-manager-keyinGcloudSqlInstancesPointInTimeRestoreOptions - Adds summaries and
[CliOption]/[CliFlag]attributes consistently - Follows the existing record/options pattern throughout
Issue: Inconsistent Enum vs String for ZonalAffinitySpilloverRatio
In GcloudComputeBackendServicesCreateOptions.Generated.cs, the new --zonal-affinity-spillover-ratio property is typed as string?:
[CliOption("--zonal-affinity-spillover-ratio", Format = OptionFormat.EqualsSeparated)]
public string? ZonalAffinitySpilloverRatio { get; set; }However, this PR also adds a GcloudZonalAffinitySpilloverRatio enum (with values Prepare, TestByPercentage, TestAllTraffic). The property should use the strongly-typed enum instead of string?, which is the consistent pattern used everywhere else in the codebase (e.g. TrackingMode uses GcloudTrackingMode?, StorageType uses GcloudStorageType?, etc.).
This appears to be a generator bug where the enum was created but not linked to its corresponding property. The same pattern issue may affect --zonal-affinity-spillover in the same file, which is also typed as string? (though no dedicated enum was generated for it — its values are inline in the docstring, so an enum may be warranted there too).
Why it matters: Using string? bypasses compile-time safety and IDE discoverability — users can pass invalid values without any indication. Strongly-typed enums are the whole value proposition of this generator.
Breaking Changes (expected, but worth flagging)
These removals reflect upstream gcloud CLI changes and are correct to generate, but they are breaking changes for consumers:
GcloudSqlInstancesCloneOptions:DestinationNetworkandDestinationProjectremovedGcloudComputeProjectInfo:SetUsageBucket()method removedGcloudIamWorkforcePoolsProvidersScimTenantsTokens:Undelete()method removedGcloudIamWorkloadIdentityPoolsCreateOptions:InlineCertificateIssuanceConfigFileproperty removed (the CLI merged it into a mutual-exclusion group under--mode)
These are faithfully reflecting upstream CLI changes. If the project follows semver, these should warrant a minor/major version bump rather than a patch.
Summary
The main actionable issue is the generator bug causing ZonalAffinitySpilloverRatio to be typed as string? instead of the GcloudZonalAffinitySpilloverRatio enum that was created in the same PR. Everything else looks correct for an automated update.
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
Verification
🤖 Generated with ModularPipelines.OptionsGenerator