Skip to content

Regenerate CCPM Plugin commands - #3457

Open
Steven Gagniere (sgagniere) wants to merge 5 commits into
mainfrom
regenerate-ccpm
Open

Regenerate CCPM Plugin commands#3457
Steven Gagniere (sgagniere) wants to merge 5 commits into
mainfrom
regenerate-ccpm

Conversation

@sgagniere

@sgagniere Steven Gagniere (sgagniere) commented Aug 20, 2026

Copy link
Copy Markdown
Member

Release Notes

Breaking Changes

  • PLACEHOLDER

New Features

  • PLACEHOLDER

Bug Fixes

  • PLACEHOLDER

Checklist

  • I have successfully built and used a custom CLI binary, without linter issues from this PR.
  • I have clearly specified in the What section below whether this PR applies to Confluent Cloud, Confluent Platform, or both.
  • I have verified this PR in Confluent Cloud pre-prod or production environment, if applicable.
  • I have verified this PR in Confluent Platform on-premises environment, if applicable.
  • I have attached manual CLI verification results or screenshots in the Test & Review section below.
  • I have added appropriate CLI integration or unit tests for any new or updated commands and functionality.
  • I confirm that this PR introduces no breaking changes or backward compatibility issues.
  • I have indicated the potential customer impact if something goes wrong in the Blast Radius section below.
  • I have put checkmarks below confirming that the feature associated with this PR is enabled in:
    • Confluent Cloud prod
    • Confluent Cloud stag
    • Confluent Platform
    • Check this box if the feature is enabled for certain organizations only

What

Regenerated the Cloud CCPM plugin commands. Specifically,

  • Regenerated the plugin command, which is now connect-custom-plugin. plugin has been added as an alias to prevent breaking changes.
  • Updated the SDK wrapper for both connect-custom-plugin and connect-custom-plugin version.
    • Made corresponding changes to the implementation of the version nested 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:

  • Renaming the plugin command to connect-custom-plugin: plugin added as an alias to prevent breaking change
  • Re-ordering of fields in the output: key order should not be significant for JSON or YAML parsing

References

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

Copilot AI lite review requested due to automatic review settings August 20, 2026 00:35

Copilot AI 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.

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/, introducing custom-connect-plugin as the canonical command name with plugin alias.
  • Refactored CCPM client wrappers in pkg/ccloudv2/ccpm.go (method naming/signatures) and updated client bootstrap in pkg/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 (newCCPMClientnewCcpmClient).
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.

Comment thread pkg/ccloudv2/ccpm.go
Comment on lines +127 to 152
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()
Comment thread internal/ccpm/command_custom_connect_plugin_delete.go
Comment on lines +54 to +62
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")
@confluent-cla-assistant

Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

@sgagniere
Steven Gagniere (sgagniere) marked this pull request as ready for review August 25, 2026 23:30
@sgagniere
Steven Gagniere (sgagniere) requested a review from a team as a code owner August 25, 2026 23:30
@sonarqube-confluent

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants