Skip to content

[Automated] Update gcloud CLI Options - #4953

Closed
thomhurst wants to merge 1 commit into
issue-4797-gcloud-list-valuesfrom
automated/update-cli-options-gcloud-ref-d315b0599bf672994c7e67595b1483bf2c0073b37fd13c695b03d88fea22af5e
Closed

thomhurst wants to merge 1 commit into
issue-4797-gcloud-list-valuesfrom
automated/update-cli-options-gcloud-ref-d315b0599bf672994c7e67595b1483bf2c0073b37fd13c695b03d88fea22af5e

Conversation

@thomhurst

Copy link
Copy Markdown
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

Assembly-wide public API impact

Affected API families: Gcloud.

  • Added APIs: 12
  • Removed or changed APIs: 12
  • Members with matching names but changed signatures: 12

Breaking changes are present. Consumers may need to update method arguments, option property types or nullability, enum members, and references to removed APIs.

Representative removed or changed members:

  • ModularPipelines.Google.Options.GcloudAccessApprovalSettingsUpdateOptions.EnrolledServices.get -> string?
  • ModularPipelines.Google.Options.GcloudAccessApprovalSettingsUpdateOptions.NotificationEmails.get -> string?
  • ModularPipelines.Google.Options.GcloudAssetSearchAllIamPoliciesOptions.OrderBy.get -> string?
  • ModularPipelines.Google.Options.GcloudAssetSearchAllResourcesOptions.OrderBy.get -> string?
  • ModularPipelines.Google.Options.GcloudAssetSearchAllResourcesOptions.ReadMask.get -> string?

Representative added members:

  • ModularPipelines.Google.Options.GcloudAccessApprovalSettingsUpdateOptions.EnrolledServices.get -> System.Collections.Generic.IEnumerable<string!>?
  • ModularPipelines.Google.Options.GcloudAccessApprovalSettingsUpdateOptions.NotificationEmails.get -> System.Collections.Generic.IEnumerable<string!>?
  • ModularPipelines.Google.Options.GcloudAssetSearchAllIamPoliciesOptions.OrderBy.get -> System.Collections.Generic.IEnumerable<string!>?
  • ModularPipelines.Google.Options.GcloudAssetSearchAllResourcesOptions.OrderBy.get -> System.Collections.Generic.IEnumerable<string!>?
  • ModularPipelines.Google.Options.GcloudAssetSearchAllResourcesOptions.ReadMask.get -> System.Collections.Generic.IEnumerable<string!>?

Command coverage

Command coverage report:

  • gcloud (Google Cloud SDK 584.0.0 alpha 2026.09.04 beta 2026.09.04 bq 2.1.38 bundled-python3-unix 3.14.7 core 2026.09.04 gcloud-crc32c 1.0.0 gsutil 5.37 preview 2026.09.04): 7927 commands, tree 5fdad8cede50aabd57b55497e772c19fb37aedd8773cfc60a95c7e99d354d594
    • Baseline comparison: 7927 commands at Google Cloud SDK 584.0.0 alpha 2026.09.04 beta 2026.09.04 bq 2.1.38 bundled-python3-unix 3.14.7 core 2026.09.04 gcloud-crc32c 1.0.0 gsutil 5.37 preview 2026.09.04 -> 7927 commands at Google Cloud SDK 584.0.0 alpha 2026.09.04 beta 2026.09.04 bq 2.1.38 bundled-python3-unix 3.14.7 core 2026.09.04 gcloud-crc32c 1.0.0 gsutil 5.37 preview 2026.09.04

Verification

  • Solution builds successfully

🤖 Generated with ModularPipelines.OptionsGenerator

@thomhurst thomhurst added automated dependencies Pull requests that update a dependency file labels Sep 14, 2026
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: dce0631e-8fdf-435a-b7f7-c196ea2342b9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T11:03:17.462213Z ba40d49 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Sep 14, 2026

Copy link
Copy Markdown

Too many files changed for review (1968 files, 100 file limit).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f66715c12f

ℹ️ 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".

/// All resource record sets for this selector, one per resource record type. The name must match the dns_name. This is a repeated argument that can be specified multiple times to specify multiple local data rrsets. (e.g. --local-data=name="zone.com.",type="A",ttl=21600,rrdata="1.2.3.4 " --local-data=name="www.zone.com.",type="CNAME",ttl=21600,rrdata="1.2.3.4|5.6.7.8") name The DnsName of a resource record set. type Type of all resource records in this set. For example, A, AAAA, SOA, MX, NS, TXT ... ttl Number of seconds that this ResourceRecordSet can be cached by resolvers. rrdatas The list of datas for this record, split by "|". Collection entries are joined with commas into one option value. For entries containing commas, supply one pre-escaped list value using gcloud topic escaping (https://cloud.google.com/sdk/gcloud/reference/topic/escaping).
/// </summary>
[CliOption("--local-data", Format = OptionFormat.EqualsSeparated)]
[CliOption("--local-data", Format = OptionFormat.EqualsSeparated, CollectionSeparator = ",")]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve repeated --local-data arguments

When LocalData contains multiple record sets, CollectionSeparator = "," makes CommandArgumentBuilder.AddJoinedOption emit one combined --local-data=...,... argument, but the generated gcloud help immediately above identifies this as a “repeated argument that can be specified multiple times” and demonstrates two separate flags. Because each record set already contains comma-delimited fields such as name, type, ttl, and rrdata, joining the entries loses the record-set boundary and can reject or misapply the DNS update; keep this option repeatable by fixing the generator's list detection and regenerating.

