Skip to content

Commit de01c74

Browse files
Paras Negiclaude
andcommitted
Merge branch 'main' into cf-2067-flink-artifact-cli
Resolve conflicts in two files: - internal/flink/command.go: keep main's compute-pool/statement login-mode branching and generated-region block; move the new artifact group into the shared section as newArtifactCommand(cfg). - pkg/flink/cmf_rest_client.go: adopt main's generic listAllPages helper in place of the removed extractPageOptions; rewrite ListArtifacts and ListArtifactVersions onto it (pass 0 for the default page size, since the artifact commands expose no --page-size flag). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 parents 1cd3acc + d2e4f84 commit de01c74

326 files changed

Lines changed: 4676 additions & 3003 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/docs-drift/SKILL.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: docs-drift
3+
description: Validates confluentinc/cli's in-code documentation (Short/Long/Example text on Cobra commands, plus root markdown like README.md/CONTRIBUTING.md) against the live command tree to catch stale references to deprecated or hidden commands/flags, wrong/missing/extra flags in examples, typos, and broken links. Use when asked to check for documentation drift, validate CLI examples/help text, or audit docs for staleness. Read-only by default — only edits a file when explicitly asked to fix something.
4+
---
5+
6+
# Docs Drift — confluentinc/cli
7+
8+
The CLI has no separate hand-maintained `docs/` tree. Its "docs" are the `Short`/`Long`/`Example` fields embedded directly in each Cobra command (e.g. `internal/kafka/command_topic_create.go`), plus root-level markdown. Ground truth is the live command/flag tree, not any static file.
9+
10+
## 1. Reuse the existing linter — don't re-derive it
11+
12+
```
13+
make lint-cli
14+
```
15+
16+
This runs `pkg/linter.RequireValidExamples()` (`pkg/linter/command_rules.go:220`) over the live command tree: every `IsFlagRequired` flag must appear in the example, every `--flag` token in an example must exist on that command's `pflag.FlagSet`, and `--flag=value` syntax is rejected outright. It also runs hunspell-backed `CommandRule`/`FlagRule` checks (naming, capitalization, punctuation) on `Use`/`Short`/`Long`/flag usage strings. Capture and categorize this output as doc-drift findings rather than reimplementing the flag-matching logic by hand.
17+
18+
## 2. Find deprecated/hidden surface still referenced in prose
19+
20+
Commands and flags are hidden or disabled via:
21+
- `cmd.Flags().MarkHidden("flag-name")` (scattered across command files, e.g. `internal/kafka/command_topic_produce.go`)
22+
- `command.Hidden = true` (see `internal/command.go:229`)
23+
- `pkg/featureflags.DisableHelpText(cmd, flags)` — LaunchDarkly-driven hiding (`pkg/featureflags/disable.go`)
24+
25+
LaunchDarkly can also deprecate visible surface area via `featureflags.DeprecateCommandTree` and `featureflags.DeprecateFlags`, which prefix command `Short`/`Long` text or flag `Usage` with `DEPRECATED:`. Grep for all hiding, disabling, and deprecation patterns repo-wide to build a list of affected commands and flags, then cross-reference each name against every `Example:`/`Long:` string that still mentions it by exact name. A hidden/disabled command or flag shown in another example is stale; a deprecated one shown without an appropriate warning is a drift candidate. Report the file:line of both the mechanism and the stale reference.
26+
27+
## 3. Cross-check subcommands mentioned in prose
28+
29+
Some `Long:` fields reference other subcommands by name (e.g. "run `confluent kafka topic list` first"). Build the live command tree the same way `cmd/docs/main.go` and `cmd/lint/main.go` do (`internal.NewConfluentCommand(cfg)`), then verify every `confluent <subcommand path>` mentioned in prose still resolves to a real, non-hidden command. A renamed or removed subcommand referenced this way is a direct hit — this is the CLI-side analog of a doc pointing at a resource/attribute that no longer exists.
30+
31+
## 4. Root markdown: typos and broken links
32+
33+
For `README.md`, `CONTRIBUTING.md`, and any other repo-root markdown:
34+
- Extract `[text](url)` links. For relative links, verify the target file exists. For `http(s)://` links, follow redirects during a quick HEAD check (`curl -sSIL -o /dev/null -w '%{http_code}' <url>`). If the server rejects HEAD with `405` or `501`, retry with a lightweight GET that discards the body (`curl -sSL -o /dev/null -w '%{http_code}' <url>`). Treat other final 4xx/5xx responses as broken, and skip anything pointing at internal/non-public infrastructure.
35+
- Cross-reference command/flag names mentioned in prose against the real command surface built in step 3 — a misspelled command (`confluent kafak topic`) won't resolve and is a giveaway.
36+
37+
## 5. Optional: regenerate the full reference tree for a manual pass
38+
39+
`go run cmd/docs/main.go` renders the entire live command tree to `.rst` under `docs/` (gitignored, not committed, and not wired into `make`/CI). Regenerating and skimming it is useful for a broader manual read beyond the automated checks above, but there's no prior committed version to diff against — don't treat it as a source of drift by itself, just as an on-demand snapshot.
40+
41+
## Output
42+
43+
Report findings grouped by category — `lint-cli` failures, stale deprecated/hidden reference, broken subcommand reference, typo, broken link — each with a file:line and a one-line concrete explanation (not "looks wrong"). Stay read-only: only edit a file if the user explicitly asks you to fix something, and show the diff before/after.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
name: issue-dedup
3+
description: Finds and resolves duplicate GitHub issues in confluentinc/cli, with a lightweight check for related issues in the sibling confluentinc/terraform-provider-confluent repo. Scans open issues, clusters likely duplicates with a suggested canonical issue, and — only after explicit confirmation — comments, labels, and closes confirmed duplicates. Use when asked to find, flag, merge, close, or clean up duplicate issues in this repo. Scanning is read-only; resolving mutates GitHub and always confirms first.
4+
---
5+
6+
# Issue Dedup — confluentinc/cli
7+
8+
Two phases in one skill: **Scan** (read-only, always safe to run) and **Resolve** (mutates GitHub, requires explicit confirmation). Do not skip straight to Resolve — always scan (or accept a prior scan's output) first.
9+
10+
## Phase 1 — Scan (read-only)
11+
12+
1. **Scope**: default to all open issues in `confluentinc/cli`. If the user narrows it (a label, a time window, a keyword), use that instead. First obtain the total matching count without truncation:
13+
14+
```
15+
gh api --method GET search/issues -f q='repo:confluentinc/cli is:issue is:open' --jq '.total_count'
16+
```
17+
18+
Include any user-supplied label, time-window, or keyword filters in the search query. If the count is more than ~500, report it and ask whether to narrow the scope or explicitly approve fetching the larger result set. Only then fetch the issues, setting `--limit` to at least the reported count so the scan is not silently capped:
19+
20+
```
21+
gh issue list --repo confluentinc/cli --state open \
22+
--json number,title,body,labels,createdAt,updatedAt,comments,url --limit <reported-count>
23+
```
24+
25+
2. **Normalize**: strip issue-template boilerplate (fixed headers, checkbox scaffolding) before comparing bodies — it inflates similarity between unrelated issues that just used the same template. Focus on what varies: error messages, exact commands, stack traces, version strings, repro steps.
26+
27+
3. **Cluster** (don't do a naive O(n²) full-text pass):
28+
- Block by shared signals first: same error string/exit code, same subcommand (e.g. `confluent kafka topic create`), overlapping title tokens, same label.
29+
- Within a block, actually read the normalized bodies and judge whether they're the same bug/request, not just the same topic. "Topic creation fails" with two different root causes is not a duplicate pair.
30+
31+
4. **Cross-repo check**: for clusters that look like they might stem from a platform/API behavior rather than a CLI-specific bug, do one targeted search against the sibling repo before concluding:
32+
33+
```
34+
gh issue list --repo confluentinc/terraform-provider-confluent --state open --search "<keyword>"
35+
```
36+
37+
If you find a match, flag it as **cross-repo related** rather than a same-repo duplicate — see classification below.
38+
39+
5. **Pick a canonical issue** per group: prefer most complete repro/description, then oldest by `createdAt`, then most comments/reactions. State which rule decided it.
40+
41+
6. **Classify**:
42+
- **Same-repo duplicate** (High/Medium/Low confidence) — candidate for closing in Phase 2.
43+
- **Cross-repo related** (High/Medium/Low confidence) — same underlying platform behavior surfacing in both repos. Default action is cross-linking, not closing either side.
44+
45+
For every group, give one or two sentences of *concrete* reasoning (shared error text, same command, same field) — never just "these look similar."
46+
47+
7. **Output**: write a markdown report (default `./issue-dedup-report-<YYYY-MM-DD>.md`) with one entry per group:
48+
49+
```markdown
50+
## Group 1 — [same-repo duplicate | cross-repo related] — confidence: High/Medium/Low
51+
Canonical: #123 <title> (<url>)
52+
Duplicates:
53+
- #456 <title> (<url>)
54+
Reasoning: <concrete, specific>
55+
```
56+
57+
Then summarize in chat: issues scanned, groups found, top few by confidence. Stop here unless the user asks you to resolve.
58+
59+
## Phase 2 — Resolve (mutates GitHub, confirm first)
60+
61+
Only enter this phase against a scan you (or a prior run) just produced, or a group the user hands you directly. Never invent duplicate judgments from scratch here.
62+
63+
1. **Re-verify** each issue in each group before trusting the report — reports go stale:
64+
65+
```
66+
gh issue view <number> --repo confluentinc/cli --json state,title,labels,comments,body
67+
```
68+
69+
Drop/flag a group if an issue is already closed, has picked up substantial new discussion diverging from the canonical thread (treat as "needs manual review"), or its body has changed enough to undercut the original judgment.
70+
71+
2. **Show the exact plan before acting** — literal comment text and commands, not a summary:
72+
73+
```
74+
Canonical: #123 <title>
75+
Will close as duplicate: #456 <title>
76+
Comment: "Closing as a duplicate of #123. If this doesn't fully capture your issue, please reopen or comment on the original with details."
77+
Label: duplicate
78+
Close reason: not planned
79+
```
80+
81+
For **cross-repo related** groups, default to cross-linking only (a comment on each issue pointing at the other) — do not close either side unless the user explicitly says to.
82+
83+
3. **Wait for explicit confirmation.** Confirm per group unless the user explicitly approves the whole batch — and even then, show every group's plan first.
84+
85+
4. **Execute only confirmed groups:**
86+
87+
```
88+
gh issue comment <dup> --repo confluentinc/cli --body "<comment>"
89+
gh issue edit <dup> --repo confluentinc/cli --add-label duplicate
90+
gh issue close <dup> --repo confluentinc/cli --reason "not planned"
91+
```
92+
93+
For a cross-repo cross-link, the corresponding comment goes on the `confluentinc/terraform-provider-confluent` issue via the same `gh issue comment` pattern with that repo. If `gh` reports a permissions error, stop and tell the user — don't retry or route around it.
94+
95+
5. **Log and summarize**: append each executed action (issue, action, timestamp) to `./issue-dedup-actions-<YYYY-MM-DD>.md`, then report groups resolved, groups skipped (why), and groups left for manual review.
96+
97+
## Defaults
98+
99+
- Treat every run as dry-run (show the plan, don't execute) unless the user's message already contains clear approval to act ("go ahead", "do it", "apply these").
100+
- Never bulk-close a group with materially divergent discussion — surface it for manual review instead.

.cli-generation-checksum

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4b4b331c9a9a8e2a28db070b9537b1b55c480d15a4a64543b296ed127f147123
1+
f25196a989634c95aee2aa50adb6d291577999f58de3e6140baae504b32c1cdf

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
exclude: ^.devcontainer/|^charts/|^mk-include/|^node_modules/
1+
exclude: ^.devcontainer/|^charts/|^mk-include/|^node_modules/|^test/fixtures/output/
22
fail_fast: false
33
repos:
44
# ### SERVICEBOT BEGIN - DO NOT EDIT THIS SECTION

.semaphore/macos.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ blocks:
2727
epilogue:
2828
always:
2929
commands:
30-
- test-results publish . -N "darwin/arm64"
30+
# --ignore-missing: build-only jobs run no tests; an early failure can leave one unwritten
31+
- test-results publish unit-test-report.xml integration-test-report.xml -N "darwin/arm64" --ignore-missing

.semaphore/semaphore.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ blocks:
4141
epilogue:
4242
always:
4343
commands:
44-
- test-results publish . -N "linux/amd64"
44+
# --ignore-missing: build-only jobs run no tests; an early failure can leave one unwritten
45+
- test-results publish unit-test-report.xml integration-test-report.xml -N "linux/amd64" --ignore-missing
4546

4647
- name: linux/arm64
4748
run:
@@ -96,7 +97,7 @@ blocks:
9697
epilogue:
9798
always:
9899
commands:
99-
- test-results publish . -N "windows/amd64"
100+
- test-results publish unit-test-report.xml integration-test-report.xml -N "windows/amd64" --ignore-missing
100101

101102
after_pipeline:
102103
task:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Add the following line to `internal/command.go`, and make sure to import its pac
219219
To build the CLI binary, run `make build`. After this, we can run our command in the following way, and see that it (hopefully) works!
220220

221221
make build
222-
dist/confluent_<os>_<arch>/confluent config file describe 3
222+
dist/confluent_<os>_<arch>/confluent config describe 3
223223

224224
#### Integration Testing
225225

cmd/lint/main.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ var commandRules = []linter.CommandRule{
2424
linter.ExcludeCommandContains("local services"),
2525
linter.ExcludeCommand("kafka client-config create nodejs")),
2626

27-
linter.Filter(linter.RequireCapitalizeProperNouns("Short", properNouns), linter.ExcludeCommand("local current")),
27+
linter.Filter(linter.RequireCapitalizeProperNouns("Short", properNouns),
28+
linter.ExcludeCommand("local current"),
29+
linter.ExcludeCommandContains("usm connect-cluster"),
30+
linter.ExcludeCommandContains("usm kafka-cluster"),
31+
),
2832
linter.RequireEndWithPunctuation("Short", false),
2933
linter.Filter(linter.RequireNotTitleCase("Short", properNouns)),
3034
linter.RequireStartWithCapital("Short"),
@@ -113,6 +117,7 @@ var flagRules = []linter.FlagRule{
113117
"include-parent-scopes",
114118
"max-partition-memory-bytes",
115119
"message-send-max-retries",
120+
"metadata-column-naming-scheme",
116121
"private-link-access-point",
117122
"record-failure-strategy",
118123
"remote-api-key",
@@ -142,6 +147,7 @@ var flagRules = []linter.FlagRule{
142147
"confluent-platform-kafka-cluster",
143148
"max-partition-memory-bytes",
144149
"message-send-max-retries",
150+
"metadata-column-naming-scheme",
145151
"private-link-access-point",
146152
"require-crl-on-client-certificate",
147153
"schema-registry-api-key",
@@ -337,6 +343,7 @@ var vocabWords = []string{
337343
"rest",
338344
"restapi",
339345
"rtce",
346+
"rtcetopic",
340347
"ruleset",
341348
"s3",
342349
"s3vectors",
@@ -372,6 +379,7 @@ var vocabWords = []string{
372379
"uri",
373380
"url",
374381
"us",
382+
"usm",
375383
"v2",
376384
"vertexai",
377385
"vnet",

go.mod

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ require (
4545
github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway v0.7.0
4646
github.com/confluentinc/ccloud-sdk-go-v2/networking-ip v0.2.0
4747
github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink v0.3.0
48-
github.com/confluentinc/ccloud-sdk-go-v2/org v0.12.0
48+
github.com/confluentinc/ccloud-sdk-go-v2/org v0.14.0
4949
github.com/confluentinc/ccloud-sdk-go-v2/provider-integration v0.2.0
5050
github.com/confluentinc/ccloud-sdk-go-v2/rtce v0.1.0
5151
github.com/confluentinc/ccloud-sdk-go-v2/service-quota v0.2.0
5252
github.com/confluentinc/ccloud-sdk-go-v2/srcm v0.7.3
5353
github.com/confluentinc/ccloud-sdk-go-v2/sso v0.0.1
54-
github.com/confluentinc/ccloud-sdk-go-v2/tableflow v0.6.0
55-
github.com/confluentinc/ccloud-sdk-go-v2/usm v0.1.0
54+
github.com/confluentinc/ccloud-sdk-go-v2/tableflow v0.7.0
55+
github.com/confluentinc/ccloud-sdk-go-v2/usm v0.2.0
5656
github.com/confluentinc/cmf-sdk-go v0.0.8
5757
github.com/confluentinc/confluent-kafka-go/v2 v2.14.2
5858
github.com/confluentinc/go-editor v0.11.0
@@ -67,7 +67,7 @@ require (
6767
github.com/dghubble/sling v1.4.2
6868
github.com/fatih/color v1.17.0
6969
github.com/gdamore/tcell/v2 v2.7.4
70-
github.com/go-git/go-git/v5 v5.19.1
70+
github.com/go-git/go-git/v5 v5.19.2
7171
github.com/go-jose/go-jose/v4 v4.1.4
7272
github.com/gobuffalo/flect v1.0.2
7373
github.com/gogo/protobuf v1.3.2
@@ -109,18 +109,18 @@ require (
109109
github.com/tidwall/gjson v1.17.1
110110
github.com/tidwall/pretty v1.2.1
111111
github.com/tidwall/sjson v1.2.5
112-
go.opentelemetry.io/otel v1.43.0
112+
go.opentelemetry.io/otel v1.44.0
113113
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.39.0
114-
go.opentelemetry.io/otel/metric v1.43.0
114+
go.opentelemetry.io/otel/metric v1.44.0
115115
go.opentelemetry.io/otel/sdk v1.43.0
116116
go.opentelemetry.io/otel/sdk/metric v1.43.0
117117
go.uber.org/mock v0.4.0
118-
golang.org/x/crypto v0.54.0
118+
golang.org/x/crypto v0.55.0
119119
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
120-
golang.org/x/oauth2 v0.35.0
120+
golang.org/x/oauth2 v0.36.0
121121
golang.org/x/term v0.45.0
122-
golang.org/x/text v0.40.0
123-
google.golang.org/grpc v1.80.0
122+
golang.org/x/text v0.41.0
123+
google.golang.org/grpc v1.82.1
124124
google.golang.org/protobuf v1.36.11
125125
gopkg.in/launchdarkly/go-sdk-common.v2 v2.5.1
126126
gopkg.in/yaml.v3 v3.0.1
@@ -182,7 +182,7 @@ require (
182182
github.com/docker/go-connections v0.7.0 // indirect
183183
github.com/docker/go-units v0.5.0 // indirect
184184
github.com/emirpasic/gods v1.18.1 // indirect
185-
github.com/envoyproxy/protoc-gen-validate v1.3.0 // indirect
185+
github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect
186186
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
187187
github.com/felixge/httpsnoop v1.0.4 // indirect
188188
github.com/gdamore/encoding v1.0.0 // indirect
@@ -225,7 +225,7 @@ require (
225225
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
226226
github.com/kylelemons/godebug v1.1.0 // indirect
227227
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
228-
github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4 // indirect
228+
github.com/lyft/protoc-gen-star/v2 v2.0.4 // indirect
229229
github.com/mailru/easyjson v0.7.7 // indirect
230230
github.com/mattn/go-colorable v0.1.13 // indirect
231231
github.com/mattn/go-localereader v0.0.1 // indirect
@@ -251,7 +251,7 @@ require (
251251
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
252252
github.com/shopspring/decimal v1.3.1 // indirect
253253
github.com/skeema/knownhosts v1.3.1 // indirect
254-
github.com/spf13/afero v1.10.0 // indirect
254+
github.com/spf13/afero v1.15.0 // indirect
255255
github.com/stoewer/go-strcase v1.2.0 // indirect
256256
github.com/swaggest/jsonschema-go v0.3.39 // indirect
257257
github.com/swaggest/refl v1.1.0 // indirect
@@ -271,18 +271,18 @@ require (
271271
go.opencensus.io v0.24.0 // indirect
272272
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
273273
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
274-
go.opentelemetry.io/otel/trace v1.43.0 // indirect
274+
go.opentelemetry.io/otel/trace v1.44.0 // indirect
275275
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
276-
golang.org/x/mod v0.37.0 // indirect
277-
golang.org/x/net v0.56.0 // indirect
276+
golang.org/x/mod v0.40.0 // indirect
277+
golang.org/x/net v0.58.0 // indirect
278278
golang.org/x/sync v0.22.0 // indirect
279279
golang.org/x/sys v0.47.0 // indirect
280280
golang.org/x/time v0.11.0 // indirect
281-
golang.org/x/tools v0.47.0 // indirect
281+
golang.org/x/tools v0.49.0 // indirect
282282
google.golang.org/api v0.191.0 // indirect
283283
google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf // indirect
284-
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 // indirect
285-
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 // indirect
284+
google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478 // indirect
285+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 // indirect
286286
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
287287
gopkg.in/inf.v0 v0.9.1 // indirect
288288
gopkg.in/launchdarkly/go-jsonstream.v1 v1.0.1 // indirect

0 commit comments

Comments
 (0)