Skip to content

[Automated] Update gcloud CLI Options - #4950

Closed
thomhurst wants to merge 1 commit into
issue-4849-gcloud-flag-sectionsfrom
automated/update-cli-options-gcloud-ref-954009699b158d692aefd4da6fb2a955aec8a306f367eb0da95dd623db2e08c9
Closed

thomhurst wants to merge 1 commit into
issue-4849-gcloud-flag-sectionsfrom
automated/update-cli-options-gcloud-ref-954009699b158d692aefd4da6fb2a955aec8a306f367eb0da95dd623db2e08c9

Conversation

@thomhurst

@thomhurst thomhurst commented Sep 14, 2026

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: Assembly/common, Gcloud.

  • Added APIs: 34518
  • Removed or changed APIs: 4300
  • Members with matching names but changed signatures: 4263

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.Enums.GcloudAcceleratorType.NvidiaTeslaA100 = 0 -> ModularPipelines.Google.Enums.GcloudAcceleratorType
  • ModularPipelines.Google.Enums.GcloudAcceleratorType.NvidiaTeslaK80 = 1 -> ModularPipelines.Google.Enums.GcloudAcceleratorType
  • ModularPipelines.Google.Enums.GcloudAcceleratorType.NvidiaTeslaP100 = 2 -> ModularPipelines.Google.Enums.GcloudAcceleratorType
  • ModularPipelines.Google.Enums.GcloudAcceleratorType.NvidiaTeslaP100Vws = 3 -> ModularPipelines.Google.Enums.GcloudAcceleratorType
  • ModularPipelines.Google.Enums.GcloudAcceleratorType.NvidiaTeslaP4 = 4 -> ModularPipelines.Google.Enums.GcloudAcceleratorType

Representative added members:

  • ModularPipelines.Google.Enums.GcloudAcceleratorType.NvidiaA100_80Gb = 0 -> ModularPipelines.Google.Enums.GcloudAcceleratorType
  • ModularPipelines.Google.Enums.GcloudAcceleratorType.NvidiaL4 = 1 -> ModularPipelines.Google.Enums.GcloudAcceleratorType
  • ModularPipelines.Google.Enums.GcloudAcceleratorType.NvidiaTeslaA100 = 2 -> ModularPipelines.Google.Enums.GcloudAcceleratorType
  • ModularPipelines.Google.Enums.GcloudAcceleratorType.NvidiaTeslaT4 = 3 -> ModularPipelines.Google.Enums.GcloudAcceleratorType
  • ModularPipelines.Google.Enums.GcloudAcceleratorType.NvidiaTeslaV100 = 4 -> ModularPipelines.Google.Enums.GcloudAcceleratorType

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
@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-14T10:05:38.973295Z e33dea8 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 (3000 files, 100 file limit).

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

[property: CliOption("--kms-key", Format = OptionFormat.EqualsSeparated)] string KmsKey

P1 Badge Keep optional schedule settings out of the constructor

The generated help for KmsKey explicitly says that omitting it selects Google-managed encryption, but making it a non-null constructor parameter forces every Workbench schedule to emit --kms-key. The same constructor also requires other documented defaults such as start/end times, so valid schedules relying on those defaults cannot be represented; fix the required-group parsing and regenerate these options.

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



P1 Badge Accept the negative form in required flag validation

When a caller sets the generated NoCopySans property to emit the documented --no-copy-sans alternative, this condition still fails because it considers only CopySans == true; command-line validation therefore rejects the explicit negative choice before invoking gcloud. Include both generated switch forms in the alternative group when fixing the generator and regenerating the file.

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


[property: CliOption("--execution-timeout", Format = OptionFormat.EqualsSeparated)] int ExecutionTimeout,

P2 Badge Preserve gcloud duration syntax for execution timeout

The captured help describes --execution-timeout as a duration formatted according to gcloud topic datetimes, which permits values such as 1h that cannot be represented by this int parameter. Consequently callers are restricted to integer values even though the CLI accepts richer duration strings; correct the scraper's type inference and regenerate this option as a string-valued member.

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

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

@github-actions

Copy link
Copy Markdown
Contributor

test line one
test line two

@thomhurst

Copy link
Copy Markdown
Owner Author