AGENTS.md reference: AGENTS.md:L33-L34

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

The scraper fix is now in parent #4869 at e33a493. Explicit repeated-switch descriptions override list-shaped placeholders; captured SDK 550.0.0 DNS help reproduces this defect, and a generated-attribute regression plus a Google rendering test preserve separate record arguments. All 66 focused generator tests pass. Authoritative regeneration is running at https://github.com/thomhurst/ModularPipelines/actions/runs/34818716389. This generated head remains blocked until replaced; no output was hand-edited.

@github-actions

Copy link
Copy Markdown
Contributor

Review: #4953 — Automated gcloud CLI Options Update

This is a purely mechanical regeneration from ModularPipelines.OptionsGenerator: ~1,969 files touched, all confined to src/ModularPipelines.Google/ (generated option classes, the manifest hash, and PublicAPI.Unshipped.txt). No hand-written logic, generator source, or tests are modified, consistent with the repo rule that generated tool output is authoritative and must not be hand-edited.

Spot checks performed:

  • Verified the string?IEnumerable<string>? conversions (e.g. EnrolledServices, NotificationEmails, OrderBy, ReadMask, ReplicaZones, GroupBy, Regions, CustomSubjectAlternativeNames) are applied consistently, each with the correct CollectionSeparator = "," attribute on the generated property.
  • Investigated an apparent inconsistency in PublicAPI.Unshipped.txt: GcloudSqlInstancesCreateOptions.CustomSubjectAlternativeNames gets a *REMOVED* marker for its old string? signature, while the sibling GcloudSqlInstancesPatchOptions.CustomSubjectAlternativeNames does not. This turned out to be correct, not a bug — the Create variant's old signature was already in PublicAPI.Shipped.txt (a released API, so its removal must be documented), whereas the Patch variant's old signature only ever existed in PublicAPI.Unshipped.txt (never shipped), so the Roslyn PublicAPI analyzer correctly updates that line in place without a removal marker. No action needed.

No actionable issues found. This looks safe to merge as a routine generated-options refresh.

@thomhurst

Copy link
Copy Markdown
Owner Author

Confirmed against f66715c: LocalData is an IEnumerable<string> with CollectionSeparator = ",", despite its help requiring repeated --local-data arguments. This loses record boundaries. Deferring this generated PR until the scraper in parent #4869 is fixed and the options are regenerated; generated files will not be edited manually.

@thomhurst
thomhurst force-pushed the automated/update-cli-options-gcloud-ref-d315b0599bf672994c7e67595b1483bf2c0073b37fd13c695b03d88fea22af5e branch from f66715c to ba40d49 Compare September 14, 2026 10:56
@github-actions

Copy link
Copy Markdown
Contributor

Review

This PR is the automated "Update gcloud CLI options" regeneration. Almost the entire diff (~1968 files) is mechanically-generated *.Generated.cs option files under src/ModularPipelines.Google/Options/ plus src/ModularPipelines.Google/Generated/Gcloud.Generation.json, which per CLAUDE.md is expected and authoritative — those files should not be hand-edited during review.

However, the commit also carries one real source change to the generator itself, and it introduces a regression:

Blocking: dropped null/empty-description guard in AddDelimitedListGuidance

File: tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator/Scrapers/Cli/GcloudCliScraper.cs (~line 372)

The method was converted from a block body to an expression body, and in the process lost its null/whitespace check:

// base (issue-4797-gcloud-list-values)
private static string? AddDelimitedListGuidance(...)
{
    if (!isDelimitedList || isNumeric || enumDefinition is not null)
    {
        return description;
    }

    const string guidance = "Collection entries are joined with commas into one option value. ...";
    return string.IsNullOrWhiteSpace(description) ? guidance : $"{description} {guidance}";
}

// this PR
private static string? AddDelimitedListGuidance(...) =>
    isDelimitedList && !isNumeric && enumDefinition is null
        ? $"{description} Collection entries are joined with commas into one option value. ..."
        : description;

For any delimited-list flag whose scraped help text has no description text (description is null/whitespace), the base version emitted the clean guidance sentence on its own; this version instead interpolates the null/empty description directly, producing a doc comment with a stray leading space ( Collection entries are joined with commas...) instead of a clean sentence. GenerateXmlDocumentation/EscapeXmlComment don't trim this, so it would flow straight into the generated XML doc comment.

This doesn't reproduce against the current gcloud snapshot (no generated file currently hits the null-description branch), and GcloudDelimitedListTests.cs only exercises cases with non-empty descriptions, so CI won't catch it — but it's a real latent bug waiting on the first delimited-list flag with an empty description in a future gcloud release.

Suggested fix: keep the null-guard when doing the interpolation, e.g. build the guidance string as its own local/const and reuse the base's string.IsNullOrWhiteSpace(description) ? guidance : $"{description} {guidance}" ternary, or add an explicit description case to Gcloud_Distinguishes_Delimited_Lists_From_Repeated_Options so a regression here fails the build.

Everything else in the diff is the expected generated-output churn from the scraper/generator run and doesn't need hand review per the repo's generated-code policy.

@thomhurst thomhurst closed this Sep 14, 2026
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