Regenerate CCPM Plugin commands - #3457
Conversation
There was a problem hiding this comment.
Pull request overview
Regenerates CCPM “plugin” CLI command implementations (now surfaced as ccpm custom-connect-plugin with plugin as an alias) and updates the CCPM V2 client wrapper plus integration-test golden outputs to match the regenerated command tree and output formatting.
Changes:
- Regenerated CCPM custom connect plugin + version commands under
internal/ccpm/, introducingcustom-connect-pluginas the canonical command name withpluginalias. - Refactored CCPM client wrappers in
pkg/ccloudv2/ccpm.go(method naming/signatures) and updated client bootstrap inpkg/ccloudv2/client.go. - Updated/added/removed CCPM golden fixtures to match new command names, help output, and updated human output text.
Reviewed changes
Copilot reviewed 68 out of 75 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/fixtures/output/ccpm/plugin/update-help.golden | Removed old ccpm plugin update help golden (command renamed/canonicalized). |
| test/fixtures/output/ccpm/plugin/help.golden | Removed old ccpm plugin help golden (command renamed/canonicalized). |
| test/fixtures/output/ccpm/plugin-version-list-missing-plugin.golden | Updated usage/examples to ccpm custom-connect-plugin version .... |
| test/fixtures/output/ccpm/plugin-version-describe-too-many-args.golden | Updated usage/examples to ccpm custom-connect-plugin version .... |
| test/fixtures/output/ccpm/plugin-version-describe-missing-version.golden | Updated usage/examples to ccpm custom-connect-plugin version .... |
| test/fixtures/output/ccpm/plugin-version-describe-missing-plugin.golden | Updated usage/examples to ccpm custom-connect-plugin version .... |
| test/fixtures/output/ccpm/plugin-version-describe-missing-id.golden | Updated usage/examples to ccpm custom-connect-plugin version .... |
| test/fixtures/output/ccpm/plugin-version-delete-not-found.golden | Updated suggestion command path to ccpm custom-connect-plugin version list. |
| test/fixtures/output/ccpm/plugin-version-delete-missing-version.golden | Updated usage/examples to ccpm custom-connect-plugin version .... |
| test/fixtures/output/ccpm/plugin-version-delete-missing-plugin.golden | Updated usage/examples to ccpm custom-connect-plugin version .... |
| test/fixtures/output/ccpm/plugin-version-delete-missing-id.golden | Updated usage/examples to ccpm custom-connect-plugin version .... |
| test/fixtures/output/ccpm/plugin-version-create-missing-required.golden | Updated usage/examples to ccpm custom-connect-plugin version .... |
| test/fixtures/output/ccpm/plugin-update.golden | Updated human output message + table row ordering. |
| test/fixtures/output/ccpm/plugin-update-too-many-args.golden | Updated usage/examples/flags for canonical command + added context/output flags. |
| test/fixtures/output/ccpm/plugin-update-missing-id.golden | Updated usage/examples/flags for canonical command + added context/output flags. |
| test/fixtures/output/ccpm/plugin-update-missing-environment.golden | Updated human output message + table row ordering. |
| test/fixtures/output/ccpm/plugin-list.golden | Updated list table columns/order. |
| test/fixtures/output/ccpm/plugin-list-yaml.golden | Updated YAML field ordering. |
| test/fixtures/output/ccpm/plugin-list-missing-environment.golden | Updated list table columns/order. |
| test/fixtures/output/ccpm/plugin-list-json.golden | Updated JSON field ordering. |
| test/fixtures/output/ccpm/plugin-list-aws.golden | Updated list table columns/order. |
| test/fixtures/output/ccpm/plugin-help.golden | Updated help output for canonical custom-connect-plugin + alias display. |
| test/fixtures/output/ccpm/plugin-describe.golden | Updated table row ordering. |
| test/fixtures/output/ccpm/plugin-describe-yaml.golden | Updated YAML field ordering. |
| test/fixtures/output/ccpm/plugin-describe-too-many-args.golden | Updated usage/examples to canonical command + added context flag. |
| test/fixtures/output/ccpm/plugin-describe-missing-id.golden | Updated usage/examples to canonical command + added context flag. |
| test/fixtures/output/ccpm/plugin-describe-missing-environment.golden | Updated table row ordering. |
| test/fixtures/output/ccpm/plugin-describe-json.golden | Updated JSON field ordering. |
| test/fixtures/output/ccpm/plugin-delete.golden | Updated deletion success message wording. |
| test/fixtures/output/ccpm/plugin-delete-too-many-args.golden | Updated deletion prompt wording. |
| test/fixtures/output/ccpm/plugin-delete-prompt.golden | Updated deletion prompt + success wording. |
| test/fixtures/output/ccpm/plugin-delete-not-found.golden | Updated not-found error wording + suggestion command path. |
| test/fixtures/output/ccpm/plugin-delete-missing-id.golden | Updated usage/examples to canonical command + added context flag. |
| test/fixtures/output/ccpm/plugin-delete-missing-environment.golden | Updated deletion success message wording. |
| test/fixtures/output/ccpm/plugin-delete-cancelled.golden | Updated deletion prompt wording. |
| test/fixtures/output/ccpm/plugin-delete-api-error.golden | Updated API error wording + suggestion command path. |
| test/fixtures/output/ccpm/plugin-create.golden | Updated table row ordering. |
| test/fixtures/output/ccpm/plugin-create-without-description.golden | Updated table row ordering. |
| test/fixtures/output/ccpm/plugin-create-missing-name.golden | Updated usage/examples/flags for canonical command + added context/output flags. |
| test/fixtures/output/ccpm/plugin-create-missing-environment.golden | Updated table row ordering. |
| test/fixtures/output/ccpm/plugin-create-missing-cloud.golden | Updated usage/examples/flags for canonical command + added context/output flags. |
| test/fixtures/output/ccpm/help.golden | Updated CCPM top-level help to show custom-connect-plugin entry. |
| test/fixtures/output/ccpm/custom-connect-plugin/version/list-help.golden | Added canonical help golden for custom-connect-plugin version list. |
| test/fixtures/output/ccpm/custom-connect-plugin/version/help.golden | Added canonical help golden for custom-connect-plugin version. |
| test/fixtures/output/ccpm/custom-connect-plugin/version/describe-help.golden | Added canonical help golden for custom-connect-plugin version describe. |
| test/fixtures/output/ccpm/custom-connect-plugin/version/delete-help.golden | Added canonical help golden for custom-connect-plugin version delete. |
| test/fixtures/output/ccpm/custom-connect-plugin/version/create-help.golden | Added canonical help golden for custom-connect-plugin version create. |
| test/fixtures/output/ccpm/custom-connect-plugin/update-help.golden | Added canonical help golden for custom-connect-plugin update. |
| test/fixtures/output/ccpm/custom-connect-plugin/list-help.golden | Added canonical help golden for custom-connect-plugin list. |
| test/fixtures/output/ccpm/custom-connect-plugin/help.golden | Added canonical help golden for custom-connect-plugin root. |
| test/fixtures/output/ccpm/custom-connect-plugin/describe-help.golden | Added canonical help golden for custom-connect-plugin describe. |
| test/fixtures/output/ccpm/custom-connect-plugin/delete-help.golden | Added canonical help golden for custom-connect-plugin delete. |
| test/fixtures/output/ccpm/custom-connect-plugin/create-help.golden | Added canonical help golden for custom-connect-plugin create. |
| pkg/ccloudv2/client.go | Renamed CCPM client constructor call (newCCPMClient → newCcpmClient). |
| pkg/ccloudv2/ccpm.go | Regenerated CCPM client wrappers; introduced new method names/signatures and pagination helpers. |
| internal/ccpm/command.go | CCPM command now registers regenerated custom-connect-plugin subtree. |
| internal/ccpm/command_version.go | Reworked version command wiring around a new authenticated command struct. |
| internal/ccpm/command_version_list.go | Updated version list flow to new client methods + error wrapping. |
| internal/ccpm/command_version_describe.go | Updated version describe flow to new client methods + error wrapping. |
| internal/ccpm/command_version_delete.go | Updated version delete flow to new client methods. |
| internal/ccpm/command_version_create.go | Updated version create flow to new client methods + error wrapping. |
| internal/ccpm/command_plugin.go | Removed legacy plugin command implementation (superseded by regenerated command). |
| internal/ccpm/command_plugin_update.go | Removed legacy update implementation (superseded). |
| internal/ccpm/command_plugin_list.go | Removed legacy list implementation (superseded). |
| internal/ccpm/command_plugin_describe.go | Removed legacy describe implementation (superseded). |
| internal/ccpm/command_plugin_delete.go | Removed legacy delete implementation (superseded). |
| internal/ccpm/command_plugin_create.go | Removed legacy create implementation (superseded). |
| internal/ccpm/command_custom_connect_plugin.go | Added regenerated canonical custom-connect-plugin command root + output model + completion. |
| internal/ccpm/command_custom_connect_plugin_update.go | Added regenerated update command implementation. |
| internal/ccpm/command_custom_connect_plugin_list.go | Added regenerated list command implementation. |
| internal/ccpm/command_custom_connect_plugin_describe.go | Added regenerated describe command implementation. |
| internal/ccpm/command_custom_connect_plugin_delete.go | Added regenerated delete command implementation. |
| internal/ccpm/command_custom_connect_plugin_create.go | Added regenerated create command implementation. |
| cmd/lint/main.go | Updated lint vocabulary/proper nouns for regenerated user-facing strings. |
| .cli-generation-checksum | Updated generator checksum to match regenerated output. |
Files not reviewed (7)
- internal/ccpm/command_custom_connect_plugin.go: Generated file
- internal/ccpm/command_custom_connect_plugin_create.go: Generated file
- internal/ccpm/command_custom_connect_plugin_delete.go: Generated file
- internal/ccpm/command_custom_connect_plugin_describe.go: Generated file
- internal/ccpm/command_custom_connect_plugin_list.go: Generated file
- internal/ccpm/command_custom_connect_plugin_update.go: Generated file
- pkg/ccloudv2/ccpm.go: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| func (c *Client) ListCcpmCustomConnectPluginVersions(pluginId string, environment string) ([]ccpmv1.CcpmV1CustomConnectPluginVersion, error) { | ||
| var list []ccpmv1.CcpmV1CustomConnectPluginVersion | ||
|
|
||
| done := false | ||
| pageToken := "" | ||
| for !done { | ||
| page, httpResp, err := c.executeListCcpmCustomConnectPluginVersions(pluginId, environment, pageToken) | ||
| if err != nil { | ||
| return nil, errors.CatchCCloudV2Error(err, httpResp) | ||
| } | ||
| list = append(list, page.GetData()...) | ||
|
|
||
| versions, httpResp, err := c.executeListCCPMPluginVersions(pluginId, environment) | ||
| if err != nil { | ||
| return nil, errors.CatchCCloudV2Error(err, httpResp) | ||
| pageToken, done, err = extractNextPageToken(page.GetMetadata().Next) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| } | ||
| allVersions = append(allVersions, versions.GetData()...) | ||
| return allVersions, nil | ||
| } | ||
|
|
||
| func (c *Client) DeleteCCPMPluginVersion(pluginId, versionId, environment string) error { | ||
| httpResp, err := c.CcpmClient.CustomConnectPluginVersionsCcpmV1Api.DeleteCcpmV1CustomConnectPluginVersion(c.ccpmApiContext(), pluginId, versionId).Environment(environment).Execute() | ||
| return errors.CatchCCloudV2Error(err, httpResp) | ||
| return list, nil | ||
| } | ||
|
|
||
| func (c *Client) executeListCCPMPluginVersions(pluginId, environment string) (ccpmv1.CcpmV1CustomConnectPluginVersionList, *http.Response, error) { | ||
| req := c.CcpmClient.CustomConnectPluginVersionsCcpmV1Api.ListCcpmV1CustomConnectPluginVersions(c.ccpmApiContext(), pluginId).Environment(environment) | ||
| func (c *Client) executeListCcpmCustomConnectPluginVersions(pluginId string, environment string, pageToken string) (ccpmv1.CcpmV1CustomConnectPluginVersionList, *http.Response, error) { | ||
| req := c.CcpmClient.CustomConnectPluginVersionsCcpmV1Api. | ||
| ListCcpmV1CustomConnectPluginVersions(c.ccpmApiContext(), pluginId). | ||
| Environment(environment) | ||
| return req.Execute() |
| if err := deletion.ValidateAndConfirm(cmd, args, existenceFunc, "CCPM custom Connect plugin"); err != nil { | ||
| return err | ||
| } | ||
|
|
||
| deleteFunc := func(primaryId string) error { | ||
| return c.V2Client.DeleteCcpmCustomConnectPlugin(primaryId, environmentId) | ||
| } | ||
|
|
||
| _, err = deletion.Delete(cmd, args, deleteFunc, "CCPM custom Connect plugin") |
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
|




Release Notes
Breaking Changes
New Features
Bug Fixes
Checklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
Regenerated the Cloud CCPM plugin commands. Specifically,
plugincommand, which is nowconnect-custom-plugin.pluginhas been added as an alias to prevent breaking changes.connect-custom-pluginandconnect-custom-plugin version.versionnested command (but it's interface should be unchanged).I did not regenerate the integration tests since the existing set is extensive.
Blast Radius
The impact would be limited to the CCPM commands in case of any issues. The user-facing changes themselves are cosmetic and should have minimal blast radius:
plugincommand toconnect-custom-plugin:pluginadded as an alias to prevent breaking changeReferences
Test & Review
The existing integration test suite was not regenerated and all pass after updates to the golden files to account for reordering.
Testing of the regenerated commands (version subcommand was not regenerated and is covered by existing integration tests)
https://docs.google.com/document/d/1yrXESIMiqOi6hmtXqKUc4VeL8bK05YNZ1k4K6p1lCLY/edit?usp=sharing