Confirmed the three findings against head 83382e9. The generated schedule constructor requires documented optional defaults, the certificate template validation checks only the positive boolean flags, and execution timeout is emitted as int despite its documented duration syntax. This output PR must remain unmerged. The fixes belong in the generator on parent #4863, followed by regeneration; generated options must not be edited manually.

@thomhurst

Copy link
Copy Markdown
Owner Author

The three findings in comment 5659907571 are fixed in generator source 16b9bd9 on parent #4863:

  1. Mandatory configuration headings form separate groups. Only explicitly mandatory members inherit a group requirement; nested optional resource groups and settings remain optional. The Workbench regression retains required region/schedule/execution inputs while omitting optional start/end times, compute settings, and KMS configuration from RequiredOptions.
  2. Required presence validation includes the actual generated negative switch, whether negation comes from --[no-] syntax or help prose. Private CA coverage verifies both CopySans/NoCopySans and CopySubject/NoCopySubject. Compiled regressions accept an explicit negative switch and reject missing, false, or conflicting forms.
  3. Duration documentation on an individual option overrides numeric placeholder inference. ExecutionTimeout remains string-valued for inputs such as 1h. Duration prose inherited from a group does not alter unrelated numeric members.

Five cases reproduced these failures before the fix; a sixth regression covers the parent's nested at-least-one finding. All 61 final parser tests pass, following an earlier 151-test parser/traversal/Markdown pass. The final generator Release build has zero warnings/errors; scoped formatting and all 61 API baseline checks pass. Broader combined validation hit the unchanged 2,048 MB guard at 2,270 MB and is delegated to CI without retry or increased limits.

This output head remains unmerged. Fresh authoritative regeneration is running from the final source at https://github.com/thomhurst/ModularPipelines/actions/runs/34816097702. Its output must replace this snapshot and pass source-provenance, integration, CI, and review gates. No generated options were edited manually.

@thomhurst
thomhurst force-pushed the automated/update-cli-options-gcloud-ref-954009699b158d692aefd4da6fb2a955aec8a306f367eb0da95dd623db2e08c9 branch from 83382e9 to e33dea8 Compare September 14, 2026 10:00
@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: f12a042b-193e-4f83-8a77-eae0b2c6e7de

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 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: e33dea8e58

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

Comment on lines +31 to +34
[property: SecretValue, CliOption("--bitbucket-cloud-config-webhook-secret-version", Format = OptionFormat.EqualsSeparated)] string BitbucketCloudConfigWebhookSecretVersion,
[property: SecretValue, CliOption("--bitbucket-data-center-config-webhook-secret-version", Format = OptionFormat.EqualsSeparated)] string BitbucketDataCenterConfigWebhookSecretVersion,
[property: CliOption("--bitbucket-data-center-config-service-directory", Format = OptionFormat.EqualsSeparated)] string BitbucketDataCenterConfigServiceDirectory,
[property: SecretValue, CliOption("--github-config-authorizer-credential-oauth-token-secret-version", Format = OptionFormat.EqualsSeparated)] string GithubConfigAuthorizerCredentialOauthTokenSecretVersion

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 optionality of alternative provider groups

The checked-in gcloud developer-connect connections create help fixture defines the connection configurations as “At most one” (NestedArgumentGroupParsingTests.cs:1470-1488), but this constructor now makes options from Bitbucket Cloud, Bitbucket Data Center, and GitHub mandatory simultaneously. A caller selecting any single provider must therefore emit mutually incompatible switches, while the generated validation at lines 318-348 additionally requires several Bitbucket-only flags and is invoked before command construction. Preserve the nested group's conditionality in the generator and regenerate these options.

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

Useful? React with 👍 / 👎.

Comment on lines 17 to +20
public enum GcloudAcceleratorType
{
[EnumValue("NVIDIA_TESLA_A100")]
NvidiaTeslaA100,

[EnumValue("NVIDIA_TESLA_K80")]
NvidiaTeslaK80,

[EnumValue("NVIDIA_TESLA_P100")]
NvidiaTeslaP100,

[EnumValue("NVIDIA_TESLA_P100_VWS")]
NvidiaTeslaP100Vws,
[EnumValue("NVIDIA_A100_80GB")]
NvidiaA100_80Gb,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Union accelerator values across every command

GcloudNotebooksRuntimesSwitchOptions.Generated.cs:43-47 still uses this enum while documenting supported values such as NVIDIA_TESLA_K80, NVIDIA_TESLA_P100, NVIDIA_TESLA_P4, TPU_V2, and TPU_V3, but this regeneration removed all of those members and retained only the narrower Colab/Workbench value set. Consumers using those valid notebook accelerator types can no longer represent the CLI input through the typed option, and existing code referencing the removed members stops compiling. Aggregate choices from every command sharing the enum name and regenerate the output.

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

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown
Contributor

Review summary

This PR is a scheduled/dispatched run of the Generate CLI Options workflow for gcloud, targeting the in-flight issue-4849-gcloud-flag-sections branch rather than main (by design — generate-cli-options.yml bases the PR on github.ref_name so "manual feature-branch regeneration" stays on the commit that produced it). Given the diff is ~5,100 files, I verified the change end-to-end using the repo's own provenance tooling and spot-checked generated output rather than reading the raw diff.

Finding: the PR silently bundles a generator-source (logic) change inside what's described as a pure data regeneration

The PR body says "The generator scraped the latest CLI help output from the installed tool" and lists only data-level changes (options classes, types, descriptions, new commands). But comparing base (4f15c7be, tools/.../Scrapers/Cli/GcloudCliScraper.cs) against this PR's head shows the scraper source itself changed — CreateOptions was split out into a new CreateOptionDefinition helper, several Regex.Match/Regex.IsMatch calls were converted to [GeneratedRegex]-backed partial methods, and the constructor's LogInformation call gained an IsEnabled guard. This is corroborated by the repo's own provenance file, src/ModularPipelines.Google/Generated/Gcloud.Generation.json: generatorSourceSha256 is 158d70ee... on the base branch vs e11943cc... on this PR's head, while commandTreeSha256 (the actual gcloud CLI surface fingerprint) is identical in both. In other words, none of this PR's regeneration is attributable to a newer gcloud CLI release — it's entirely attributable to a changed generator/parser.

The refactor itself looks behavior-preserving on inspection (straightforward extract-method + regex pre-compilation + a logging guard), and CLAUDE.md explicitly allows fixing the scraper's generic logic before regenerating. The problem isn't the refactor — it's that:

  • The auto-generated PR description gives no indication that parsing logic changed, only that CLI data changed, so a reviewer (or the auto-merge gate) has no signal to scrutinize the scraper diff more carefully.
  • enable-auto-merge defaults to true for both schedule and workflow_dispatch triggers, and the only automated gate is "solution builds successfully." A subtly incorrect scraper change (e.g. in the enum/required-argument detection logic touched here) would not be caught by a successful build — it would silently reshape thousands of generated option definitions across every gcloud command, and the PR would still read as a routine, safe, auto-mergeable data refresh.

Suggestion: since the workflow already computes generatorSourceSha256 and has it available before the PR is created, add a check (e.g. in Write-PublicApiChangeSummary.ps1 or the PR-body step) that compares it against the previous committed value and, when it differs, both calls this out explicitly in the PR body (e.g. "⚠️ Generator source changed alongside CLI data — review scraper logic") and skips/blocks enable-auto-merge for that run. That turns an easy-to-miss fact buried in a 5,000+ file diff into an explicit signal that routes the PR to human review only when it's actually needed.

Other checks

  • Spot-checked several other generator files (CliScraperBase.cs, CliArgumentGroupParser.cs, CodeGeneratorOrchestrator.cs, OptionsClassGenerator.cs) — unchanged, so the logic change is isolated to GcloudCliScraper.cs.
  • Spot-checked generated output (e.g. GcloudComputeInstancesCreateOptions.Generated.cs) — well-formed, consistent with existing generated-file conventions, no obvious corruption from the scraper change.
  • The large enum renumbering (e.g. GcloudAcceleratorType) and other breaking changes are expected consequences of gcloud's CLI surface changing and are already disclosed in the PR body's API-impact section.

No action needed from the PR author here — this is a process/tooling gap in the automation, not a defect in this specific PR's generated content.

@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