Skip to content

[APIE-921] Code refactor on CCloudV2 wrapper functions to follow {Operation}{Package}{Kind} function signature (internal)#3285

Merged
Channing Dong (channingdong) merged 2 commits intomainfrom
APIE-921
Mar 20, 2026
Merged

[APIE-921] Code refactor on CCloudV2 wrapper functions to follow {Operation}{Package}{Kind} function signature (internal)#3285
Channing Dong (channingdong) merged 2 commits intomainfrom
APIE-921

Conversation

@channingdong
Copy link
Contributor

@channingdong Channing Dong (channingdong) commented Mar 20, 2026

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

This PR aims to standardize the CCloudV2 wrapper CRUDL functions to follow the {Operation}{Package}{Kind} function signatures.

It doesn't affect the behavior of existing CLI commands, nor the user interfaces.

Blast Radius

Minimal, since the code changes are function signature only, but in the rare case, users with flink, iam, network API groups might be impacted.

References

https://confluentinc.atlassian.net/browse/APIE-921

Test & Review

make lint
make build
Manual sanity check on the affected commands

@channingdong Channing Dong (channingdong) requested a review from a team as a code owner March 20, 2026 04:35
Copilot AI review requested due to automatic review settings March 20, 2026 04:35
@confluent-cla-assistant
Copy link

🎉 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.

@channingdong Channing Dong (channingdong) changed the title [APIE-921] Code refactor on CCloudV2 wrapper functions to follow {Operation}{Package}{Kind} function signature [APIE-921] Code refactor on CCloudV2 wrapper functions to follow {Operation}{Package}{Kind} function signature (internal) Mar 20, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Standardizes Confluent Cloud V2 (pkg/ccloudv2) wrapper method names to the {Operation}{Package}{Kind} convention and updates all internal call sites (networking, IAM/SSO, Flink) accordingly, without intended behavior changes to the CLI.

Changes:

  • Renamed CCloudV2 wrapper CRUDL methods (e.g., ListGroupMappingsListIamGroupMappings, ListPeeringsListNetworkPeerings) to match {Operation}{Package}{Kind}.
  • Updated affected CLI commands, autocompleters, and tests to call the renamed wrapper methods.
  • Adjusted a lint suppression in login tests.

Reviewed changes

