Skip to content

[Automated] Update gcloud CLI Options#2451

Open
thomhurst wants to merge 1 commit intomainfrom
automated/update-cli-options-gcloud
Open

[Automated] Update gcloud CLI Options#2451
thomhurst wants to merge 1 commit intomainfrom
automated/update-cli-options-gcloud

Conversation

@thomhurst
Copy link
Owner

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

  • Updated options classes to reflect latest CLI documentation
  • Added new commands if any were detected
  • Updated option types and descriptions

Verification

  • Solution builds successfully

🤖 Generated with ModularPipelines.OptionsGenerator

@thomhurst thomhurst added automated dependencies Pull requests that update a dependency file labels Mar 8, 2026
@thomhurst thomhurst enabled auto-merge (squash) March 8, 2026 03:39
Copy link

@claude claude 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: [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:

  1. Order changed — alphabetical → calendar week order (Sun, Mon, Tue…)
  2. 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/list

The 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 GcloudPrivatecaOperations service and options classes follow the established pattern correctly.
  • New GcloudNetworksecuritySecurityProfiles methods (Delete, Describe, Export, Import, List) are consistent with the rest of the service class pattern.
  • DisableMultiNicLustre and ConsolidationDelay additions 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.

Copy link

@claude claude 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: [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:

  1. Order changed — alphabetical to calendar week order (Sun, Mon, Tue...)
  2. 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 GcloudPrivatecaOperations service and options classes follow the established pattern correctly.
  • New GcloudNetworksecuritySecurityProfiles methods (Delete, Describe, Export, Import, List) are consistent with the rest of the service class pattern.
  • DisableMultiNicLustre and ConsolidationDelay additions 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.

@thomhurst thomhurst force-pushed the automated/update-cli-options-gcloud branch from 702686c to bdad853 Compare March 15, 2026 03:44
Copy link

@claude claude 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: [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 Search

This 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 GcloudVectorsearchOperations

The 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.cs

This 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.SystemTrustDomain and GcloudScimUsage.EnabledForUsersGroups are correctly structured.
  • GcloudAccessContextManagerSupportedPermissions options (list/describe) follow the established record pattern correctly.
  • GcloudComputeReservationsUpdateOptions.EarlyAccessMaintenance is a clean addition.
  • almalinux-cloud addition to GcloudComputeImagesListOptions.StandardImages description 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.

@thomhurst thomhurst force-pushed the automated/update-cli-options-gcloud branch from bdad853 to eb08433 Compare March 22, 2026 03:44
Copy link

@claude claude 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: 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-key in GcloudSqlInstancesPointInTimeRestoreOptions
  • 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: DestinationNetwork and DestinationProject removed
  • GcloudComputeProjectInfo: SetUsageBucket() method removed
  • GcloudIamWorkforcePoolsProvidersScimTenantsTokens: Undelete() method removed
  • GcloudIamWorkloadIdentityPoolsCreateOptions: InlineCertificateIssuanceConfigFile property 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant