Skip to content

[Automated] Update kubectl CLI Options - #4694

Open
thomhurst wants to merge 1 commit into
mainfrom
automated/update-cli-options-kubectl
Open

[Automated] Update kubectl CLI Options#4694
thomhurst wants to merge 1 commit into
mainfrom
automated/update-cli-options-kubectl

Conversation

@thomhurst

@thomhurst thomhurst commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

This PR contains automatically generated updates to kubectl 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: Kubernetes (kubectl).

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

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.Kubernetes.Enums.KubernetesAnnotateDryRun.Client = 2 -> ModularPipelines.Kubernetes.Enums.KubernetesAnnotateDryRun
  • ModularPipelines.Kubernetes.Enums.KubernetesAnnotateDryRun.None = 0 -> ModularPipelines.Kubernetes.Enums.KubernetesAnnotateDryRun
  • ModularPipelines.Kubernetes.Enums.KubernetesAnnotateDryRun.Server = 1 -> ModularPipelines.Kubernetes.Enums.KubernetesAnnotateDryRun
  • ModularPipelines.Kubernetes.Enums.KubernetesAnnotateOutput.GoTemplate = 4 -> ModularPipelines.Kubernetes.Enums.KubernetesAnnotateOutput
  • ModularPipelines.Kubernetes.Enums.KubernetesAnnotateOutput.GoTemplateFile = 5 -> ModularPipelines.Kubernetes.Enums.KubernetesAnnotateOutput

Representative added members:

  • ModularPipelines.Kubernetes.Enums.KubernetesAnnotateDryRun.Client = 0 -> ModularPipelines.Kubernetes.Enums.KubernetesAnnotateDryRun
  • ModularPipelines.Kubernetes.Enums.KubernetesAnnotateDryRun.None = 1 -> ModularPipelines.Kubernetes.Enums.KubernetesAnnotateDryRun
  • ModularPipelines.Kubernetes.Enums.KubernetesAnnotateDryRun.Server = 2 -> ModularPipelines.Kubernetes.Enums.KubernetesAnnotateDryRun
  • ModularPipelines.Kubernetes.Enums.KubernetesAnnotateOutput.GoTemplate = 0 -> ModularPipelines.Kubernetes.Enums.KubernetesAnnotateOutput
  • ModularPipelines.Kubernetes.Enums.KubernetesAnnotateOutput.GoTemplateFile = 1 -> ModularPipelines.Kubernetes.Enums.KubernetesAnnotateOutput

Command coverage

Command coverage report:

  • kubectl (Client Version: v1.37.0 Kustomize Version: v5.8.1): 60 commands, tree f55995efa5e41dde54572bc81e38f46e1d9f6e4fe288f44810cfd81e5d642f48
    • Baseline comparison: 60 commands at Client Version: v1.37.0 Kustomize Version: v5.8.1 -> 60 commands at Client Version: v1.37.0 Kustomize Version: v5.8.1

Verification

  • Solution builds successfully

🤖 Generated with ModularPipelines.OptionsGenerator

@thomhurst thomhurst added automated dependencies Pull requests that update a dependency file labels Sep 6, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 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-07T15:53:31.512387Z 2c38b93 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.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • src/ModularPipelines.Kubernetes/Generated/Kubernetes.Generation.json is excluded by !**/generated/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 34954088-8927-402f-8987-d5077e8b5637

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 1b08727b-9227-4af3-8bdc-316bce698d4c

📥 Commits

Reviewing files that changed from the base of the PR and between fe707c5 and 506c665.

⛔ Files ignored due to path filters (44)
  • src/ModularPipelines.Kubernetes/Enums/KubernetesAnnotateDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesAnnotateOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesApplyCascade.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesApplyDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesApplyEditLastAppliedOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesApplyOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesApplySetLastAppliedDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesApplySetLastAppliedOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesApplyViewLastAppliedOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesAuthReconcileDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesAuthReconcileOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesAuthWhoamiOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesAutoscaleDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesAutoscaleOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesCertificateApproveOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesCertificateDenyOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesClusterInfoDumpOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesConfigViewOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesCordonDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesDrainDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesEventsOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesKubercSetPolicy.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesKubercViewOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesLabelDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesLabelOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesPatchDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesPatchOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesReplaceCascade.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesReplaceDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesReplaceOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesRolloutHistoryOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesRolloutPauseOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesRolloutRestartOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesRolloutResumeOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesRolloutUndoDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesRolloutUndoOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesScaleDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesScaleOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesTaintDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesTaintOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesUncordonDryRun.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Enums/KubernetesWaitOutput.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Kubernetes/Generated/Kubernetes.Generation.json is excluded by !**/generated/**
  • src/ModularPipelines.Kubernetes/Options/KubernetesProxyOptions.Generated.cs is excluded by !**/*.generated.*
📒 Files selected for processing (2)
  • src/ModularPipelines.Kubernetes/PublicAPI.Shipped.txt
  • src/ModularPipelines.Kubernetes/PublicAPI.Unshipped.txt
💤 Files with no reviewable changes (1)
  • src/ModularPipelines.Kubernetes/PublicAPI.Shipped.txt

Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Kubernetes public API tracking files update enum member removal records, restore output enum declarations with sequential values, normalize dry-run and cascade values, and rename KubernetesKubercSetPolicy members.

Changes

Kubernetes API tracking

Layer / File(s) Summary
Record retired enum members
src/ModularPipelines.Kubernetes/PublicAPI.Shipped.txt, src/ModularPipelines.Kubernetes/PublicAPI.Unshipped.txt
The shipped API file removes tracked enum members. The unshipped API file records the previous members as removed.
Re-register output enum members
src/ModularPipelines.Kubernetes/PublicAPI.Unshipped.txt
Output enum members are re-added with sequential values from 0 through 10. KubernetesApplyViewLastAppliedOutput uses Json = 0 and Yaml = 1.
Normalize option and policy enum values
src/ModularPipelines.Kubernetes/PublicAPI.Unshipped.txt
Dry-run and cascade enum values are reordered. KubernetesKubercSetPolicy uses AllowAll, Allowlist, and DenyAll.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 506c6

This updates Kubernetes CLI option APIs and enum tracking for newer kubectl and Kustomize help output. The documented API changes are intentional, with no current merge-readiness risk identified.

Poem

A rabbit checks the enum trail
New numbers hop in tidy mail
Old names rest in records deep
Dry-run values count their sheep
API pages fold their ears
Kubernetes hops through years

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: an automated update of kubectl CLI options, including commands, option types, descriptions, and enum members.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch automated/update-cli-options-kubectl

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.

@thomhurst
thomhurst force-pushed the automated/update-cli-options-kubectl branch from 6c0e02d to 506c665 Compare September 6, 2026 07:25
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Code Review