Copilot reviewed 102 out of 102 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/cmd/flags.go Update IAM/SSO autocomplete helpers to use renamed CCloudV2 wrapper methods
pkg/ccloudv2/sso.go Rename SSO group mapping wrapper methods to *Iam* naming
pkg/ccloudv2/networking_privatelink.go Rename PrivateLink wrapper methods to *Network* naming
pkg/ccloudv2/networking_ip.go Rename IP address listing wrapper method to ListNetworkIpAddresses
pkg/ccloudv2/networking_dnsforwarder.go Rename DNS forwarder wrapper methods to *Network* naming
pkg/ccloudv2/networking_access_point.go Rename access point/DNS record wrapper methods to *Network* naming
pkg/ccloudv2/networking.go Rename peering/TGW/PLA wrapper methods to *Network* naming
pkg/ccloudv2/networking-gateway.go Rename gateway wrapper methods to *Network* naming
pkg/ccloudv2/identity_provider.go Rename identity provider/pool wrapper methods to *Iam* naming
pkg/ccloudv2/certificate_authority.go Rename certificate authority/pool wrapper methods to *Iam* naming
internal/network/command_transit_gateway_attachment_update.go Update TGW attachment update command to renamed wrapper method
internal/network/command_transit_gateway_attachment_describe.go Update TGW attachment describe command to renamed wrapper method
internal/network/command_transit_gateway_attachment_delete.go Update TGW attachment delete command to renamed wrapper methods
internal/network/command_transit_gateway_attachment_create.go Update TGW attachment create command to renamed wrapper method
internal/network/command_transit_gateway_attachment.go Update TGW attachment list helper to renamed wrapper method
internal/network/command_private_link_attachment_update.go Update PLA update command to renamed wrapper method
internal/network/command_private_link_attachment_describe.go Update PLA describe command to renamed wrapper method
internal/network/command_private_link_attachment_delete.go Update PLA delete command to renamed wrapper methods
internal/network/command_private_link_attachment_create.go Update PLA create command to renamed wrapper method
internal/network/command_private_link_attachment_connection_update.go Update PLAC update command to renamed wrapper method
internal/network/command_private_link_attachment_connection_list.go Update PLAC list command to renamed wrapper method
internal/network/command_private_link_attachment_connection_describe.go Update PLAC describe command to renamed wrapper method
internal/network/command_private_link_attachment_connection_delete.go Update PLAC delete command to renamed wrapper methods
internal/network/command_private_link_attachment_connection_create.go Update PLAC create command to renamed wrapper method
internal/network/command_private_link_attachment.go Update PLA list helper to renamed wrapper method
internal/network/command_private_link_access_update.go Update private link access update command to renamed wrapper method
internal/network/command_private_link_access_test.go Rename test function names to align with new wrapper naming terminology
internal/network/command_private_link_access_describe.go Update private link access describe command to renamed wrapper method
internal/network/command_private_link_access_delete.go Update private link access delete command to renamed wrapper methods
internal/network/command_private_link_access_create.go Update private link access create command to renamed wrapper method
internal/network/command_private_link_access.go Update private link access list helper to renamed wrapper method
internal/network/command_peering_update.go Update peering update command to renamed wrapper method
internal/network/command_peering_describe.go Update peering describe command to renamed wrapper method
internal/network/command_peering_delete.go Update peering delete command to renamed wrapper methods
internal/network/command_peering_create.go Update peering create command to renamed wrapper method
internal/network/command_peering.go Update peering list helper to renamed wrapper method
internal/network/command_ip_address_list.go Update IP address list command to renamed wrapper method
internal/network/command_gateway_update.go Update gateway update command to renamed wrapper method
internal/network/command_gateway_list.go Update gateway list command to renamed wrapper method
internal/network/command_gateway_describe.go Update gateway describe command to renamed wrapper method
internal/network/command_gateway_delete.go Update gateway delete command to renamed wrapper methods
internal/network/command_gateway_create.go Update gateway create command to renamed wrapper method
internal/network/command_gateway.go Update gateway autocomplete to renamed wrapper method
internal/network/command_dns_record_update.go Update DNS record update command to renamed wrapper methods
internal/network/command_dns_record_list.go Update DNS record list command to renamed wrapper method
internal/network/command_dns_record_describe.go Update DNS record describe command to renamed wrapper method
internal/network/command_dns_record_delete.go Update DNS record delete command to renamed wrapper methods
internal/network/command_dns_record_create.go Update DNS record create command to renamed wrapper method
internal/network/command_dns_record.go Update DNS record autocomplete/list helper to renamed wrapper method
internal/network/command_dns_forwarder_update.go Update DNS forwarder update command to renamed wrapper methods
internal/network/command_dns_forwarder_describe.go Update DNS forwarder describe command to renamed wrapper method
internal/network/command_dns_forwarder_delete.go Update DNS forwarder delete command to renamed wrapper methods
internal/network/command_dns_forwarder_create.go Update DNS forwarder create command to renamed wrapper method
internal/network/command_dns_forwarder.go Update DNS forwarder list helper to renamed wrapper method
internal/network/command_access_point_private_network_interface_update.go Update access point private NIC update to renamed wrapper method
internal/network/command_access_point_private_network_interface_list.go Update access point private NIC list to renamed wrapper method
internal/network/command_access_point_private_network_interface_describe.go Update access point private NIC describe to renamed wrapper method
internal/network/command_access_point_private_network_interface_delete.go Update access point private NIC delete to renamed wrapper methods
internal/network/command_access_point_private_network_interface_create.go Update access point private NIC create to renamed wrapper method
internal/network/command_access_point_private_network_interface.go Update private NIC autocomplete to renamed wrapper method
internal/network/command_access_point_private_link_ingress_endpoint_update.go Update ingress endpoint update to renamed wrapper method
internal/network/command_access_point_private_link_ingress_endpoint_list.go Update ingress endpoint list to renamed wrapper method
internal/network/command_access_point_private_link_ingress_endpoint_describe.go Update ingress endpoint describe to renamed wrapper method
internal/network/command_access_point_private_link_ingress_endpoint_delete.go Update ingress endpoint delete to renamed wrapper methods
internal/network/command_access_point_private_link_ingress_endpoint_create.go Update ingress endpoint create to renamed wrapper method
internal/network/command_access_point_private_link_ingress_endpoint.go Update ingress endpoint autocomplete to renamed wrapper method
internal/network/command_access_point_private_link_egress_endpoint_update.go Update egress endpoint update to renamed wrapper method
internal/network/command_access_point_private_link_egress_endpoint_list.go Update egress endpoint list to renamed wrapper method
internal/network/command_access_point_private_link_egress_endpoint_describe.go Update egress endpoint describe to renamed wrapper method
internal/network/command_access_point_private_link_egress_endpoint_delete.go Update egress endpoint delete to renamed wrapper methods
internal/network/command_access_point_private_link_egress_endpoint_create.go Update egress endpoint create to renamed wrapper method
internal/network/command_access_point_private_link_egress_endpoint.go Update egress endpoint autocomplete to renamed wrapper method
internal/flink/command_endpoint_use.go Update Flink endpoint validation to renamed PrivateLink attachment list wrapper
internal/flink/command_endpoint_list.go Update Flink endpoint list to renamed PrivateLink attachment list wrapper
internal/login/command_test.go Adjust lint suppression on certificate subject matching line
internal/iam/command_rbac_role_binding_list.go Update IAM role binding list helpers to renamed IAM/SSO wrapper methods
internal/iam/command_provider_update.go Update identity provider update to renamed wrapper method
internal/iam/command_provider_list.go Update identity provider list to renamed wrapper method
internal/iam/command_provider_describe.go Update identity provider describe to renamed wrapper method
internal/iam/command_provider_delete.go Update identity provider delete to renamed wrapper methods
internal/iam/command_provider_create.go Update identity provider create to renamed wrapper method
internal/iam/command_pool_update.go Update identity pool update to renamed wrapper method
internal/iam/command_pool_list.go Update identity pool list to renamed wrapper method
internal/iam/command_pool_describe.go Update identity pool describe to renamed wrapper method
internal/iam/command_pool_delete.go Update identity pool delete to renamed wrapper methods
internal/iam/command_pool_create.go Update identity pool create to renamed wrapper method
internal/iam/command_groupmapping_update.go Update group mapping update to renamed wrapper method
internal/iam/command_groupmapping_list.go Update group mapping list to renamed wrapper method
internal/iam/command_groupmapping_describe.go Update group mapping describe to renamed wrapper method
internal/iam/command_groupmapping_delete.go Update group mapping delete to renamed wrapper methods
internal/iam/command_groupmapping_create.go Update group mapping create to renamed wrapper method
internal/iam/command_certificate_pool_update.go Update certificate pool update to renamed wrapper methods
internal/iam/command_certificate_pool_list.go Update certificate pool list to renamed wrapper method
internal/iam/command_certificate_pool_describe.go Update certificate pool describe to renamed wrapper method
internal/iam/command_certificate_pool_delete.go Update certificate pool delete to renamed wrapper methods
internal/iam/command_certificate_pool_create.go Update certificate pool create to renamed wrapper method
internal/iam/command_certificate_authority_update.go Update certificate authority update to renamed wrapper methods
internal/iam/command_certificate_authority_list.go Update certificate authority list to renamed wrapper method
internal/iam/command_certificate_authority_describe.go Update certificate authority describe to renamed wrapper method
internal/iam/command_certificate_authority_delete.go Update certificate authority delete to renamed wrapper methods
internal/iam/command_certificate_authority_create.go Update certificate authority create to renamed wrapper method
internal/iam/command.go Update IAM resource owner autocomplete to renamed group mapping list wrapper

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

req.True(ok)
req.NotEqual(http.DefaultTransport, transport)
found := slices.ContainsFunc(transport.TLSClientConfig.RootCAs.Subjects(), func(subject []byte) bool { //nolint:staticcheck
found := slices.ContainsFunc(transport.TLSClientConfig.RootCAs.Subjects(), func(subject []byte) bool { //nolint:staticcheck,nolintlint
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The //nolint:...,nolintlint directive disables nolintlint checks for this line, which reduces lint coverage and can hide future issues (e.g., stale/unused //nolint directives). Prefer keeping nolintlint enabled and addressing its complaint directly (e.g., add a brief justification to the staticcheck suppression or remove the suppression if it’s no longer needed).

Suggested change
found := slices.ContainsFunc(transport.TLSClientConfig.RootCAs.Subjects(), func(subject []byte) bool { //nolint:staticcheck,nolintlint
found := slices.ContainsFunc(transport.TLSClientConfig.RootCAs.Subjects(), func(subject []byte) bool { //nolint:staticcheck // use RootCAs.Subjects here to verify the test certificate is present

Copilot uses AI. Check for mistakes.
@sonarqube-confluent
Copy link

@channingdong Channing Dong (channingdong) merged commit 9b604b4 into main Mar 20, 2026
7 checks passed
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.

3 participants