Reviewed the regenerated Kubernetes options in this PR (this appears to be an automated "update generated CLI options" refresh, similar to #4689).

Finding

src/ModularPipelines.Kubernetes/Options/KubernetesProxyOptions.Generated.cs:24 — The regenerated XML doc comment for AcceptHosts is malformed:

 /// <summary>
-/// :1\]$':
+/// :1\]$': Regular expression for hosts that the proxy should accept.
 /// </summary>
 [CliOption("--accept-hosts", Format = OptionFormat.EqualsSeparated)]
 public string? AcceptHosts { get; set; }

The scraper is failing to strip the tail of the --accept-hosts default value (^localhost$,^127\.0\.0\.1$,^[::1]$':) before concatenating the real description. The sibling property AcceptPaths gets a clean doc (Regular expression for paths that the proxy should accept.), but AcceptHosts ships with a garbled fragment (:1\]$': ...) as part of its public XML doc/IntelliSense tooltip.

This bug pre-dates this PR (the doc was already truncated to just :1\]$': before this change), but this regeneration is the first time it's been touched without being fixed, so it's still worth flagging per the repo's own guidance: generated-options problems should be fixed in the scraper/generator (likely wherever KubectlDocumentationScraper parses the "Default" column / usage text for options whose default value contains a regex ending in a character class like [::1]), not patched by hand in the generated file, since the next regeneration would just reproduce the same garbled text for any kubectl option with a similarly-shaped default value.

Everything else

The rest of the diff is standard regenerated output (enums, options, PublicAPI.Shipped.txt, generator source hash) consistent with a routine CLI-options refresh — no other issues found.

@thomhurst
thomhurst force-pushed the automated/update-cli-options-kubectl branch from 506c665 to 3a9bd93 Compare September 6, 2026 08:37
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Code Review

This is another automated kubectl CLI-options refresh (same shape as #4689, #4694's own prior push). Scope is entirely [ExcludeFromCodeCoverage]/Generated files plus the PublicAPI.*.txt tracking files — no hand-written code, and per CLAUDE.md policy, ordinal/API breaks from regeneration are expected and not something to push back on here.

Previously-flagged issue: still unresolved

A prior review on this PR (posted against commit 506c665) flagged a malformed XML doc comment:

src/ModularPipelines.Kubernetes/Options/KubernetesProxyOptions.Generated.cs:24

/// <summary>
/// :1\]$': Regular expression for hosts that the proxy should accept.
/// </summary>
[CliOption("--accept-hosts", Format = OptionFormat.EqualsSeparated)]
public string? AcceptHosts { get; set; }

This is still present, unchanged, at the current head (3a9bd93). Since the PR has been rebuilt since that comment, I traced the actual root cause rather than re-guessing at it: it's the KubectlOptionPattern regex in tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator/Scrapers/Cli/CobraCliScraper.cs:989:

[GeneratedRegex(@"^\s*(?:(?<short>-\w),\s*)?(?<long>--[\w-]+)(?:(?<default>=)(?<type>[^:\s]*))?:\s*(?<desc>.*)?$", RegexOptions.Multiline)]
private static partial Regex KubectlOptionPattern();

The type group ([^:\s]*) stops at the first colon in the default value. kubectl's real default for --accept-hosts is:

--accept-hosts='^localhost$,^127\.0\.0\.1$,^\[::1\]$':

The embedded ::1 (IPv6 loopback) contains a colon, so type only captures up to ^\[, the regex then greedily consumes the first colon of ::1 as its terminating :, and everything after (:1\]$':) gets swallowed into desc — which is why it ends up prepended to the real description text after AccumulateWrappedDescription appends the next line.

This isn't unique to kubectl's --accept-hosts — any Cobra/kubectl flag whose default value contains a colon (time ranges, ratios, IPv6 literals, key:value defaults, etc.) will hit the same truncation and produce a garbled doc comment. A more robust fix would stop assuming the default value is colon-free, e.g. match the default as a quoted token when quoted ((?<type>'[^']*'|\S+?)) or anchor desc to the last : on the line before the following whitespace-indented continuation, rather than the first. That way this whole class of default values self-heals instead of needing a one-off carve-out for accept-hosts.

Per repo convention this must be fixed in the scraper (CobraCliScraper.cs), not by hand-patching the generated file — and since this PR is just a re-run of the existing generator, it will keep reproducing this same garbled doc every time kubectl's --accept-hosts (or any similarly-shaped flag) gets rescraped until that regex is fixed. Worth adding a regression case to CobraCliScraperTests.cs / KubectlCliScraperTests.cs with a default value containing an embedded colon so this doesn't silently reappear again.

Everything else

The enum reordering (e.g. KubernetesAnnotateDryRun, KubernetesAnnotateOutput) is a byproduct of the generator source change (generatorSourceSha256 changed) reordering enum members alphabetically rather than preserving kubectl's declared flag order — the underlying commandTreeSha256 is unchanged, so this isn't from a kubectl version bump. That produces the large "314 added/314 removed" API diff, but per CLAUDE.md this is accepted policy for regenerated output, so not blocking.

PublicAPI.Shipped.txt/Unshipped.txt changes are consistent with the enum/property changes, and Kubernetes.Generation.json's hash bump matches the generator source change. No other issues found.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Code Review

Another automated kubectl CLI-options refresh (same shape as the prior pushes to this PR, and #4689). Scope is entirely [ExcludeFromCodeCoverage]/Generated files plus the PublicAPI.*.txt tracking files — no hand-written logic changed, and per CLAUDE.md policy, breaking API/ordinal changes from regeneration are expected here and not something to push back on.

Previously-flagged issue: still unresolved

Two earlier reviews on this PR (at commits 506c665 and 3a9bd93) flagged a malformed XML doc comment, and it is still present unchanged at the current head (834fbae):

src/ModularPipelines.Kubernetes/Options/KubernetesProxyOptions.Generated.cs:24

/// <summary>
/// :1\]$': Regular expression for hosts that the proxy should accept.
/// </summary>
[CliOption("--accept-hosts", Format = OptionFormat.EqualsSeparated)]
public string? AcceptHosts { get; set; }

Root cause (confirmed again against the current scraper source, which is untouched by this PR): KubectlOptionPattern in tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator/Scrapers/Cli/CobraCliScraper.cs:990

[GeneratedRegex(@"^\s*(?:(?<short>-\w),\s*)?(?<long>--[\w-]+)(?:(?<default>=)(?<type>[^:\s]*))?:\s*(?<desc>.*)?$", RegexOptions.Multiline)]
private static partial Regex KubectlOptionPattern();

type ([^:\s]*) stops at the first colon in the default value. kubectl's real default for --accept-hosts is:

--accept-hosts='^localhost$,^127\.0\.0\.1$,^\[::1\]$':

The embedded ::1 (IPv6 loopback) contains a colon, so type capture ends early at ^\[, the regex consumes the first colon of ::1 as its terminator, and the remainder (:1\]$':) leaks into desc — landing ahead of the real description text once the next line is appended.

This isn't unique to --accept-hosts: any Cobra/kubectl flag whose default contains a colon (IPv6 literals, ratios, time ranges, key:value defaults) will hit the same truncation and ship a garbled XML doc/IntelliSense tooltip. A more robust fix would treat a quoted default as an atomic token (e.g. (?<type>'[^']*'|\S+?)) instead of assuming defaults are colon-free, so this whole class of values self-heals rather than needing a one-off carve-out for accept-hosts.

Per repo convention this must be fixed in the scraper, not by hand-patching the generated file — and since this PR is just a re-run of the existing generator, every future regeneration will keep reproducing this same garbled doc for --accept-hosts (and silently for other colon-containing defaults) until that regex is fixed. Worth adding a regression case with a default value containing an embedded colon to the scraper's test suite so this doesn't silently reappear.

Everything else

Enum reordering (e.g. KubernetesAnnotateDryRun, KubernetesAnnotateOutput members now alphabetized) is a byproduct of the generator itself, not a kubectl version bump — it's what drives the large "314 added/314 removed" API diff, but per CLAUDE.md this is accepted policy for regenerated output. PublicAPI.Shipped.txt/Unshipped.txt and Kubernetes.Generation.json changes are consistent with that. No other issues found.

@thomhurst
thomhurst force-pushed the automated/update-cli-options-kubectl branch from 834fbae to 2c38b93 Compare September 7, 2026 15:49
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Code Review

Another automated kubectl CLI-options refresh (same shape as the prior pushes to this PR, and #4689). Scope is entirely [ExcludeFromCodeCoverage]/Generated files plus the PublicAPI.*.txt tracking files — no hand-written logic changed, and per CLAUDE.md policy, breaking API/ordinal changes from regeneration (the enum member re-alphabetization driving the "314 added/314 removed" diff, e.g. KubernetesAnnotateDryRun, KubernetesAnnotateOutput) are expected here and not something to push back on.

Previously-flagged issue: still unresolved

Three earlier reviews on this PR have now flagged the same malformed XML doc comment, and it is still present unchanged at the current head (2c38b939):

src/ModularPipelines.Kubernetes/Options/KubernetesProxyOptions.Generated.cs:24

/// <summary>
/// :1\]$': Regular expression for hosts that the proxy should accept.
/// </summary>
[CliOption("--accept-hosts", Format = OptionFormat.EqualsSeparated)]
public string? AcceptHosts { get; set; }

Root cause (confirmed again — the scraper is untouched by this PR): KubectlOptionPattern in tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator/Scrapers/Cli/CobraCliScraper.cs:990:

[GeneratedRegex(@"^\s*(?:(?<short>-\w),\s*)?(?<long>--[\w-]+)(?:(?<default>=)(?<type>[^:\s]*))?:\s*(?<desc>.*)?$", RegexOptions.Multiline)]
private static partial Regex KubectlOptionPattern();

type ([^:\s]*) stops at the first colon in the default value. kubectl's real default for --accept-hosts is:

--accept-hosts='^localhost$,^127\.0\.0\.1$,^\[::1\]$':

The embedded ::1 (IPv6 loopback) contains a colon, so the type capture ends early at ^\[, the regex consumes the first colon of ::1 as its terminator, and the remainder (:1\]$':) leaks into desc, landing ahead of the real description text.

This isn't unique to --accept-hosts: any Cobra/kubectl flag whose default contains a colon (IPv6 literals, ratios, time ranges, key:value defaults) hits the same truncation and ships a garbled XML doc/IntelliSense tooltip. A more robust fix would treat a quoted default as an atomic token (e.g. (?<type>'[^']*'|\S+?)) instead of assuming defaults are colon-free, so this whole class of values self-heals instead of needing a one-off carve-out for accept-hosts.

Per repo convention (CLAUDE.md: "Fix the scraper or generator... never hand-edit generated options") this must be fixed in CobraCliScraper.cs, not by hand-patching the generated file. Since this PR is just a re-run of the existing generator, every future regeneration will keep reproducing this same garbled doc until that regex is fixed. Worth adding a regression case to the scraper's test suite with a default value containing an embedded colon, so this doesn't silently reappear on the next refresh.

Everything else

PublicAPI.Shipped.txt/Unshipped.txt and Kubernetes.Generation.json changes are consistent with the generator output and the disclosed breaking-change summary in the PR description. No other issues found.

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