Add the six notifications commands - #3443

Open
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration
Open

Add the six notifications commands#3443
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration

Conversation

@alexfayad

@alexfayadAlexander Fayad (alexfayad) commented Aug 13, 2026

Copy link
Copy Markdown

Release Notes

New Features

  • Add confluent notifications commands for managing notification integrations, subscriptions, resource preferences, resource subscriptions, notification types, and in-app user notifications.

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

Onboards Confluent Cloud Notifications to the CLI. Adds six command groups under confluent notifications: integration, subscription, resource-preference, resource-subscription, notification-type, and user-notification.

The code is generated by cli-terraform-generator from the notifications OpenAPI spec and Go SDK. The commands, the pkg/ccloudv2 wrapper, the test-server handlers, the integration tests, the live tests, and the goldens all come from the generator.

One API-specific workaround is baked in. The related and resource_name sub-fields of the shared GlobalObjectReference are marked required, readOnly, and format: uri in the spec, and the SDK serializes them unconditionally. A create that carried only id sent an empty string for both and Confluent Cloud rejected it with 400 Bad Request. The generated subscription and resource-subscription commands now fill both fields with a placeholder URI on create and update, matching the workaround the published confluent_ksql_cluster Terraform resource already uses.

Confluent Cloud only.

Blast Radius

New commands only. No existing command changes, and nothing outside internal/notifications shares this code. If a notifications command misbehaves, only customers running confluent notifications ... are affected.

References

Test & Review

Built a custom binary and ran the notifications commands against a real Confluent Cloud org. Verified create / describe / list / delete for integration, and create / describe / update / delete for subscription and resource-subscription with a multi-element integrations value, all without the prior 400. Generated integration and live tests are included.

CLI create against real Confluent Cloud (before/after the fix)

Before the fix, related/resource_name went out as a non-URI placeholder and Confluent Cloud rejected the create against the spec's format: uri on /integrations/0/related:

POST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"_","resource_name":"_"}],"notification_type":{"id":"nt-9KD1p","related":"_","resource_name":"_"}}HTTP/2.0 400 Bad Request{"errors":[{"status":"400","code":"1101","title":"Invalid request body","detail":"Invalid Json: Invalid request body","source":{"pointer":"/integrations/0/related"}}]}Error: Invalid Json: Invalid request body

The shipped command fills both fields with a placeholder URI and the create succeeds:

$ confluent notifications subscription create --notification-type nt-9KD1p --integrations i-59wqM --current-state ENABLED -o jsonPOST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}],"notification_type":{"id":"nt-9KD1p","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}}HTTP/2.0 201 Created{ "id": "s-gAXVpd", "notification_type": "nt-9KD1p", "current_state": "ENABLED"}

🤖 Generated with Claude Code

Generated by cli-terraform-generator merge mode from the notifications v1
OpenAPI spec: integration, subscription, resource-preference,
resource-subscription, notification-type, and user-notification, plus their
ccloudv2 wrappers, test-server handlers, integration tests, input fixtures,
output goldens, and live tests.
The integration command's target is a oneOf. Update leaves --kind optional so
an update touching only display-name or description is accepted, and rejects a
variant flag supplied without --kind rather than silently dropping it.
Verified with go build ./..., go vet, and
go test ./test/ -run 'TestCLI/TestNotifications'.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 13, 2026 18:00
@confluent-cla-assistant

confluent-cla-assistantBot commented Aug 13, 2026

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.

CopilotAI 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

This pull request introduces a new top-level notifications command group backed by the Notifications v1 CCloud SDK, adds the corresponding test-server endpoints, and wires in integration/live tests plus golden fixtures to validate CLI behavior.

Changes:

  • Add Notifications v1 API client bootstrap + CRUD/list wrappers in pkg/ccloudv2, and register the client on the shared ccloudv2.Client.
  • Add internal/notifications Cobra command tree (integrations, notification-types, resource-preferences, resource-subscriptions, subscriptions, user-notifications) and register it under the root command.
  • Extend the test server router + handlers, add integration/live tests, and add input/output fixtures + goldens for the new commands.

Reviewed changes

Copilot reviewed 185 out of 211 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
test/test-server/notifications_user_notification_handler.goAdds test-server handlers for user-notifications list/get/patch.
test/test-server/notifications_subscription_handler.goAdds test-server handlers for subscriptions list/create/get/update/delete.
test/test-server/notifications_resource_subscription_handler.goAdds test-server handlers for resource-subscriptions create/get/update/delete.
test/test-server/notifications_resource_preference_handler.goAdds test-server handlers for resource-preferences create/get/update/delete.
test/test-server/notifications_notification_type_handler.goAdds test-server handlers for notification-types list/get.
test/test-server/notifications_integration_handler.goAdds test-server handlers for integrations list/create/get/update/delete.
test/test-server/ccloudv2_router.goRegisters Notifications v1 routes in the test-server router.
test/notifications_user_notification_test.goAdds integration tests for user-notification describe/list/update + autocomplete.
test/notifications_subscription_test.goAdds integration tests for subscription CRUD + autocomplete.
test/notifications_resource_subscription_test.goAdds integration tests for resource-subscription CRUD.
test/notifications_resource_preference_test.goAdds integration tests for resource-preference CRUD.
test/notifications_notification_type_test.goAdds integration tests for notification-type describe/list + autocomplete.
test/notifications_integration_test.goAdds integration tests for integration CRUD + autocomplete.
test/live/notifications_user_notification_live_test.goAdds live CRUD coverage for user-notifications.
test/live/notifications_subscription_live_test.goAdds live CRUD coverage for subscriptions (env-var gated).
test/live/notifications_resource_subscription_live_test.goAdds live CRUD coverage for resource-subscriptions (env-var gated).
test/live/notifications_resource_preference_live_test.goAdds live CRUD coverage for resource-preferences.
test/live/notifications_notification_type_live_test.goAdds live coverage for notification-type list/describe.
test/fixtures/output/notifications/user-notification/update/update-read.goldenAdds golden output for user-notification update (human).
test/fixtures/output/notifications/user-notification/update/update-invalid.goldenAdds golden output for user-notification update (404).
test/fixtures/output/notifications/user-notification/update-help.goldenAdds golden help for user-notification update.
test/fixtures/output/notifications/user-notification/list/list.goldenAdds golden output for user-notification list (human).
test/fixtures/output/notifications/user-notification/list/list-yaml.goldenAdds golden output for user-notification list (yaml).
test/fixtures/output/notifications/user-notification/list/list-type.goldenAdds golden output for user-notification list filtered by type.
test/fixtures/output/notifications/user-notification/list/list-time-range.goldenAdds golden output for user-notification list filtered by time range.
test/fixtures/output/notifications/user-notification/list/list-sort.goldenAdds golden output for user-notification list sorted.
test/fixtures/output/notifications/user-notification/list/list-severity.goldenAdds golden output for user-notification list filtered by severity.
test/fixtures/output/notifications/user-notification/list/list-search.goldenAdds golden output for user-notification list filtered by search.
test/fixtures/output/notifications/user-notification/list/list-read.goldenAdds golden output for user-notification list filtered by read.
test/fixtures/output/notifications/user-notification/list/list-json.goldenAdds golden output for user-notification list (json).
test/fixtures/output/notifications/user-notification/list/list-include.goldenAdds golden output for user-notification list with include fields.
test/fixtures/output/notifications/user-notification/list/list-crn.goldenAdds golden output for user-notification list filtered by CRN.
test/fixtures/output/notifications/user-notification/list-help.goldenAdds golden help for user-notification list.
test/fixtures/output/notifications/user-notification/help.goldenAdds golden help for user-notification command group.
test/fixtures/output/notifications/user-notification/describe/describe.goldenAdds golden output for user-notification describe (human).
test/fixtures/output/notifications/user-notification/describe/describe-yaml.goldenAdds golden output for user-notification describe (yaml).
test/fixtures/output/notifications/user-notification/describe/describe-json.goldenAdds golden output for user-notification describe (json).
test/fixtures/output/notifications/user-notification/describe/describe-invalid.goldenAdds golden output for user-notification describe (404).
test/fixtures/output/notifications/user-notification/describe/describe-autocomplete.goldenAdds golden output for user-notification autocomplete.
test/fixtures/output/notifications/user-notification/describe-help.goldenAdds golden help for user-notification describe.
test/fixtures/output/notifications/subscription/update/update-invalid.goldenAdds golden output for subscription update (404).
test/fixtures/output/notifications/subscription/update/update-integrations.goldenAdds golden output for subscription update integrations (human).
test/fixtures/output/notifications/subscription/update/update-current-state.goldenAdds golden output for subscription update current-state (human).
test/fixtures/output/notifications/subscription/update-help.goldenAdds golden help for subscription update.
test/fixtures/output/notifications/subscription/list/list.goldenAdds golden output for subscription list (human).
test/fixtures/output/notifications/subscription/list/list-yaml.goldenAdds golden output for subscription list (yaml).
test/fixtures/output/notifications/subscription/list/list-json.goldenAdds golden output for subscription list (json).
test/fixtures/output/notifications/subscription/list-help.goldenAdds golden help for subscription list.
test/fixtures/output/notifications/subscription/help.goldenAdds golden help for subscription command group.
test/fixtures/output/notifications/subscription/describe/describe.goldenAdds golden output for subscription describe (human).
test/fixtures/output/notifications/subscription/describe/describe-yaml.goldenAdds golden output for subscription describe (yaml).
test/fixtures/output/notifications/subscription/describe/describe-json.goldenAdds golden output for subscription describe (json).
test/fixtures/output/notifications/subscription/describe/describe-invalid.goldenAdds golden output for subscription describe (404).
test/fixtures/output/notifications/subscription/describe/describe-autocomplete.goldenAdds golden output for subscription describe autocomplete.
test/fixtures/output/notifications/subscription/describe-help.goldenAdds golden help for subscription describe.
test/fixtures/output/notifications/subscription/delete/delete.goldenAdds golden output for subscription delete (force).
test/fixtures/output/notifications/subscription/delete/delete-no-force.goldenAdds golden output for subscription delete (prompt).
test/fixtures/output/notifications/subscription/delete/delete-multiple.goldenAdds golden output for multi-delete subscriptions.
test/fixtures/output/notifications/subscription/delete/delete-invalid.goldenAdds golden output for subscription delete invalid + suggestions.
test/fixtures/output/notifications/subscription/delete/delete-autocomplete.goldenAdds golden output for subscription delete autocomplete.
test/fixtures/output/notifications/subscription/delete-help.goldenAdds golden help for subscription delete.
test/fixtures/output/notifications/subscription/create/create.goldenAdds golden output for subscription create (human).
test/fixtures/output/notifications/subscription/create/create-current-state.goldenAdds golden output for subscription create with current-state.
test/fixtures/output/notifications/subscription/create-help.goldenAdds golden help for subscription create.
test/fixtures/output/notifications/resource-subscription/update/update-resource.goldenAdds golden output for resource-subscription update resource.
test/fixtures/output/notifications/resource-subscription/update/update-resource-type.goldenAdds golden output for resource-subscription update resource-type.
test/fixtures/output/notifications/resource-subscription/update/update-invalid.goldenAdds golden output for resource-subscription update (404).
test/fixtures/output/notifications/resource-subscription/update/update-integrations.goldenAdds golden output for resource-subscription update integrations.
test/fixtures/output/notifications/resource-subscription/update/update-current-state.goldenAdds golden output for resource-subscription update current-state.
test/fixtures/output/notifications/resource-subscription/update-help.goldenAdds golden help for resource-subscription update.
test/fixtures/output/notifications/resource-subscription/help.goldenAdds golden help for resource-subscription command group.
test/fixtures/output/notifications/resource-subscription/describe/describe.goldenAdds golden output for resource-subscription describe (human).
test/fixtures/output/notifications/resource-subscription/describe/describe-yaml.goldenAdds golden output for resource-subscription describe (yaml).
test/fixtures/output/notifications/resource-subscription/describe/describe-json.goldenAdds golden output for resource-subscription describe (json).
test/fixtures/output/notifications/resource-subscription/describe/describe-invalid.goldenAdds golden output for resource-subscription describe (404).
test/fixtures/output/notifications/resource-subscription/describe-help.goldenAdds golden help for resource-subscription describe.
test/fixtures/output/notifications/resource-subscription/delete/delete.goldenAdds golden output for resource-subscription delete (force).
test/fixtures/output/notifications/resource-subscription/delete/delete-no-force.goldenAdds golden output for resource-subscription delete (prompt).
test/fixtures/output/notifications/resource-subscription/delete/delete-multiple.goldenAdds golden output for multi-delete resource-subscriptions.
test/fixtures/output/notifications/resource-subscription/delete/delete-invalid.goldenAdds golden output for resource-subscription delete invalid + suggestions.
test/fixtures/output/notifications/resource-subscription/delete-help.goldenAdds golden help for resource-subscription delete.
test/fixtures/output/notifications/resource-subscription/create/create.goldenAdds golden output for resource-subscription create (human).
test/fixtures/output/notifications/resource-subscription/create/create-current-state.goldenAdds golden output for resource-subscription create with current-state.
test/fixtures/output/notifications/resource-subscription/create-help.goldenAdds golden help for resource-subscription create.
test/fixtures/output/notifications/resource-preference/update/update-resource.goldenAdds golden output for resource-preference update resource.
test/fixtures/output/notifications/resource-preference/update/update-resource-type.goldenAdds golden output for resource-preference update resource-type.
test/fixtures/output/notifications/resource-preference/update/update-invalid.goldenAdds golden output for resource-preference update (404).
test/fixtures/output/notifications/resource-preference/update/update-current-state.goldenAdds golden output for resource-preference update current-state.
test/fixtures/output/notifications/resource-preference/update-help.goldenAdds golden help for resource-preference update.
test/fixtures/output/notifications/resource-preference/help.goldenAdds golden help for resource-preference command group.
test/fixtures/output/notifications/resource-preference/describe/describe.goldenAdds golden output for resource-preference describe (human).
test/fixtures/output/notifications/resource-preference/describe/describe-yaml.goldenAdds golden output for resource-preference describe (yaml).
test/fixtures/output/notifications/resource-preference/describe/describe-json.goldenAdds golden output for resource-preference describe (json).
test/fixtures/output/notifications/resource-preference/describe/describe-invalid.goldenAdds golden output for resource-preference describe (404).
test/fixtures/output/notifications/resource-preference/describe-help.goldenAdds golden help for resource-preference describe.
test/fixtures/output/notifications/resource-preference/delete/delete.goldenAdds golden output for resource-preference delete (force).
test/fixtures/output/notifications/resource-preference/delete/delete-no-force.goldenAdds golden output for resource-preference delete (prompt).
test/fixtures/output/notifications/resource-preference/delete/delete-multiple.goldenAdds golden output for multi-delete resource-preferences.
test/fixtures/output/notifications/resource-preference/delete/delete-invalid.goldenAdds golden output for resource-preference delete invalid + suggestions.
test/fixtures/output/notifications/resource-preference/delete-help.goldenAdds golden help for resource-preference delete.
test/fixtures/output/notifications/resource-preference/create/create.goldenAdds golden output for resource-preference create (human).
test/fixtures/output/notifications/resource-preference/create/create-current-state.goldenAdds golden output for resource-preference create with current-state.
test/fixtures/output/notifications/resource-preference/create-help.goldenAdds golden help for resource-preference create.
test/fixtures/output/notifications/notification-type/list/list.goldenAdds golden output for notification-type list (human).
test/fixtures/output/notifications/notification-type/list/list-yaml.goldenAdds golden output for notification-type list (yaml).
test/fixtures/output/notifications/notification-type/list/list-resource-type.goldenAdds golden output for notification-type list filtered by resource-type.
test/fixtures/output/notifications/notification-type/list/list-json.goldenAdds golden output for notification-type list (json).
test/fixtures/output/notifications/notification-type/list-help.goldenAdds golden help for notification-type list.
test/fixtures/output/notifications/notification-type/help.goldenAdds golden help for notification-type command group.
test/fixtures/output/notifications/notification-type/describe/describe.goldenAdds golden output for notification-type describe (human).
test/fixtures/output/notifications/notification-type/describe/describe-yaml.goldenAdds golden output for notification-type describe (yaml).
test/fixtures/output/notifications/notification-type/describe/describe-json.goldenAdds golden output for notification-type describe (json).
test/fixtures/output/notifications/notification-type/describe/describe-invalid.goldenAdds golden output for notification-type describe (404).
test/fixtures/output/notifications/notification-type/describe/describe-autocomplete.goldenAdds golden output for notification-type autocomplete.
test/fixtures/output/notifications/notification-type/describe-help.goldenAdds golden help for notification-type describe.
test/fixtures/output/notifications/integration/update/update-webhook-target.goldenAdds golden output for integration update webhook target.
test/fixtures/output/notifications/integration/update/update-slack-target.goldenAdds golden output for integration update slack target.
test/fixtures/output/notifications/integration/update/update-ms-teams-target.goldenAdds golden output for integration update MsTeams target.
test/fixtures/output/notifications/integration/update/update-invalid.goldenAdds golden output for integration update (404).
test/fixtures/output/notifications/integration/update/update-display-name.goldenAdds golden output for integration update display-name.
test/fixtures/output/notifications/integration/update/update-description.goldenAdds golden output for integration update description.
test/fixtures/output/notifications/integration/update-help.goldenAdds golden help for integration update.
test/fixtures/output/notifications/integration/list/list.goldenAdds golden output for integration list (human).
test/fixtures/output/notifications/integration/list/list-yaml.goldenAdds golden output for integration list (yaml).
test/fixtures/output/notifications/integration/list/list-json.goldenAdds golden output for integration list (json).
test/fixtures/output/notifications/integration/list-help.goldenAdds golden help for integration list.
test/fixtures/output/notifications/integration/help.goldenAdds golden help for integration command group.
test/fixtures/output/notifications/integration/describe/describe-yaml.goldenAdds golden output for integration describe (yaml).
test/fixtures/output/notifications/integration/describe/describe-webhook-target.goldenAdds golden output for integration describe webhook target.
test/fixtures/output/notifications/integration/describe/describe-user-email-target.goldenAdds golden output for integration describe user-email target.
test/fixtures/output/notifications/integration/describe/describe-slack-target.goldenAdds golden output for integration describe slack target.
test/fixtures/output/notifications/integration/describe/describe-role-email-target.goldenAdds golden output for integration describe role-email target.
test/fixtures/output/notifications/integration/describe/describe-ms-teams-target.goldenAdds golden output for integration describe MsTeams target.
test/fixtures/output/notifications/integration/describe/describe-json.goldenAdds golden output for integration describe (json).
test/fixtures/output/notifications/integration/describe/describe-invalid.goldenAdds golden output for integration describe (404).
test/fixtures/output/notifications/integration/describe/describe-in-app-target.goldenAdds golden output for integration describe in-app target.
test/fixtures/output/notifications/integration/describe/describe-autocomplete.goldenAdds golden output for integration autocomplete.
test/fixtures/output/notifications/integration/describe-help.goldenAdds golden help for integration describe.
test/fixtures/output/notifications/integration/delete/delete.goldenAdds golden output for integration delete (force).
test/fixtures/output/notifications/integration/delete/delete-no-force.goldenAdds golden output for integration delete (prompt).
test/fixtures/output/notifications/integration/delete/delete-multiple.goldenAdds golden output for multi-delete integrations.
test/fixtures/output/notifications/integration/delete/delete-invalid.goldenAdds golden output for integration delete invalid + suggestions.
test/fixtures/output/notifications/integration/delete/delete-autocomplete.goldenAdds golden output for integration delete autocomplete.
test/fixtures/output/notifications/integration/delete-help.goldenAdds golden help for integration delete.
test/fixtures/output/notifications/integration/create/create-webhook-target.goldenAdds golden output for integration create webhook target.
test/fixtures/output/notifications/integration/create/create-slack-target.goldenAdds golden output for integration create slack target.
test/fixtures/output/notifications/integration/create/create-ms-teams-target.goldenAdds golden output for integration create MsTeams target.
test/fixtures/output/notifications/integration/create/create-description.goldenAdds golden output for integration create with description.
test/fixtures/output/notifications/integration/create-help.goldenAdds golden help for integration create.
test/fixtures/output/notifications/help.goldenAdds golden help for top-level notifications command group.
test/fixtures/output/help.goldenAdds the notifications entry to root help golden.
test/fixtures/input/notifications/user-notification/read_created_user_notification.jsonAdds fixture payload for reading user-notifications.
test/fixtures/input/notifications/user-notification/create_user_notification.jsonAdds fixture payload for creating user-notifications.
test/fixtures/input/notifications/subscription/read_created_subscription.jsonAdds fixture payload for reading subscriptions.
test/fixtures/input/notifications/subscription/create_subscription.jsonAdds fixture payload for creating subscriptions.
test/fixtures/input/notifications/resource-subscription/read_created_resource_subscription.jsonAdds fixture payload for reading resource-subscriptions.
test/fixtures/input/notifications/resource-subscription/create_resource_subscription.jsonAdds fixture payload for creating resource-subscriptions.
test/fixtures/input/notifications/resource-preference/read_created_resource_preference.jsonAdds fixture payload for reading resource-preferences.
test/fixtures/input/notifications/resource-preference/create_resource_preference.jsonAdds fixture payload for creating resource-preferences.
test/fixtures/input/notifications/notification-type/read_created_notification_type.jsonAdds fixture payload for reading notification-types.
test/fixtures/input/notifications/notification-type/create_notification_type.jsonAdds fixture payload for creating notification-types.
test/fixtures/input/notifications/integration/read_created_webhook_target.jsonAdds fixture payload for reading webhook integration targets.
test/fixtures/input/notifications/integration/read_created_user_email_target.jsonAdds fixture payload for reading user-email integration targets.
test/fixtures/input/notifications/integration/read_created_slack_target.jsonAdds fixture payload for reading slack integration targets.
test/fixtures/input/notifications/integration/read_created_role_email_target.jsonAdds fixture payload for reading role-email integration targets.
test/fixtures/input/notifications/integration/read_created_ms_teams_target.jsonAdds fixture payload for reading MsTeams integration targets.
test/fixtures/input/notifications/integration/read_created_in_app_target.jsonAdds fixture payload for reading in-app integration targets.
test/fixtures/input/notifications/integration/create_webhook_target.jsonAdds fixture payload for creating webhook integration targets.
test/fixtures/input/notifications/integration/create_user_email_target.jsonAdds fixture payload for creating user-email integration targets.
test/fixtures/input/notifications/integration/create_slack_target.jsonAdds fixture payload for creating slack integration targets.
test/fixtures/input/notifications/integration/create_role_email_target.jsonAdds fixture payload for creating role-email integration targets.
test/fixtures/input/notifications/integration/create_ms_teams_target.jsonAdds fixture payload for creating MsTeams integration targets.
test/fixtures/input/notifications/integration/create_in_app_target.jsonAdds fixture payload for creating in-app integration targets.
pkg/ccloudv2/notifications.goAdds Notifications v1 client + wrapper methods for CRUD/list operations.
pkg/ccloudv2/client.goRegisters NotificationsClient on the shared CCloud v2 client.
internal/notifications/command.goAdds the top-level notifications command and subcommand registration.
internal/notifications/command_user_notification.goAdds user-notification command group, output formatting, and autocomplete.
internal/notifications/command_user_notification_update.goAdds user-notification update command + --read support.
internal/notifications/command_user_notification_list.goAdds user-notification list command + filtering flags.
internal/notifications/command_user_notification_describe.goAdds user-notification describe command.
internal/notifications/command_subscription.goAdds subscription command group, output formatting, and autocomplete.
internal/notifications/command_subscription_update.goAdds subscription update command + flags.
internal/notifications/command_subscription_list.goAdds subscription list command.
internal/notifications/command_subscription_describe.goAdds subscription describe command.
internal/notifications/command_subscription_delete.goAdds subscription delete (multi-delete) using shared deletion helpers.
internal/notifications/command_subscription_create.goAdds subscription create command + flags.
internal/notifications/command_resource_subscription.goAdds resource-subscription command group + output formatting.
internal/notifications/command_resource_subscription_update.goAdds resource-subscription update command + flags.
internal/notifications/command_resource_subscription_describe.goAdds resource-subscription describe command.
internal/notifications/command_resource_subscription_delete.goAdds resource-subscription delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_subscription_create.goAdds resource-subscription create command + flags.
internal/notifications/command_resource_preference.goAdds resource-preference command group + output formatting.
internal/notifications/command_resource_preference_update.goAdds resource-preference update command + flags.
internal/notifications/command_resource_preference_describe.goAdds resource-preference describe command.
internal/notifications/command_resource_preference_delete.goAdds resource-preference delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_preference_create.goAdds resource-preference create command + flags.
internal/notifications/command_notification_type.goAdds notification-type command group + output formatting + autocomplete.
internal/notifications/command_notification_type_list.goAdds notification-type list command + filter flag.
internal/notifications/command_notification_type_describe.goAdds notification-type describe command.
internal/notifications/command_integration.goAdds integration command group + output formatting + autocomplete.
internal/notifications/command_integration_update.goAdds integration update command + target-kind handling.
internal/notifications/command_integration_list.goAdds integration list command.
internal/notifications/command_integration_describe.goAdds integration describe command.
internal/notifications/command_integration_delete.goAdds integration delete (multi-delete) using deletion helpers.
internal/notifications/command_integration_create.goAdds integration create command + target-kind handling.
internal/command.goRegisters notifications under the root command.
go.sumAdds checksums for the notifications internal SDK module.
go.modAdds dependency on github.com/confluentinc/ccloud-sdk-go-v2-internal/notifications.
cmd/lint/main.goExtends spellcheck vocabulary for new notifications-related terms.
.cli-generation-checksumUpdates generator checksum to reflect regenerated sources.
Files not reviewed (25)
  • internal/notifications/command.go: Generated file
  • internal/notifications/command_integration.go: Generated file
  • internal/notifications/command_integration_create.go: Generated file
  • internal/notifications/command_integration_delete.go: Generated file
  • internal/notifications/command_integration_describe.go: Generated file
  • internal/notifications/command_integration_list.go: Generated file
  • internal/notifications/command_integration_update.go: Generated file
  • internal/notifications/command_notification_type.go: Generated file
  • internal/notifications/command_notification_type_describe.go: Generated file
  • internal/notifications/command_notification_type_list.go: Generated file
  • internal/notifications/command_resource_preference.go: Generated file
  • internal/notifications/command_resource_preference_create.go: Generated file
  • internal/notifications/command_resource_preference_delete.go: Generated file
  • internal/notifications/command_resource_preference_describe.go: Generated file
  • internal/notifications/command_resource_preference_update.go: Generated file
  • internal/notifications/command_resource_subscription.go: Generated file
  • internal/notifications/command_resource_subscription_create.go: Generated file
  • internal/notifications/command_resource_subscription_delete.go: Generated file
  • internal/notifications/command_resource_subscription_describe.go: Generated file
  • internal/notifications/command_resource_subscription_update.go: Generated file
  • internal/notifications/command_subscription.go: Generated file
  • internal/notifications/command_subscription_create.go: Generated file
  • internal/notifications/command_subscription_delete.go: Generated file
  • internal/notifications/command_subscription_describe.go: Generated file
  • internal/notifications/command_subscription_list.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadinternal/notifications/command_subscription_create.go Outdated
Comment threadinternal/notifications/command_subscription_update.go Outdated
Comment threadinternal/notifications/command_integration_create.go
Comment threadinternal/notifications/command_integration_update.go
Comment threadinternal/notifications/command_resource_subscription_create.go Outdated
Comment threadcmd/lint/main.go Outdated
Comment threadinternal/notifications/command_resource_subscription_update.go Outdated
Two files conflicted.
test/fixtures/output/help.golden: main renamed `unified-stream-manager` to
`usm`, which shortened cobra's longest command name and re-padded every line in
the Available Commands block. Took main's block and regenerated the golden with
`go test ./test -run TestCLI/TestHelp -update`, which re-added the
notifications line at the new padding.
.cli-generation-checksum: main carries the flink region suite's value, this
branch carries notifications'. Kept this branch's. The file records the
last-generated suite only and drives PR labeling, so neither value is a drift
signal.
go build ./... and go test ./test -run TestCLI/TestNotifications both pass on
the merge result.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Picks up cli-terraform-generator's allow-list remedy fix. Eight stringSlice
flags now carry the CLI's own comma-separated-list wording instead of the
spec's HTTP-shape prose, the notifications parent command's Short registers
"Cloud Notifications", and one capitalized common noun is fixed in the spec.
Removes "Integrations" from properNouns: it was registered by an earlier merge
to satisfy one flag's help text, and RequireCapitalizeProperNouns then mandated
that capitalization across the whole CLI, failing three descriptions in
`confluent provider-integration`. "recieve" goes with the spec typo it covered.
`make lint-cli` passes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@airlock-confluentinc
airlock-confluentincBotforce-pushed the onboard-notifications-integration branch from 8d059d9 to ccc3483CompareAugust 14, 2026 16:26
ccloud-sdk-go-v2/notifications v0.1.0 is published, so the six commands and
their test-server handlers import it instead of the -internal path. The Alpine
docker build runs go build in a container with no GitHub credentials and the
repo carries no vendor/, so a private module cannot resolve there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

A list command's -o json output is a JSON array, not an object, so
Unmarshal into a map failed and fell through to the table-fallback
path, which grabbed the ASCII separator row as a fake id. Try an
array first and pull the id from its first element; fall back to a
plain object for describe-style output. Drop the table-parsing path
entirely — every CaptureID call site pairs with -o json now.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…r fixes
The last merge predated several generator-side fixes: the zeroCheck
replacement for optional StringSlice query params (a []string flag
never reads as a literal nil, so severity/resource-type/resource-crn/
sort filters were always sent even when unset), the switch from a
literal {id} placeholder to the spec's own example values in create/
update test args, and the List-before-Describe reordering plus -o
json request on every live-test List step used for ID capture.
Regenerated command/wrapper/test-server/fixture/golden files for
Integration, Subscription, ResourcePreference, ResourceSubscription,
NotificationType, and UserNotification.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nds to pick up objectref_write_placeholders
An array-valued ObjectReference field (integrations) built each element
as {Id: id} only, leaving the SDK's required related/resource_name
fields as empty strings on the wire. The real API rejects that with a
400. cli.objectref_write_placeholders already covered the scalar
notification_type case; this regeneration picks up the generator-side
fix that ported the same placeholder injection into the array-building
loops of create and update.
Regenerated Subscription and ResourceSubscription via cli-tfgen
--official-sdk to avoid a local SDK replace directive in go.mod.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

Sign up for freeto 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

@alexfayad
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Add the six notifications commands - #3443

Open
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration
Open

Add the six notifications commands#3443
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration

Conversation

@alexfayad

@alexfayadAlexander Fayad (alexfayad) commented Aug 13, 2026

Copy link
Copy Markdown

Release Notes

New Features

  • Add confluent notifications commands for managing notification integrations, subscriptions, resource preferences, resource subscriptions, notification types, and in-app user notifications.

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

Onboards Confluent Cloud Notifications to the CLI. Adds six command groups under confluent notifications: integration, subscription, resource-preference, resource-subscription, notification-type, and user-notification.

The code is generated by cli-terraform-generator from the notifications OpenAPI spec and Go SDK. The commands, the pkg/ccloudv2 wrapper, the test-server handlers, the integration tests, the live tests, and the goldens all come from the generator.

One API-specific workaround is baked in. The related and resource_name sub-fields of the shared GlobalObjectReference are marked required, readOnly, and format: uri in the spec, and the SDK serializes them unconditionally. A create that carried only id sent an empty string for both and Confluent Cloud rejected it with 400 Bad Request. The generated subscription and resource-subscription commands now fill both fields with a placeholder URI on create and update, matching the workaround the published confluent_ksql_cluster Terraform resource already uses.

Confluent Cloud only.

Blast Radius

New commands only. No existing command changes, and nothing outside internal/notifications shares this code. If a notifications command misbehaves, only customers running confluent notifications ... are affected.

References

Test & Review

Built a custom binary and ran the notifications commands against a real Confluent Cloud org. Verified create / describe / list / delete for integration, and create / describe / update / delete for subscription and resource-subscription with a multi-element integrations value, all without the prior 400. Generated integration and live tests are included.

CLI create against real Confluent Cloud (before/after the fix)

Before the fix, related/resource_name went out as a non-URI placeholder and Confluent Cloud rejected the create against the spec's format: uri on /integrations/0/related:

POST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"_","resource_name":"_"}],"notification_type":{"id":"nt-9KD1p","related":"_","resource_name":"_"}}HTTP/2.0 400 Bad Request{"errors":[{"status":"400","code":"1101","title":"Invalid request body","detail":"Invalid Json: Invalid request body","source":{"pointer":"/integrations/0/related"}}]}Error: Invalid Json: Invalid request body

The shipped command fills both fields with a placeholder URI and the create succeeds:

$ confluent notifications subscription create --notification-type nt-9KD1p --integrations i-59wqM --current-state ENABLED -o jsonPOST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}],"notification_type":{"id":"nt-9KD1p","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}}HTTP/2.0 201 Created{ "id": "s-gAXVpd", "notification_type": "nt-9KD1p", "current_state": "ENABLED"}

🤖 Generated with Claude Code

Generated by cli-terraform-generator merge mode from the notifications v1
OpenAPI spec: integration, subscription, resource-preference,
resource-subscription, notification-type, and user-notification, plus their
ccloudv2 wrappers, test-server handlers, integration tests, input fixtures,
output goldens, and live tests.
The integration command's target is a oneOf. Update leaves --kind optional so
an update touching only display-name or description is accepted, and rejects a
variant flag supplied without --kind rather than silently dropping it.
Verified with go build ./..., go vet, and
go test ./test/ -run 'TestCLI/TestNotifications'.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 13, 2026 18:00
@confluent-cla-assistant

confluent-cla-assistantBot commented Aug 13, 2026

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.

CopilotAI 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

This pull request introduces a new top-level notifications command group backed by the Notifications v1 CCloud SDK, adds the corresponding test-server endpoints, and wires in integration/live tests plus golden fixtures to validate CLI behavior.

Changes:

  • Add Notifications v1 API client bootstrap + CRUD/list wrappers in pkg/ccloudv2, and register the client on the shared ccloudv2.Client.
  • Add internal/notifications Cobra command tree (integrations, notification-types, resource-preferences, resource-subscriptions, subscriptions, user-notifications) and register it under the root command.
  • Extend the test server router + handlers, add integration/live tests, and add input/output fixtures + goldens for the new commands.

Reviewed changes

Copilot reviewed 185 out of 211 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
test/test-server/notifications_user_notification_handler.goAdds test-server handlers for user-notifications list/get/patch.
test/test-server/notifications_subscription_handler.goAdds test-server handlers for subscriptions list/create/get/update/delete.
test/test-server/notifications_resource_subscription_handler.goAdds test-server handlers for resource-subscriptions create/get/update/delete.
test/test-server/notifications_resource_preference_handler.goAdds test-server handlers for resource-preferences create/get/update/delete.
test/test-server/notifications_notification_type_handler.goAdds test-server handlers for notification-types list/get.
test/test-server/notifications_integration_handler.goAdds test-server handlers for integrations list/create/get/update/delete.
test/test-server/ccloudv2_router.goRegisters Notifications v1 routes in the test-server router.
test/notifications_user_notification_test.goAdds integration tests for user-notification describe/list/update + autocomplete.
test/notifications_subscription_test.goAdds integration tests for subscription CRUD + autocomplete.
test/notifications_resource_subscription_test.goAdds integration tests for resource-subscription CRUD.
test/notifications_resource_preference_test.goAdds integration tests for resource-preference CRUD.
test/notifications_notification_type_test.goAdds integration tests for notification-type describe/list + autocomplete.
test/notifications_integration_test.goAdds integration tests for integration CRUD + autocomplete.
test/live/notifications_user_notification_live_test.goAdds live CRUD coverage for user-notifications.
test/live/notifications_subscription_live_test.goAdds live CRUD coverage for subscriptions (env-var gated).
test/live/notifications_resource_subscription_live_test.goAdds live CRUD coverage for resource-subscriptions (env-var gated).
test/live/notifications_resource_preference_live_test.goAdds live CRUD coverage for resource-preferences.
test/live/notifications_notification_type_live_test.goAdds live coverage for notification-type list/describe.
test/fixtures/output/notifications/user-notification/update/update-read.goldenAdds golden output for user-notification update (human).
test/fixtures/output/notifications/user-notification/update/update-invalid.goldenAdds golden output for user-notification update (404).
test/fixtures/output/notifications/user-notification/update-help.goldenAdds golden help for user-notification update.
test/fixtures/output/notifications/user-notification/list/list.goldenAdds golden output for user-notification list (human).
test/fixtures/output/notifications/user-notification/list/list-yaml.goldenAdds golden output for user-notification list (yaml).
test/fixtures/output/notifications/user-notification/list/list-type.goldenAdds golden output for user-notification list filtered by type.
test/fixtures/output/notifications/user-notification/list/list-time-range.goldenAdds golden output for user-notification list filtered by time range.
test/fixtures/output/notifications/user-notification/list/list-sort.goldenAdds golden output for user-notification list sorted.
test/fixtures/output/notifications/user-notification/list/list-severity.goldenAdds golden output for user-notification list filtered by severity.
test/fixtures/output/notifications/user-notification/list/list-search.goldenAdds golden output for user-notification list filtered by search.
test/fixtures/output/notifications/user-notification/list/list-read.goldenAdds golden output for user-notification list filtered by read.
test/fixtures/output/notifications/user-notification/list/list-json.goldenAdds golden output for user-notification list (json).
test/fixtures/output/notifications/user-notification/list/list-include.goldenAdds golden output for user-notification list with include fields.
test/fixtures/output/notifications/user-notification/list/list-crn.goldenAdds golden output for user-notification list filtered by CRN.
test/fixtures/output/notifications/user-notification/list-help.goldenAdds golden help for user-notification list.
test/fixtures/output/notifications/user-notification/help.goldenAdds golden help for user-notification command group.
test/fixtures/output/notifications/user-notification/describe/describe.goldenAdds golden output for user-notification describe (human).
test/fixtures/output/notifications/user-notification/describe/describe-yaml.goldenAdds golden output for user-notification describe (yaml).
test/fixtures/output/notifications/user-notification/describe/describe-json.goldenAdds golden output for user-notification describe (json).
test/fixtures/output/notifications/user-notification/describe/describe-invalid.goldenAdds golden output for user-notification describe (404).
test/fixtures/output/notifications/user-notification/describe/describe-autocomplete.goldenAdds golden output for user-notification autocomplete.
test/fixtures/output/notifications/user-notification/describe-help.goldenAdds golden help for user-notification describe.
test/fixtures/output/notifications/subscription/update/update-invalid.goldenAdds golden output for subscription update (404).
test/fixtures/output/notifications/subscription/update/update-integrations.goldenAdds golden output for subscription update integrations (human).
test/fixtures/output/notifications/subscription/update/update-current-state.goldenAdds golden output for subscription update current-state (human).
test/fixtures/output/notifications/subscription/update-help.goldenAdds golden help for subscription update.
test/fixtures/output/notifications/subscription/list/list.goldenAdds golden output for subscription list (human).
test/fixtures/output/notifications/subscription/list/list-yaml.goldenAdds golden output for subscription list (yaml).
test/fixtures/output/notifications/subscription/list/list-json.goldenAdds golden output for subscription list (json).
test/fixtures/output/notifications/subscription/list-help.goldenAdds golden help for subscription list.
test/fixtures/output/notifications/subscription/help.goldenAdds golden help for subscription command group.
test/fixtures/output/notifications/subscription/describe/describe.goldenAdds golden output for subscription describe (human).
test/fixtures/output/notifications/subscription/describe/describe-yaml.goldenAdds golden output for subscription describe (yaml).
test/fixtures/output/notifications/subscription/describe/describe-json.goldenAdds golden output for subscription describe (json).
test/fixtures/output/notifications/subscription/describe/describe-invalid.goldenAdds golden output for subscription describe (404).
test/fixtures/output/notifications/subscription/describe/describe-autocomplete.goldenAdds golden output for subscription describe autocomplete.
test/fixtures/output/notifications/subscription/describe-help.goldenAdds golden help for subscription describe.
test/fixtures/output/notifications/subscription/delete/delete.goldenAdds golden output for subscription delete (force).
test/fixtures/output/notifications/subscription/delete/delete-no-force.goldenAdds golden output for subscription delete (prompt).
test/fixtures/output/notifications/subscription/delete/delete-multiple.goldenAdds golden output for multi-delete subscriptions.
test/fixtures/output/notifications/subscription/delete/delete-invalid.goldenAdds golden output for subscription delete invalid + suggestions.
test/fixtures/output/notifications/subscription/delete/delete-autocomplete.goldenAdds golden output for subscription delete autocomplete.
test/fixtures/output/notifications/subscription/delete-help.goldenAdds golden help for subscription delete.
test/fixtures/output/notifications/subscription/create/create.goldenAdds golden output for subscription create (human).
test/fixtures/output/notifications/subscription/create/create-current-state.goldenAdds golden output for subscription create with current-state.
test/fixtures/output/notifications/subscription/create-help.goldenAdds golden help for subscription create.
test/fixtures/output/notifications/resource-subscription/update/update-resource.goldenAdds golden output for resource-subscription update resource.
test/fixtures/output/notifications/resource-subscription/update/update-resource-type.goldenAdds golden output for resource-subscription update resource-type.
test/fixtures/output/notifications/resource-subscription/update/update-invalid.goldenAdds golden output for resource-subscription update (404).
test/fixtures/output/notifications/resource-subscription/update/update-integrations.goldenAdds golden output for resource-subscription update integrations.
test/fixtures/output/notifications/resource-subscription/update/update-current-state.goldenAdds golden output for resource-subscription update current-state.
test/fixtures/output/notifications/resource-subscription/update-help.goldenAdds golden help for resource-subscription update.
test/fixtures/output/notifications/resource-subscription/help.goldenAdds golden help for resource-subscription command group.
test/fixtures/output/notifications/resource-subscription/describe/describe.goldenAdds golden output for resource-subscription describe (human).
test/fixtures/output/notifications/resource-subscription/describe/describe-yaml.goldenAdds golden output for resource-subscription describe (yaml).
test/fixtures/output/notifications/resource-subscription/describe/describe-json.goldenAdds golden output for resource-subscription describe (json).
test/fixtures/output/notifications/resource-subscription/describe/describe-invalid.goldenAdds golden output for resource-subscription describe (404).
test/fixtures/output/notifications/resource-subscription/describe-help.goldenAdds golden help for resource-subscription describe.
test/fixtures/output/notifications/resource-subscription/delete/delete.goldenAdds golden output for resource-subscription delete (force).
test/fixtures/output/notifications/resource-subscription/delete/delete-no-force.goldenAdds golden output for resource-subscription delete (prompt).
test/fixtures/output/notifications/resource-subscription/delete/delete-multiple.goldenAdds golden output for multi-delete resource-subscriptions.
test/fixtures/output/notifications/resource-subscription/delete/delete-invalid.goldenAdds golden output for resource-subscription delete invalid + suggestions.
test/fixtures/output/notifications/resource-subscription/delete-help.goldenAdds golden help for resource-subscription delete.
test/fixtures/output/notifications/resource-subscription/create/create.goldenAdds golden output for resource-subscription create (human).
test/fixtures/output/notifications/resource-subscription/create/create-current-state.goldenAdds golden output for resource-subscription create with current-state.
test/fixtures/output/notifications/resource-subscription/create-help.goldenAdds golden help for resource-subscription create.
test/fixtures/output/notifications/resource-preference/update/update-resource.goldenAdds golden output for resource-preference update resource.
test/fixtures/output/notifications/resource-preference/update/update-resource-type.goldenAdds golden output for resource-preference update resource-type.
test/fixtures/output/notifications/resource-preference/update/update-invalid.goldenAdds golden output for resource-preference update (404).
test/fixtures/output/notifications/resource-preference/update/update-current-state.goldenAdds golden output for resource-preference update current-state.
test/fixtures/output/notifications/resource-preference/update-help.goldenAdds golden help for resource-preference update.
test/fixtures/output/notifications/resource-preference/help.goldenAdds golden help for resource-preference command group.
test/fixtures/output/notifications/resource-preference/describe/describe.goldenAdds golden output for resource-preference describe (human).
test/fixtures/output/notifications/resource-preference/describe/describe-yaml.goldenAdds golden output for resource-preference describe (yaml).
test/fixtures/output/notifications/resource-preference/describe/describe-json.goldenAdds golden output for resource-preference describe (json).
test/fixtures/output/notifications/resource-preference/describe/describe-invalid.goldenAdds golden output for resource-preference describe (404).
test/fixtures/output/notifications/resource-preference/describe-help.goldenAdds golden help for resource-preference describe.
test/fixtures/output/notifications/resource-preference/delete/delete.goldenAdds golden output for resource-preference delete (force).
test/fixtures/output/notifications/resource-preference/delete/delete-no-force.goldenAdds golden output for resource-preference delete (prompt).
test/fixtures/output/notifications/resource-preference/delete/delete-multiple.goldenAdds golden output for multi-delete resource-preferences.
test/fixtures/output/notifications/resource-preference/delete/delete-invalid.goldenAdds golden output for resource-preference delete invalid + suggestions.
test/fixtures/output/notifications/resource-preference/delete-help.goldenAdds golden help for resource-preference delete.
test/fixtures/output/notifications/resource-preference/create/create.goldenAdds golden output for resource-preference create (human).
test/fixtures/output/notifications/resource-preference/create/create-current-state.goldenAdds golden output for resource-preference create with current-state.
test/fixtures/output/notifications/resource-preference/create-help.goldenAdds golden help for resource-preference create.
test/fixtures/output/notifications/notification-type/list/list.goldenAdds golden output for notification-type list (human).
test/fixtures/output/notifications/notification-type/list/list-yaml.goldenAdds golden output for notification-type list (yaml).
test/fixtures/output/notifications/notification-type/list/list-resource-type.goldenAdds golden output for notification-type list filtered by resource-type.
test/fixtures/output/notifications/notification-type/list/list-json.goldenAdds golden output for notification-type list (json).
test/fixtures/output/notifications/notification-type/list-help.goldenAdds golden help for notification-type list.
test/fixtures/output/notifications/notification-type/help.goldenAdds golden help for notification-type command group.
test/fixtures/output/notifications/notification-type/describe/describe.goldenAdds golden output for notification-type describe (human).
test/fixtures/output/notifications/notification-type/describe/describe-yaml.goldenAdds golden output for notification-type describe (yaml).
test/fixtures/output/notifications/notification-type/describe/describe-json.goldenAdds golden output for notification-type describe (json).
test/fixtures/output/notifications/notification-type/describe/describe-invalid.goldenAdds golden output for notification-type describe (404).
test/fixtures/output/notifications/notification-type/describe/describe-autocomplete.goldenAdds golden output for notification-type autocomplete.
test/fixtures/output/notifications/notification-type/describe-help.goldenAdds golden help for notification-type describe.
test/fixtures/output/notifications/integration/update/update-webhook-target.goldenAdds golden output for integration update webhook target.
test/fixtures/output/notifications/integration/update/update-slack-target.goldenAdds golden output for integration update slack target.
test/fixtures/output/notifications/integration/update/update-ms-teams-target.goldenAdds golden output for integration update MsTeams target.
test/fixtures/output/notifications/integration/update/update-invalid.goldenAdds golden output for integration update (404).
test/fixtures/output/notifications/integration/update/update-display-name.goldenAdds golden output for integration update display-name.
test/fixtures/output/notifications/integration/update/update-description.goldenAdds golden output for integration update description.
test/fixtures/output/notifications/integration/update-help.goldenAdds golden help for integration update.
test/fixtures/output/notifications/integration/list/list.goldenAdds golden output for integration list (human).
test/fixtures/output/notifications/integration/list/list-yaml.goldenAdds golden output for integration list (yaml).
test/fixtures/output/notifications/integration/list/list-json.goldenAdds golden output for integration list (json).
test/fixtures/output/notifications/integration/list-help.goldenAdds golden help for integration list.
test/fixtures/output/notifications/integration/help.goldenAdds golden help for integration command group.
test/fixtures/output/notifications/integration/describe/describe-yaml.goldenAdds golden output for integration describe (yaml).
test/fixtures/output/notifications/integration/describe/describe-webhook-target.goldenAdds golden output for integration describe webhook target.
test/fixtures/output/notifications/integration/describe/describe-user-email-target.goldenAdds golden output for integration describe user-email target.
test/fixtures/output/notifications/integration/describe/describe-slack-target.goldenAdds golden output for integration describe slack target.
test/fixtures/output/notifications/integration/describe/describe-role-email-target.goldenAdds golden output for integration describe role-email target.
test/fixtures/output/notifications/integration/describe/describe-ms-teams-target.goldenAdds golden output for integration describe MsTeams target.
test/fixtures/output/notifications/integration/describe/describe-json.goldenAdds golden output for integration describe (json).
test/fixtures/output/notifications/integration/describe/describe-invalid.goldenAdds golden output for integration describe (404).
test/fixtures/output/notifications/integration/describe/describe-in-app-target.goldenAdds golden output for integration describe in-app target.
test/fixtures/output/notifications/integration/describe/describe-autocomplete.goldenAdds golden output for integration autocomplete.
test/fixtures/output/notifications/integration/describe-help.goldenAdds golden help for integration describe.
test/fixtures/output/notifications/integration/delete/delete.goldenAdds golden output for integration delete (force).
test/fixtures/output/notifications/integration/delete/delete-no-force.goldenAdds golden output for integration delete (prompt).
test/fixtures/output/notifications/integration/delete/delete-multiple.goldenAdds golden output for multi-delete integrations.
test/fixtures/output/notifications/integration/delete/delete-invalid.goldenAdds golden output for integration delete invalid + suggestions.
test/fixtures/output/notifications/integration/delete/delete-autocomplete.goldenAdds golden output for integration delete autocomplete.
test/fixtures/output/notifications/integration/delete-help.goldenAdds golden help for integration delete.
test/fixtures/output/notifications/integration/create/create-webhook-target.goldenAdds golden output for integration create webhook target.
test/fixtures/output/notifications/integration/create/create-slack-target.goldenAdds golden output for integration create slack target.
test/fixtures/output/notifications/integration/create/create-ms-teams-target.goldenAdds golden output for integration create MsTeams target.
test/fixtures/output/notifications/integration/create/create-description.goldenAdds golden output for integration create with description.
test/fixtures/output/notifications/integration/create-help.goldenAdds golden help for integration create.
test/fixtures/output/notifications/help.goldenAdds golden help for top-level notifications command group.
test/fixtures/output/help.goldenAdds the notifications entry to root help golden.
test/fixtures/input/notifications/user-notification/read_created_user_notification.jsonAdds fixture payload for reading user-notifications.
test/fixtures/input/notifications/user-notification/create_user_notification.jsonAdds fixture payload for creating user-notifications.
test/fixtures/input/notifications/subscription/read_created_subscription.jsonAdds fixture payload for reading subscriptions.
test/fixtures/input/notifications/subscription/create_subscription.jsonAdds fixture payload for creating subscriptions.
test/fixtures/input/notifications/resource-subscription/read_created_resource_subscription.jsonAdds fixture payload for reading resource-subscriptions.
test/fixtures/input/notifications/resource-subscription/create_resource_subscription.jsonAdds fixture payload for creating resource-subscriptions.
test/fixtures/input/notifications/resource-preference/read_created_resource_preference.jsonAdds fixture payload for reading resource-preferences.
test/fixtures/input/notifications/resource-preference/create_resource_preference.jsonAdds fixture payload for creating resource-preferences.
test/fixtures/input/notifications/notification-type/read_created_notification_type.jsonAdds fixture payload for reading notification-types.
test/fixtures/input/notifications/notification-type/create_notification_type.jsonAdds fixture payload for creating notification-types.
test/fixtures/input/notifications/integration/read_created_webhook_target.jsonAdds fixture payload for reading webhook integration targets.
test/fixtures/input/notifications/integration/read_created_user_email_target.jsonAdds fixture payload for reading user-email integration targets.
test/fixtures/input/notifications/integration/read_created_slack_target.jsonAdds fixture payload for reading slack integration targets.
test/fixtures/input/notifications/integration/read_created_role_email_target.jsonAdds fixture payload for reading role-email integration targets.
test/fixtures/input/notifications/integration/read_created_ms_teams_target.jsonAdds fixture payload for reading MsTeams integration targets.
test/fixtures/input/notifications/integration/read_created_in_app_target.jsonAdds fixture payload for reading in-app integration targets.
test/fixtures/input/notifications/integration/create_webhook_target.jsonAdds fixture payload for creating webhook integration targets.
test/fixtures/input/notifications/integration/create_user_email_target.jsonAdds fixture payload for creating user-email integration targets.
test/fixtures/input/notifications/integration/create_slack_target.jsonAdds fixture payload for creating slack integration targets.
test/fixtures/input/notifications/integration/create_role_email_target.jsonAdds fixture payload for creating role-email integration targets.
test/fixtures/input/notifications/integration/create_ms_teams_target.jsonAdds fixture payload for creating MsTeams integration targets.
test/fixtures/input/notifications/integration/create_in_app_target.jsonAdds fixture payload for creating in-app integration targets.
pkg/ccloudv2/notifications.goAdds Notifications v1 client + wrapper methods for CRUD/list operations.
pkg/ccloudv2/client.goRegisters NotificationsClient on the shared CCloud v2 client.
internal/notifications/command.goAdds the top-level notifications command and subcommand registration.
internal/notifications/command_user_notification.goAdds user-notification command group, output formatting, and autocomplete.
internal/notifications/command_user_notification_update.goAdds user-notification update command + --read support.
internal/notifications/command_user_notification_list.goAdds user-notification list command + filtering flags.
internal/notifications/command_user_notification_describe.goAdds user-notification describe command.
internal/notifications/command_subscription.goAdds subscription command group, output formatting, and autocomplete.
internal/notifications/command_subscription_update.goAdds subscription update command + flags.
internal/notifications/command_subscription_list.goAdds subscription list command.
internal/notifications/command_subscription_describe.goAdds subscription describe command.
internal/notifications/command_subscription_delete.goAdds subscription delete (multi-delete) using shared deletion helpers.
internal/notifications/command_subscription_create.goAdds subscription create command + flags.
internal/notifications/command_resource_subscription.goAdds resource-subscription command group + output formatting.
internal/notifications/command_resource_subscription_update.goAdds resource-subscription update command + flags.
internal/notifications/command_resource_subscription_describe.goAdds resource-subscription describe command.
internal/notifications/command_resource_subscription_delete.goAdds resource-subscription delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_subscription_create.goAdds resource-subscription create command + flags.
internal/notifications/command_resource_preference.goAdds resource-preference command group + output formatting.
internal/notifications/command_resource_preference_update.goAdds resource-preference update command + flags.
internal/notifications/command_resource_preference_describe.goAdds resource-preference describe command.
internal/notifications/command_resource_preference_delete.goAdds resource-preference delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_preference_create.goAdds resource-preference create command + flags.
internal/notifications/command_notification_type.goAdds notification-type command group + output formatting + autocomplete.
internal/notifications/command_notification_type_list.goAdds notification-type list command + filter flag.
internal/notifications/command_notification_type_describe.goAdds notification-type describe command.
internal/notifications/command_integration.goAdds integration command group + output formatting + autocomplete.
internal/notifications/command_integration_update.goAdds integration update command + target-kind handling.
internal/notifications/command_integration_list.goAdds integration list command.
internal/notifications/command_integration_describe.goAdds integration describe command.
internal/notifications/command_integration_delete.goAdds integration delete (multi-delete) using deletion helpers.
internal/notifications/command_integration_create.goAdds integration create command + target-kind handling.
internal/command.goRegisters notifications under the root command.
go.sumAdds checksums for the notifications internal SDK module.
go.modAdds dependency on github.com/confluentinc/ccloud-sdk-go-v2-internal/notifications.
cmd/lint/main.goExtends spellcheck vocabulary for new notifications-related terms.
.cli-generation-checksumUpdates generator checksum to reflect regenerated sources.
Files not reviewed (25)
  • internal/notifications/command.go: Generated file
  • internal/notifications/command_integration.go: Generated file
  • internal/notifications/command_integration_create.go: Generated file
  • internal/notifications/command_integration_delete.go: Generated file
  • internal/notifications/command_integration_describe.go: Generated file
  • internal/notifications/command_integration_list.go: Generated file
  • internal/notifications/command_integration_update.go: Generated file
  • internal/notifications/command_notification_type.go: Generated file
  • internal/notifications/command_notification_type_describe.go: Generated file
  • internal/notifications/command_notification_type_list.go: Generated file
  • internal/notifications/command_resource_preference.go: Generated file
  • internal/notifications/command_resource_preference_create.go: Generated file
  • internal/notifications/command_resource_preference_delete.go: Generated file
  • internal/notifications/command_resource_preference_describe.go: Generated file
  • internal/notifications/command_resource_preference_update.go: Generated file
  • internal/notifications/command_resource_subscription.go: Generated file
  • internal/notifications/command_resource_subscription_create.go: Generated file
  • internal/notifications/command_resource_subscription_delete.go: Generated file
  • internal/notifications/command_resource_subscription_describe.go: Generated file
  • internal/notifications/command_resource_subscription_update.go: Generated file
  • internal/notifications/command_subscription.go: Generated file
  • internal/notifications/command_subscription_create.go: Generated file
  • internal/notifications/command_subscription_delete.go: Generated file
  • internal/notifications/command_subscription_describe.go: Generated file
  • internal/notifications/command_subscription_list.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadinternal/notifications/command_subscription_create.go Outdated
Comment threadinternal/notifications/command_subscription_update.go Outdated
Comment threadinternal/notifications/command_integration_create.go
Comment threadinternal/notifications/command_integration_update.go
Comment threadinternal/notifications/command_resource_subscription_create.go Outdated
Comment threadcmd/lint/main.go Outdated
Comment threadinternal/notifications/command_resource_subscription_update.go Outdated
Two files conflicted.
test/fixtures/output/help.golden: main renamed `unified-stream-manager` to
`usm`, which shortened cobra's longest command name and re-padded every line in
the Available Commands block. Took main's block and regenerated the golden with
`go test ./test -run TestCLI/TestHelp -update`, which re-added the
notifications line at the new padding.
.cli-generation-checksum: main carries the flink region suite's value, this
branch carries notifications'. Kept this branch's. The file records the
last-generated suite only and drives PR labeling, so neither value is a drift
signal.
go build ./... and go test ./test -run TestCLI/TestNotifications both pass on
the merge result.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Picks up cli-terraform-generator's allow-list remedy fix. Eight stringSlice
flags now carry the CLI's own comma-separated-list wording instead of the
spec's HTTP-shape prose, the notifications parent command's Short registers
"Cloud Notifications", and one capitalized common noun is fixed in the spec.
Removes "Integrations" from properNouns: it was registered by an earlier merge
to satisfy one flag's help text, and RequireCapitalizeProperNouns then mandated
that capitalization across the whole CLI, failing three descriptions in
`confluent provider-integration`. "recieve" goes with the spec typo it covered.
`make lint-cli` passes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@airlock-confluentinc
airlock-confluentincBotforce-pushed the onboard-notifications-integration branch from 8d059d9 to ccc3483CompareAugust 14, 2026 16:26
ccloud-sdk-go-v2/notifications v0.1.0 is published, so the six commands and
their test-server handlers import it instead of the -internal path. The Alpine
docker build runs go build in a container with no GitHub credentials and the
repo carries no vendor/, so a private module cannot resolve there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

A list command's -o json output is a JSON array, not an object, so
Unmarshal into a map failed and fell through to the table-fallback
path, which grabbed the ASCII separator row as a fake id. Try an
array first and pull the id from its first element; fall back to a
plain object for describe-style output. Drop the table-parsing path
entirely — every CaptureID call site pairs with -o json now.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…r fixes
The last merge predated several generator-side fixes: the zeroCheck
replacement for optional StringSlice query params (a []string flag
never reads as a literal nil, so severity/resource-type/resource-crn/
sort filters were always sent even when unset), the switch from a
literal {id} placeholder to the spec's own example values in create/
update test args, and the List-before-Describe reordering plus -o
json request on every live-test List step used for ID capture.
Regenerated command/wrapper/test-server/fixture/golden files for
Integration, Subscription, ResourcePreference, ResourceSubscription,
NotificationType, and UserNotification.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nds to pick up objectref_write_placeholders
An array-valued ObjectReference field (integrations) built each element
as {Id: id} only, leaving the SDK's required related/resource_name
fields as empty strings on the wire. The real API rejects that with a
400. cli.objectref_write_placeholders already covered the scalar
notification_type case; this regeneration picks up the generator-side
fix that ported the same placeholder injection into the array-building
loops of create and update.
Regenerated Subscription and ResourceSubscription via cli-tfgen
--official-sdk to avoid a local SDK replace directive in go.mod.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

Sign up for freeto 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

@alexfayad
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Add the six notifications commands - #3443

Open
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration
Open

Add the six notifications commands#3443
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration

Conversation

@alexfayad

@alexfayadAlexander Fayad (alexfayad) commented Aug 13, 2026

Copy link
Copy Markdown

Release Notes

New Features

  • Add confluent notifications commands for managing notification integrations, subscriptions, resource preferences, resource subscriptions, notification types, and in-app user notifications.

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

Onboards Confluent Cloud Notifications to the CLI. Adds six command groups under confluent notifications: integration, subscription, resource-preference, resource-subscription, notification-type, and user-notification.

The code is generated by cli-terraform-generator from the notifications OpenAPI spec and Go SDK. The commands, the pkg/ccloudv2 wrapper, the test-server handlers, the integration tests, the live tests, and the goldens all come from the generator.

One API-specific workaround is baked in. The related and resource_name sub-fields of the shared GlobalObjectReference are marked required, readOnly, and format: uri in the spec, and the SDK serializes them unconditionally. A create that carried only id sent an empty string for both and Confluent Cloud rejected it with 400 Bad Request. The generated subscription and resource-subscription commands now fill both fields with a placeholder URI on create and update, matching the workaround the published confluent_ksql_cluster Terraform resource already uses.

Confluent Cloud only.

Blast Radius

New commands only. No existing command changes, and nothing outside internal/notifications shares this code. If a notifications command misbehaves, only customers running confluent notifications ... are affected.

References

Test & Review

Built a custom binary and ran the notifications commands against a real Confluent Cloud org. Verified create / describe / list / delete for integration, and create / describe / update / delete for subscription and resource-subscription with a multi-element integrations value, all without the prior 400. Generated integration and live tests are included.

CLI create against real Confluent Cloud (before/after the fix)

Before the fix, related/resource_name went out as a non-URI placeholder and Confluent Cloud rejected the create against the spec's format: uri on /integrations/0/related:

POST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"_","resource_name":"_"}],"notification_type":{"id":"nt-9KD1p","related":"_","resource_name":"_"}}HTTP/2.0 400 Bad Request{"errors":[{"status":"400","code":"1101","title":"Invalid request body","detail":"Invalid Json: Invalid request body","source":{"pointer":"/integrations/0/related"}}]}Error: Invalid Json: Invalid request body

The shipped command fills both fields with a placeholder URI and the create succeeds:

$ confluent notifications subscription create --notification-type nt-9KD1p --integrations i-59wqM --current-state ENABLED -o jsonPOST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}],"notification_type":{"id":"nt-9KD1p","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}}HTTP/2.0 201 Created{ "id": "s-gAXVpd", "notification_type": "nt-9KD1p", "current_state": "ENABLED"}

🤖 Generated with Claude Code

Generated by cli-terraform-generator merge mode from the notifications v1
OpenAPI spec: integration, subscription, resource-preference,
resource-subscription, notification-type, and user-notification, plus their
ccloudv2 wrappers, test-server handlers, integration tests, input fixtures,
output goldens, and live tests.
The integration command's target is a oneOf. Update leaves --kind optional so
an update touching only display-name or description is accepted, and rejects a
variant flag supplied without --kind rather than silently dropping it.
Verified with go build ./..., go vet, and
go test ./test/ -run 'TestCLI/TestNotifications'.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 13, 2026 18:00
@confluent-cla-assistant

confluent-cla-assistantBot commented Aug 13, 2026

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.

CopilotAI 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

This pull request introduces a new top-level notifications command group backed by the Notifications v1 CCloud SDK, adds the corresponding test-server endpoints, and wires in integration/live tests plus golden fixtures to validate CLI behavior.

Changes:

  • Add Notifications v1 API client bootstrap + CRUD/list wrappers in pkg/ccloudv2, and register the client on the shared ccloudv2.Client.
  • Add internal/notifications Cobra command tree (integrations, notification-types, resource-preferences, resource-subscriptions, subscriptions, user-notifications) and register it under the root command.
  • Extend the test server router + handlers, add integration/live tests, and add input/output fixtures + goldens for the new commands.

Reviewed changes

Copilot reviewed 185 out of 211 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
test/test-server/notifications_user_notification_handler.goAdds test-server handlers for user-notifications list/get/patch.
test/test-server/notifications_subscription_handler.goAdds test-server handlers for subscriptions list/create/get/update/delete.
test/test-server/notifications_resource_subscription_handler.goAdds test-server handlers for resource-subscriptions create/get/update/delete.
test/test-server/notifications_resource_preference_handler.goAdds test-server handlers for resource-preferences create/get/update/delete.
test/test-server/notifications_notification_type_handler.goAdds test-server handlers for notification-types list/get.
test/test-server/notifications_integration_handler.goAdds test-server handlers for integrations list/create/get/update/delete.
test/test-server/ccloudv2_router.goRegisters Notifications v1 routes in the test-server router.
test/notifications_user_notification_test.goAdds integration tests for user-notification describe/list/update + autocomplete.
test/notifications_subscription_test.goAdds integration tests for subscription CRUD + autocomplete.
test/notifications_resource_subscription_test.goAdds integration tests for resource-subscription CRUD.
test/notifications_resource_preference_test.goAdds integration tests for resource-preference CRUD.
test/notifications_notification_type_test.goAdds integration tests for notification-type describe/list + autocomplete.
test/notifications_integration_test.goAdds integration tests for integration CRUD + autocomplete.
test/live/notifications_user_notification_live_test.goAdds live CRUD coverage for user-notifications.
test/live/notifications_subscription_live_test.goAdds live CRUD coverage for subscriptions (env-var gated).
test/live/notifications_resource_subscription_live_test.goAdds live CRUD coverage for resource-subscriptions (env-var gated).
test/live/notifications_resource_preference_live_test.goAdds live CRUD coverage for resource-preferences.
test/live/notifications_notification_type_live_test.goAdds live coverage for notification-type list/describe.
test/fixtures/output/notifications/user-notification/update/update-read.goldenAdds golden output for user-notification update (human).
test/fixtures/output/notifications/user-notification/update/update-invalid.goldenAdds golden output for user-notification update (404).
test/fixtures/output/notifications/user-notification/update-help.goldenAdds golden help for user-notification update.
test/fixtures/output/notifications/user-notification/list/list.goldenAdds golden output for user-notification list (human).
test/fixtures/output/notifications/user-notification/list/list-yaml.goldenAdds golden output for user-notification list (yaml).
test/fixtures/output/notifications/user-notification/list/list-type.goldenAdds golden output for user-notification list filtered by type.
test/fixtures/output/notifications/user-notification/list/list-time-range.goldenAdds golden output for user-notification list filtered by time range.
test/fixtures/output/notifications/user-notification/list/list-sort.goldenAdds golden output for user-notification list sorted.
test/fixtures/output/notifications/user-notification/list/list-severity.goldenAdds golden output for user-notification list filtered by severity.
test/fixtures/output/notifications/user-notification/list/list-search.goldenAdds golden output for user-notification list filtered by search.
test/fixtures/output/notifications/user-notification/list/list-read.goldenAdds golden output for user-notification list filtered by read.
test/fixtures/output/notifications/user-notification/list/list-json.goldenAdds golden output for user-notification list (json).
test/fixtures/output/notifications/user-notification/list/list-include.goldenAdds golden output for user-notification list with include fields.
test/fixtures/output/notifications/user-notification/list/list-crn.goldenAdds golden output for user-notification list filtered by CRN.
test/fixtures/output/notifications/user-notification/list-help.goldenAdds golden help for user-notification list.
test/fixtures/output/notifications/user-notification/help.goldenAdds golden help for user-notification command group.
test/fixtures/output/notifications/user-notification/describe/describe.goldenAdds golden output for user-notification describe (human).
test/fixtures/output/notifications/user-notification/describe/describe-yaml.goldenAdds golden output for user-notification describe (yaml).
test/fixtures/output/notifications/user-notification/describe/describe-json.goldenAdds golden output for user-notification describe (json).
test/fixtures/output/notifications/user-notification/describe/describe-invalid.goldenAdds golden output for user-notification describe (404).
test/fixtures/output/notifications/user-notification/describe/describe-autocomplete.goldenAdds golden output for user-notification autocomplete.
test/fixtures/output/notifications/user-notification/describe-help.goldenAdds golden help for user-notification describe.
test/fixtures/output/notifications/subscription/update/update-invalid.goldenAdds golden output for subscription update (404).
test/fixtures/output/notifications/subscription/update/update-integrations.goldenAdds golden output for subscription update integrations (human).
test/fixtures/output/notifications/subscription/update/update-current-state.goldenAdds golden output for subscription update current-state (human).
test/fixtures/output/notifications/subscription/update-help.goldenAdds golden help for subscription update.
test/fixtures/output/notifications/subscription/list/list.goldenAdds golden output for subscription list (human).
test/fixtures/output/notifications/subscription/list/list-yaml.goldenAdds golden output for subscription list (yaml).
test/fixtures/output/notifications/subscription/list/list-json.goldenAdds golden output for subscription list (json).
test/fixtures/output/notifications/subscription/list-help.goldenAdds golden help for subscription list.
test/fixtures/output/notifications/subscription/help.goldenAdds golden help for subscription command group.
test/fixtures/output/notifications/subscription/describe/describe.goldenAdds golden output for subscription describe (human).
test/fixtures/output/notifications/subscription/describe/describe-yaml.goldenAdds golden output for subscription describe (yaml).
test/fixtures/output/notifications/subscription/describe/describe-json.goldenAdds golden output for subscription describe (json).
test/fixtures/output/notifications/subscription/describe/describe-invalid.goldenAdds golden output for subscription describe (404).
test/fixtures/output/notifications/subscription/describe/describe-autocomplete.goldenAdds golden output for subscription describe autocomplete.
test/fixtures/output/notifications/subscription/describe-help.goldenAdds golden help for subscription describe.
test/fixtures/output/notifications/subscription/delete/delete.goldenAdds golden output for subscription delete (force).
test/fixtures/output/notifications/subscription/delete/delete-no-force.goldenAdds golden output for subscription delete (prompt).
test/fixtures/output/notifications/subscription/delete/delete-multiple.goldenAdds golden output for multi-delete subscriptions.
test/fixtures/output/notifications/subscription/delete/delete-invalid.goldenAdds golden output for subscription delete invalid + suggestions.
test/fixtures/output/notifications/subscription/delete/delete-autocomplete.goldenAdds golden output for subscription delete autocomplete.
test/fixtures/output/notifications/subscription/delete-help.goldenAdds golden help for subscription delete.
test/fixtures/output/notifications/subscription/create/create.goldenAdds golden output for subscription create (human).
test/fixtures/output/notifications/subscription/create/create-current-state.goldenAdds golden output for subscription create with current-state.
test/fixtures/output/notifications/subscription/create-help.goldenAdds golden help for subscription create.
test/fixtures/output/notifications/resource-subscription/update/update-resource.goldenAdds golden output for resource-subscription update resource.
test/fixtures/output/notifications/resource-subscription/update/update-resource-type.goldenAdds golden output for resource-subscription update resource-type.
test/fixtures/output/notifications/resource-subscription/update/update-invalid.goldenAdds golden output for resource-subscription update (404).
test/fixtures/output/notifications/resource-subscription/update/update-integrations.goldenAdds golden output for resource-subscription update integrations.
test/fixtures/output/notifications/resource-subscription/update/update-current-state.goldenAdds golden output for resource-subscription update current-state.
test/fixtures/output/notifications/resource-subscription/update-help.goldenAdds golden help for resource-subscription update.
test/fixtures/output/notifications/resource-subscription/help.goldenAdds golden help for resource-subscription command group.
test/fixtures/output/notifications/resource-subscription/describe/describe.goldenAdds golden output for resource-subscription describe (human).
test/fixtures/output/notifications/resource-subscription/describe/describe-yaml.goldenAdds golden output for resource-subscription describe (yaml).
test/fixtures/output/notifications/resource-subscription/describe/describe-json.goldenAdds golden output for resource-subscription describe (json).
test/fixtures/output/notifications/resource-subscription/describe/describe-invalid.goldenAdds golden output for resource-subscription describe (404).
test/fixtures/output/notifications/resource-subscription/describe-help.goldenAdds golden help for resource-subscription describe.
test/fixtures/output/notifications/resource-subscription/delete/delete.goldenAdds golden output for resource-subscription delete (force).
test/fixtures/output/notifications/resource-subscription/delete/delete-no-force.goldenAdds golden output for resource-subscription delete (prompt).
test/fixtures/output/notifications/resource-subscription/delete/delete-multiple.goldenAdds golden output for multi-delete resource-subscriptions.
test/fixtures/output/notifications/resource-subscription/delete/delete-invalid.goldenAdds golden output for resource-subscription delete invalid + suggestions.
test/fixtures/output/notifications/resource-subscription/delete-help.goldenAdds golden help for resource-subscription delete.
test/fixtures/output/notifications/resource-subscription/create/create.goldenAdds golden output for resource-subscription create (human).
test/fixtures/output/notifications/resource-subscription/create/create-current-state.goldenAdds golden output for resource-subscription create with current-state.
test/fixtures/output/notifications/resource-subscription/create-help.goldenAdds golden help for resource-subscription create.
test/fixtures/output/notifications/resource-preference/update/update-resource.goldenAdds golden output for resource-preference update resource.
test/fixtures/output/notifications/resource-preference/update/update-resource-type.goldenAdds golden output for resource-preference update resource-type.
test/fixtures/output/notifications/resource-preference/update/update-invalid.goldenAdds golden output for resource-preference update (404).
test/fixtures/output/notifications/resource-preference/update/update-current-state.goldenAdds golden output for resource-preference update current-state.
test/fixtures/output/notifications/resource-preference/update-help.goldenAdds golden help for resource-preference update.
test/fixtures/output/notifications/resource-preference/help.goldenAdds golden help for resource-preference command group.
test/fixtures/output/notifications/resource-preference/describe/describe.goldenAdds golden output for resource-preference describe (human).
test/fixtures/output/notifications/resource-preference/describe/describe-yaml.goldenAdds golden output for resource-preference describe (yaml).
test/fixtures/output/notifications/resource-preference/describe/describe-json.goldenAdds golden output for resource-preference describe (json).
test/fixtures/output/notifications/resource-preference/describe/describe-invalid.goldenAdds golden output for resource-preference describe (404).
test/fixtures/output/notifications/resource-preference/describe-help.goldenAdds golden help for resource-preference describe.
test/fixtures/output/notifications/resource-preference/delete/delete.goldenAdds golden output for resource-preference delete (force).
test/fixtures/output/notifications/resource-preference/delete/delete-no-force.goldenAdds golden output for resource-preference delete (prompt).
test/fixtures/output/notifications/resource-preference/delete/delete-multiple.goldenAdds golden output for multi-delete resource-preferences.
test/fixtures/output/notifications/resource-preference/delete/delete-invalid.goldenAdds golden output for resource-preference delete invalid + suggestions.
test/fixtures/output/notifications/resource-preference/delete-help.goldenAdds golden help for resource-preference delete.
test/fixtures/output/notifications/resource-preference/create/create.goldenAdds golden output for resource-preference create (human).
test/fixtures/output/notifications/resource-preference/create/create-current-state.goldenAdds golden output for resource-preference create with current-state.
test/fixtures/output/notifications/resource-preference/create-help.goldenAdds golden help for resource-preference create.
test/fixtures/output/notifications/notification-type/list/list.goldenAdds golden output for notification-type list (human).
test/fixtures/output/notifications/notification-type/list/list-yaml.goldenAdds golden output for notification-type list (yaml).
test/fixtures/output/notifications/notification-type/list/list-resource-type.goldenAdds golden output for notification-type list filtered by resource-type.
test/fixtures/output/notifications/notification-type/list/list-json.goldenAdds golden output for notification-type list (json).
test/fixtures/output/notifications/notification-type/list-help.goldenAdds golden help for notification-type list.
test/fixtures/output/notifications/notification-type/help.goldenAdds golden help for notification-type command group.
test/fixtures/output/notifications/notification-type/describe/describe.goldenAdds golden output for notification-type describe (human).
test/fixtures/output/notifications/notification-type/describe/describe-yaml.goldenAdds golden output for notification-type describe (yaml).
test/fixtures/output/notifications/notification-type/describe/describe-json.goldenAdds golden output for notification-type describe (json).
test/fixtures/output/notifications/notification-type/describe/describe-invalid.goldenAdds golden output for notification-type describe (404).
test/fixtures/output/notifications/notification-type/describe/describe-autocomplete.goldenAdds golden output for notification-type autocomplete.
test/fixtures/output/notifications/notification-type/describe-help.goldenAdds golden help for notification-type describe.
test/fixtures/output/notifications/integration/update/update-webhook-target.goldenAdds golden output for integration update webhook target.
test/fixtures/output/notifications/integration/update/update-slack-target.goldenAdds golden output for integration update slack target.
test/fixtures/output/notifications/integration/update/update-ms-teams-target.goldenAdds golden output for integration update MsTeams target.
test/fixtures/output/notifications/integration/update/update-invalid.goldenAdds golden output for integration update (404).
test/fixtures/output/notifications/integration/update/update-display-name.goldenAdds golden output for integration update display-name.
test/fixtures/output/notifications/integration/update/update-description.goldenAdds golden output for integration update description.
test/fixtures/output/notifications/integration/update-help.goldenAdds golden help for integration update.
test/fixtures/output/notifications/integration/list/list.goldenAdds golden output for integration list (human).
test/fixtures/output/notifications/integration/list/list-yaml.goldenAdds golden output for integration list (yaml).
test/fixtures/output/notifications/integration/list/list-json.goldenAdds golden output for integration list (json).
test/fixtures/output/notifications/integration/list-help.goldenAdds golden help for integration list.
test/fixtures/output/notifications/integration/help.goldenAdds golden help for integration command group.
test/fixtures/output/notifications/integration/describe/describe-yaml.goldenAdds golden output for integration describe (yaml).
test/fixtures/output/notifications/integration/describe/describe-webhook-target.goldenAdds golden output for integration describe webhook target.
test/fixtures/output/notifications/integration/describe/describe-user-email-target.goldenAdds golden output for integration describe user-email target.
test/fixtures/output/notifications/integration/describe/describe-slack-target.goldenAdds golden output for integration describe slack target.
test/fixtures/output/notifications/integration/describe/describe-role-email-target.goldenAdds golden output for integration describe role-email target.
test/fixtures/output/notifications/integration/describe/describe-ms-teams-target.goldenAdds golden output for integration describe MsTeams target.
test/fixtures/output/notifications/integration/describe/describe-json.goldenAdds golden output for integration describe (json).
test/fixtures/output/notifications/integration/describe/describe-invalid.goldenAdds golden output for integration describe (404).
test/fixtures/output/notifications/integration/describe/describe-in-app-target.goldenAdds golden output for integration describe in-app target.
test/fixtures/output/notifications/integration/describe/describe-autocomplete.goldenAdds golden output for integration autocomplete.
test/fixtures/output/notifications/integration/describe-help.goldenAdds golden help for integration describe.
test/fixtures/output/notifications/integration/delete/delete.goldenAdds golden output for integration delete (force).
test/fixtures/output/notifications/integration/delete/delete-no-force.goldenAdds golden output for integration delete (prompt).
test/fixtures/output/notifications/integration/delete/delete-multiple.goldenAdds golden output for multi-delete integrations.
test/fixtures/output/notifications/integration/delete/delete-invalid.goldenAdds golden output for integration delete invalid + suggestions.
test/fixtures/output/notifications/integration/delete/delete-autocomplete.goldenAdds golden output for integration delete autocomplete.
test/fixtures/output/notifications/integration/delete-help.goldenAdds golden help for integration delete.
test/fixtures/output/notifications/integration/create/create-webhook-target.goldenAdds golden output for integration create webhook target.
test/fixtures/output/notifications/integration/create/create-slack-target.goldenAdds golden output for integration create slack target.
test/fixtures/output/notifications/integration/create/create-ms-teams-target.goldenAdds golden output for integration create MsTeams target.
test/fixtures/output/notifications/integration/create/create-description.goldenAdds golden output for integration create with description.
test/fixtures/output/notifications/integration/create-help.goldenAdds golden help for integration create.
test/fixtures/output/notifications/help.goldenAdds golden help for top-level notifications command group.
test/fixtures/output/help.goldenAdds the notifications entry to root help golden.
test/fixtures/input/notifications/user-notification/read_created_user_notification.jsonAdds fixture payload for reading user-notifications.
test/fixtures/input/notifications/user-notification/create_user_notification.jsonAdds fixture payload for creating user-notifications.
test/fixtures/input/notifications/subscription/read_created_subscription.jsonAdds fixture payload for reading subscriptions.
test/fixtures/input/notifications/subscription/create_subscription.jsonAdds fixture payload for creating subscriptions.
test/fixtures/input/notifications/resource-subscription/read_created_resource_subscription.jsonAdds fixture payload for reading resource-subscriptions.
test/fixtures/input/notifications/resource-subscription/create_resource_subscription.jsonAdds fixture payload for creating resource-subscriptions.
test/fixtures/input/notifications/resource-preference/read_created_resource_preference.jsonAdds fixture payload for reading resource-preferences.
test/fixtures/input/notifications/resource-preference/create_resource_preference.jsonAdds fixture payload for creating resource-preferences.
test/fixtures/input/notifications/notification-type/read_created_notification_type.jsonAdds fixture payload for reading notification-types.
test/fixtures/input/notifications/notification-type/create_notification_type.jsonAdds fixture payload for creating notification-types.
test/fixtures/input/notifications/integration/read_created_webhook_target.jsonAdds fixture payload for reading webhook integration targets.
test/fixtures/input/notifications/integration/read_created_user_email_target.jsonAdds fixture payload for reading user-email integration targets.
test/fixtures/input/notifications/integration/read_created_slack_target.jsonAdds fixture payload for reading slack integration targets.
test/fixtures/input/notifications/integration/read_created_role_email_target.jsonAdds fixture payload for reading role-email integration targets.
test/fixtures/input/notifications/integration/read_created_ms_teams_target.jsonAdds fixture payload for reading MsTeams integration targets.
test/fixtures/input/notifications/integration/read_created_in_app_target.jsonAdds fixture payload for reading in-app integration targets.
test/fixtures/input/notifications/integration/create_webhook_target.jsonAdds fixture payload for creating webhook integration targets.
test/fixtures/input/notifications/integration/create_user_email_target.jsonAdds fixture payload for creating user-email integration targets.
test/fixtures/input/notifications/integration/create_slack_target.jsonAdds fixture payload for creating slack integration targets.
test/fixtures/input/notifications/integration/create_role_email_target.jsonAdds fixture payload for creating role-email integration targets.
test/fixtures/input/notifications/integration/create_ms_teams_target.jsonAdds fixture payload for creating MsTeams integration targets.
test/fixtures/input/notifications/integration/create_in_app_target.jsonAdds fixture payload for creating in-app integration targets.
pkg/ccloudv2/notifications.goAdds Notifications v1 client + wrapper methods for CRUD/list operations.
pkg/ccloudv2/client.goRegisters NotificationsClient on the shared CCloud v2 client.
internal/notifications/command.goAdds the top-level notifications command and subcommand registration.
internal/notifications/command_user_notification.goAdds user-notification command group, output formatting, and autocomplete.
internal/notifications/command_user_notification_update.goAdds user-notification update command + --read support.
internal/notifications/command_user_notification_list.goAdds user-notification list command + filtering flags.
internal/notifications/command_user_notification_describe.goAdds user-notification describe command.
internal/notifications/command_subscription.goAdds subscription command group, output formatting, and autocomplete.
internal/notifications/command_subscription_update.goAdds subscription update command + flags.
internal/notifications/command_subscription_list.goAdds subscription list command.
internal/notifications/command_subscription_describe.goAdds subscription describe command.
internal/notifications/command_subscription_delete.goAdds subscription delete (multi-delete) using shared deletion helpers.
internal/notifications/command_subscription_create.goAdds subscription create command + flags.
internal/notifications/command_resource_subscription.goAdds resource-subscription command group + output formatting.
internal/notifications/command_resource_subscription_update.goAdds resource-subscription update command + flags.
internal/notifications/command_resource_subscription_describe.goAdds resource-subscription describe command.
internal/notifications/command_resource_subscription_delete.goAdds resource-subscription delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_subscription_create.goAdds resource-subscription create command + flags.
internal/notifications/command_resource_preference.goAdds resource-preference command group + output formatting.
internal/notifications/command_resource_preference_update.goAdds resource-preference update command + flags.
internal/notifications/command_resource_preference_describe.goAdds resource-preference describe command.
internal/notifications/command_resource_preference_delete.goAdds resource-preference delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_preference_create.goAdds resource-preference create command + flags.
internal/notifications/command_notification_type.goAdds notification-type command group + output formatting + autocomplete.
internal/notifications/command_notification_type_list.goAdds notification-type list command + filter flag.
internal/notifications/command_notification_type_describe.goAdds notification-type describe command.
internal/notifications/command_integration.goAdds integration command group + output formatting + autocomplete.
internal/notifications/command_integration_update.goAdds integration update command + target-kind handling.
internal/notifications/command_integration_list.goAdds integration list command.
internal/notifications/command_integration_describe.goAdds integration describe command.
internal/notifications/command_integration_delete.goAdds integration delete (multi-delete) using deletion helpers.
internal/notifications/command_integration_create.goAdds integration create command + target-kind handling.
internal/command.goRegisters notifications under the root command.
go.sumAdds checksums for the notifications internal SDK module.
go.modAdds dependency on github.com/confluentinc/ccloud-sdk-go-v2-internal/notifications.
cmd/lint/main.goExtends spellcheck vocabulary for new notifications-related terms.
.cli-generation-checksumUpdates generator checksum to reflect regenerated sources.
Files not reviewed (25)
  • internal/notifications/command.go: Generated file
  • internal/notifications/command_integration.go: Generated file
  • internal/notifications/command_integration_create.go: Generated file
  • internal/notifications/command_integration_delete.go: Generated file
  • internal/notifications/command_integration_describe.go: Generated file
  • internal/notifications/command_integration_list.go: Generated file
  • internal/notifications/command_integration_update.go: Generated file
  • internal/notifications/command_notification_type.go: Generated file
  • internal/notifications/command_notification_type_describe.go: Generated file
  • internal/notifications/command_notification_type_list.go: Generated file
  • internal/notifications/command_resource_preference.go: Generated file
  • internal/notifications/command_resource_preference_create.go: Generated file
  • internal/notifications/command_resource_preference_delete.go: Generated file
  • internal/notifications/command_resource_preference_describe.go: Generated file
  • internal/notifications/command_resource_preference_update.go: Generated file
  • internal/notifications/command_resource_subscription.go: Generated file
  • internal/notifications/command_resource_subscription_create.go: Generated file
  • internal/notifications/command_resource_subscription_delete.go: Generated file
  • internal/notifications/command_resource_subscription_describe.go: Generated file
  • internal/notifications/command_resource_subscription_update.go: Generated file
  • internal/notifications/command_subscription.go: Generated file
  • internal/notifications/command_subscription_create.go: Generated file
  • internal/notifications/command_subscription_delete.go: Generated file
  • internal/notifications/command_subscription_describe.go: Generated file
  • internal/notifications/command_subscription_list.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadinternal/notifications/command_subscription_create.go Outdated
Comment threadinternal/notifications/command_subscription_update.go Outdated
Comment threadinternal/notifications/command_integration_create.go
Comment threadinternal/notifications/command_integration_update.go
Comment threadinternal/notifications/command_resource_subscription_create.go Outdated
Comment threadcmd/lint/main.go Outdated
Comment threadinternal/notifications/command_resource_subscription_update.go Outdated
Two files conflicted.
test/fixtures/output/help.golden: main renamed `unified-stream-manager` to
`usm`, which shortened cobra's longest command name and re-padded every line in
the Available Commands block. Took main's block and regenerated the golden with
`go test ./test -run TestCLI/TestHelp -update`, which re-added the
notifications line at the new padding.
.cli-generation-checksum: main carries the flink region suite's value, this
branch carries notifications'. Kept this branch's. The file records the
last-generated suite only and drives PR labeling, so neither value is a drift
signal.
go build ./... and go test ./test -run TestCLI/TestNotifications both pass on
the merge result.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Picks up cli-terraform-generator's allow-list remedy fix. Eight stringSlice
flags now carry the CLI's own comma-separated-list wording instead of the
spec's HTTP-shape prose, the notifications parent command's Short registers
"Cloud Notifications", and one capitalized common noun is fixed in the spec.
Removes "Integrations" from properNouns: it was registered by an earlier merge
to satisfy one flag's help text, and RequireCapitalizeProperNouns then mandated
that capitalization across the whole CLI, failing three descriptions in
`confluent provider-integration`. "recieve" goes with the spec typo it covered.
`make lint-cli` passes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@airlock-confluentinc
airlock-confluentincBotforce-pushed the onboard-notifications-integration branch from 8d059d9 to ccc3483CompareAugust 14, 2026 16:26
ccloud-sdk-go-v2/notifications v0.1.0 is published, so the six commands and
their test-server handlers import it instead of the -internal path. The Alpine
docker build runs go build in a container with no GitHub credentials and the
repo carries no vendor/, so a private module cannot resolve there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

A list command's -o json output is a JSON array, not an object, so
Unmarshal into a map failed and fell through to the table-fallback
path, which grabbed the ASCII separator row as a fake id. Try an
array first and pull the id from its first element; fall back to a
plain object for describe-style output. Drop the table-parsing path
entirely — every CaptureID call site pairs with -o json now.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…r fixes
The last merge predated several generator-side fixes: the zeroCheck
replacement for optional StringSlice query params (a []string flag
never reads as a literal nil, so severity/resource-type/resource-crn/
sort filters were always sent even when unset), the switch from a
literal {id} placeholder to the spec's own example values in create/
update test args, and the List-before-Describe reordering plus -o
json request on every live-test List step used for ID capture.
Regenerated command/wrapper/test-server/fixture/golden files for
Integration, Subscription, ResourcePreference, ResourceSubscription,
NotificationType, and UserNotification.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nds to pick up objectref_write_placeholders
An array-valued ObjectReference field (integrations) built each element
as {Id: id} only, leaving the SDK's required related/resource_name
fields as empty strings on the wire. The real API rejects that with a
400. cli.objectref_write_placeholders already covered the scalar
notification_type case; this regeneration picks up the generator-side
fix that ported the same placeholder injection into the array-building
loops of create and update.
Regenerated Subscription and ResourceSubscription via cli-tfgen
--official-sdk to avoid a local SDK replace directive in go.mod.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

Sign up for freeto 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

@alexfayad
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Add the six notifications commands - #3443

Open
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration
Open

Add the six notifications commands#3443
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration

Conversation

@alexfayad

@alexfayadAlexander Fayad (alexfayad) commented Aug 13, 2026

Copy link
Copy Markdown

Release Notes

New Features

  • Add confluent notifications commands for managing notification integrations, subscriptions, resource preferences, resource subscriptions, notification types, and in-app user notifications.

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

Onboards Confluent Cloud Notifications to the CLI. Adds six command groups under confluent notifications: integration, subscription, resource-preference, resource-subscription, notification-type, and user-notification.

The code is generated by cli-terraform-generator from the notifications OpenAPI spec and Go SDK. The commands, the pkg/ccloudv2 wrapper, the test-server handlers, the integration tests, the live tests, and the goldens all come from the generator.

One API-specific workaround is baked in. The related and resource_name sub-fields of the shared GlobalObjectReference are marked required, readOnly, and format: uri in the spec, and the SDK serializes them unconditionally. A create that carried only id sent an empty string for both and Confluent Cloud rejected it with 400 Bad Request. The generated subscription and resource-subscription commands now fill both fields with a placeholder URI on create and update, matching the workaround the published confluent_ksql_cluster Terraform resource already uses.

Confluent Cloud only.

Blast Radius

New commands only. No existing command changes, and nothing outside internal/notifications shares this code. If a notifications command misbehaves, only customers running confluent notifications ... are affected.

References

Test & Review

Built a custom binary and ran the notifications commands against a real Confluent Cloud org. Verified create / describe / list / delete for integration, and create / describe / update / delete for subscription and resource-subscription with a multi-element integrations value, all without the prior 400. Generated integration and live tests are included.

CLI create against real Confluent Cloud (before/after the fix)

Before the fix, related/resource_name went out as a non-URI placeholder and Confluent Cloud rejected the create against the spec's format: uri on /integrations/0/related:

POST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"_","resource_name":"_"}],"notification_type":{"id":"nt-9KD1p","related":"_","resource_name":"_"}}HTTP/2.0 400 Bad Request{"errors":[{"status":"400","code":"1101","title":"Invalid request body","detail":"Invalid Json: Invalid request body","source":{"pointer":"/integrations/0/related"}}]}Error: Invalid Json: Invalid request body

The shipped command fills both fields with a placeholder URI and the create succeeds:

$ confluent notifications subscription create --notification-type nt-9KD1p --integrations i-59wqM --current-state ENABLED -o jsonPOST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}],"notification_type":{"id":"nt-9KD1p","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}}HTTP/2.0 201 Created{ "id": "s-gAXVpd", "notification_type": "nt-9KD1p", "current_state": "ENABLED"}

🤖 Generated with Claude Code

Generated by cli-terraform-generator merge mode from the notifications v1
OpenAPI spec: integration, subscription, resource-preference,
resource-subscription, notification-type, and user-notification, plus their
ccloudv2 wrappers, test-server handlers, integration tests, input fixtures,
output goldens, and live tests.
The integration command's target is a oneOf. Update leaves --kind optional so
an update touching only display-name or description is accepted, and rejects a
variant flag supplied without --kind rather than silently dropping it.
Verified with go build ./..., go vet, and
go test ./test/ -run 'TestCLI/TestNotifications'.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 13, 2026 18:00
@confluent-cla-assistant

confluent-cla-assistantBot commented Aug 13, 2026

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.

CopilotAI 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

This pull request introduces a new top-level notifications command group backed by the Notifications v1 CCloud SDK, adds the corresponding test-server endpoints, and wires in integration/live tests plus golden fixtures to validate CLI behavior.

Changes:

  • Add Notifications v1 API client bootstrap + CRUD/list wrappers in pkg/ccloudv2, and register the client on the shared ccloudv2.Client.
  • Add internal/notifications Cobra command tree (integrations, notification-types, resource-preferences, resource-subscriptions, subscriptions, user-notifications) and register it under the root command.
  • Extend the test server router + handlers, add integration/live tests, and add input/output fixtures + goldens for the new commands.

Reviewed changes

Copilot reviewed 185 out of 211 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
test/test-server/notifications_user_notification_handler.goAdds test-server handlers for user-notifications list/get/patch.
test/test-server/notifications_subscription_handler.goAdds test-server handlers for subscriptions list/create/get/update/delete.
test/test-server/notifications_resource_subscription_handler.goAdds test-server handlers for resource-subscriptions create/get/update/delete.
test/test-server/notifications_resource_preference_handler.goAdds test-server handlers for resource-preferences create/get/update/delete.
test/test-server/notifications_notification_type_handler.goAdds test-server handlers for notification-types list/get.
test/test-server/notifications_integration_handler.goAdds test-server handlers for integrations list/create/get/update/delete.
test/test-server/ccloudv2_router.goRegisters Notifications v1 routes in the test-server router.
test/notifications_user_notification_test.goAdds integration tests for user-notification describe/list/update + autocomplete.
test/notifications_subscription_test.goAdds integration tests for subscription CRUD + autocomplete.
test/notifications_resource_subscription_test.goAdds integration tests for resource-subscription CRUD.
test/notifications_resource_preference_test.goAdds integration tests for resource-preference CRUD.
test/notifications_notification_type_test.goAdds integration tests for notification-type describe/list + autocomplete.
test/notifications_integration_test.goAdds integration tests for integration CRUD + autocomplete.
test/live/notifications_user_notification_live_test.goAdds live CRUD coverage for user-notifications.
test/live/notifications_subscription_live_test.goAdds live CRUD coverage for subscriptions (env-var gated).
test/live/notifications_resource_subscription_live_test.goAdds live CRUD coverage for resource-subscriptions (env-var gated).
test/live/notifications_resource_preference_live_test.goAdds live CRUD coverage for resource-preferences.
test/live/notifications_notification_type_live_test.goAdds live coverage for notification-type list/describe.
test/fixtures/output/notifications/user-notification/update/update-read.goldenAdds golden output for user-notification update (human).
test/fixtures/output/notifications/user-notification/update/update-invalid.goldenAdds golden output for user-notification update (404).
test/fixtures/output/notifications/user-notification/update-help.goldenAdds golden help for user-notification update.
test/fixtures/output/notifications/user-notification/list/list.goldenAdds golden output for user-notification list (human).
test/fixtures/output/notifications/user-notification/list/list-yaml.goldenAdds golden output for user-notification list (yaml).
test/fixtures/output/notifications/user-notification/list/list-type.goldenAdds golden output for user-notification list filtered by type.
test/fixtures/output/notifications/user-notification/list/list-time-range.goldenAdds golden output for user-notification list filtered by time range.
test/fixtures/output/notifications/user-notification/list/list-sort.goldenAdds golden output for user-notification list sorted.
test/fixtures/output/notifications/user-notification/list/list-severity.goldenAdds golden output for user-notification list filtered by severity.
test/fixtures/output/notifications/user-notification/list/list-search.goldenAdds golden output for user-notification list filtered by search.
test/fixtures/output/notifications/user-notification/list/list-read.goldenAdds golden output for user-notification list filtered by read.
test/fixtures/output/notifications/user-notification/list/list-json.goldenAdds golden output for user-notification list (json).
test/fixtures/output/notifications/user-notification/list/list-include.goldenAdds golden output for user-notification list with include fields.
test/fixtures/output/notifications/user-notification/list/list-crn.goldenAdds golden output for user-notification list filtered by CRN.
test/fixtures/output/notifications/user-notification/list-help.goldenAdds golden help for user-notification list.
test/fixtures/output/notifications/user-notification/help.goldenAdds golden help for user-notification command group.
test/fixtures/output/notifications/user-notification/describe/describe.goldenAdds golden output for user-notification describe (human).
test/fixtures/output/notifications/user-notification/describe/describe-yaml.goldenAdds golden output for user-notification describe (yaml).
test/fixtures/output/notifications/user-notification/describe/describe-json.goldenAdds golden output for user-notification describe (json).
test/fixtures/output/notifications/user-notification/describe/describe-invalid.goldenAdds golden output for user-notification describe (404).
test/fixtures/output/notifications/user-notification/describe/describe-autocomplete.goldenAdds golden output for user-notification autocomplete.
test/fixtures/output/notifications/user-notification/describe-help.goldenAdds golden help for user-notification describe.
test/fixtures/output/notifications/subscription/update/update-invalid.goldenAdds golden output for subscription update (404).
test/fixtures/output/notifications/subscription/update/update-integrations.goldenAdds golden output for subscription update integrations (human).
test/fixtures/output/notifications/subscription/update/update-current-state.goldenAdds golden output for subscription update current-state (human).
test/fixtures/output/notifications/subscription/update-help.goldenAdds golden help for subscription update.
test/fixtures/output/notifications/subscription/list/list.goldenAdds golden output for subscription list (human).
test/fixtures/output/notifications/subscription/list/list-yaml.goldenAdds golden output for subscription list (yaml).
test/fixtures/output/notifications/subscription/list/list-json.goldenAdds golden output for subscription list (json).
test/fixtures/output/notifications/subscription/list-help.goldenAdds golden help for subscription list.
test/fixtures/output/notifications/subscription/help.goldenAdds golden help for subscription command group.
test/fixtures/output/notifications/subscription/describe/describe.goldenAdds golden output for subscription describe (human).
test/fixtures/output/notifications/subscription/describe/describe-yaml.goldenAdds golden output for subscription describe (yaml).
test/fixtures/output/notifications/subscription/describe/describe-json.goldenAdds golden output for subscription describe (json).
test/fixtures/output/notifications/subscription/describe/describe-invalid.goldenAdds golden output for subscription describe (404).
test/fixtures/output/notifications/subscription/describe/describe-autocomplete.goldenAdds golden output for subscription describe autocomplete.
test/fixtures/output/notifications/subscription/describe-help.goldenAdds golden help for subscription describe.
test/fixtures/output/notifications/subscription/delete/delete.goldenAdds golden output for subscription delete (force).
test/fixtures/output/notifications/subscription/delete/delete-no-force.goldenAdds golden output for subscription delete (prompt).
test/fixtures/output/notifications/subscription/delete/delete-multiple.goldenAdds golden output for multi-delete subscriptions.
test/fixtures/output/notifications/subscription/delete/delete-invalid.goldenAdds golden output for subscription delete invalid + suggestions.
test/fixtures/output/notifications/subscription/delete/delete-autocomplete.goldenAdds golden output for subscription delete autocomplete.
test/fixtures/output/notifications/subscription/delete-help.goldenAdds golden help for subscription delete.
test/fixtures/output/notifications/subscription/create/create.goldenAdds golden output for subscription create (human).
test/fixtures/output/notifications/subscription/create/create-current-state.goldenAdds golden output for subscription create with current-state.
test/fixtures/output/notifications/subscription/create-help.goldenAdds golden help for subscription create.
test/fixtures/output/notifications/resource-subscription/update/update-resource.goldenAdds golden output for resource-subscription update resource.
test/fixtures/output/notifications/resource-subscription/update/update-resource-type.goldenAdds golden output for resource-subscription update resource-type.
test/fixtures/output/notifications/resource-subscription/update/update-invalid.goldenAdds golden output for resource-subscription update (404).
test/fixtures/output/notifications/resource-subscription/update/update-integrations.goldenAdds golden output for resource-subscription update integrations.
test/fixtures/output/notifications/resource-subscription/update/update-current-state.goldenAdds golden output for resource-subscription update current-state.
test/fixtures/output/notifications/resource-subscription/update-help.goldenAdds golden help for resource-subscription update.
test/fixtures/output/notifications/resource-subscription/help.goldenAdds golden help for resource-subscription command group.
test/fixtures/output/notifications/resource-subscription/describe/describe.goldenAdds golden output for resource-subscription describe (human).
test/fixtures/output/notifications/resource-subscription/describe/describe-yaml.goldenAdds golden output for resource-subscription describe (yaml).
test/fixtures/output/notifications/resource-subscription/describe/describe-json.goldenAdds golden output for resource-subscription describe (json).
test/fixtures/output/notifications/resource-subscription/describe/describe-invalid.goldenAdds golden output for resource-subscription describe (404).
test/fixtures/output/notifications/resource-subscription/describe-help.goldenAdds golden help for resource-subscription describe.
test/fixtures/output/notifications/resource-subscription/delete/delete.goldenAdds golden output for resource-subscription delete (force).
test/fixtures/output/notifications/resource-subscription/delete/delete-no-force.goldenAdds golden output for resource-subscription delete (prompt).
test/fixtures/output/notifications/resource-subscription/delete/delete-multiple.goldenAdds golden output for multi-delete resource-subscriptions.
test/fixtures/output/notifications/resource-subscription/delete/delete-invalid.goldenAdds golden output for resource-subscription delete invalid + suggestions.
test/fixtures/output/notifications/resource-subscription/delete-help.goldenAdds golden help for resource-subscription delete.
test/fixtures/output/notifications/resource-subscription/create/create.goldenAdds golden output for resource-subscription create (human).
test/fixtures/output/notifications/resource-subscription/create/create-current-state.goldenAdds golden output for resource-subscription create with current-state.
test/fixtures/output/notifications/resource-subscription/create-help.goldenAdds golden help for resource-subscription create.
test/fixtures/output/notifications/resource-preference/update/update-resource.goldenAdds golden output for resource-preference update resource.
test/fixtures/output/notifications/resource-preference/update/update-resource-type.goldenAdds golden output for resource-preference update resource-type.
test/fixtures/output/notifications/resource-preference/update/update-invalid.goldenAdds golden output for resource-preference update (404).
test/fixtures/output/notifications/resource-preference/update/update-current-state.goldenAdds golden output for resource-preference update current-state.
test/fixtures/output/notifications/resource-preference/update-help.goldenAdds golden help for resource-preference update.
test/fixtures/output/notifications/resource-preference/help.goldenAdds golden help for resource-preference command group.
test/fixtures/output/notifications/resource-preference/describe/describe.goldenAdds golden output for resource-preference describe (human).
test/fixtures/output/notifications/resource-preference/describe/describe-yaml.goldenAdds golden output for resource-preference describe (yaml).
test/fixtures/output/notifications/resource-preference/describe/describe-json.goldenAdds golden output for resource-preference describe (json).
test/fixtures/output/notifications/resource-preference/describe/describe-invalid.goldenAdds golden output for resource-preference describe (404).
test/fixtures/output/notifications/resource-preference/describe-help.goldenAdds golden help for resource-preference describe.
test/fixtures/output/notifications/resource-preference/delete/delete.goldenAdds golden output for resource-preference delete (force).
test/fixtures/output/notifications/resource-preference/delete/delete-no-force.goldenAdds golden output for resource-preference delete (prompt).
test/fixtures/output/notifications/resource-preference/delete/delete-multiple.goldenAdds golden output for multi-delete resource-preferences.
test/fixtures/output/notifications/resource-preference/delete/delete-invalid.goldenAdds golden output for resource-preference delete invalid + suggestions.
test/fixtures/output/notifications/resource-preference/delete-help.goldenAdds golden help for resource-preference delete.
test/fixtures/output/notifications/resource-preference/create/create.goldenAdds golden output for resource-preference create (human).
test/fixtures/output/notifications/resource-preference/create/create-current-state.goldenAdds golden output for resource-preference create with current-state.
test/fixtures/output/notifications/resource-preference/create-help.goldenAdds golden help for resource-preference create.
test/fixtures/output/notifications/notification-type/list/list.goldenAdds golden output for notification-type list (human).
test/fixtures/output/notifications/notification-type/list/list-yaml.goldenAdds golden output for notification-type list (yaml).
test/fixtures/output/notifications/notification-type/list/list-resource-type.goldenAdds golden output for notification-type list filtered by resource-type.
test/fixtures/output/notifications/notification-type/list/list-json.goldenAdds golden output for notification-type list (json).
test/fixtures/output/notifications/notification-type/list-help.goldenAdds golden help for notification-type list.
test/fixtures/output/notifications/notification-type/help.goldenAdds golden help for notification-type command group.
test/fixtures/output/notifications/notification-type/describe/describe.goldenAdds golden output for notification-type describe (human).
test/fixtures/output/notifications/notification-type/describe/describe-yaml.goldenAdds golden output for notification-type describe (yaml).
test/fixtures/output/notifications/notification-type/describe/describe-json.goldenAdds golden output for notification-type describe (json).
test/fixtures/output/notifications/notification-type/describe/describe-invalid.goldenAdds golden output for notification-type describe (404).
test/fixtures/output/notifications/notification-type/describe/describe-autocomplete.goldenAdds golden output for notification-type autocomplete.
test/fixtures/output/notifications/notification-type/describe-help.goldenAdds golden help for notification-type describe.
test/fixtures/output/notifications/integration/update/update-webhook-target.goldenAdds golden output for integration update webhook target.
test/fixtures/output/notifications/integration/update/update-slack-target.goldenAdds golden output for integration update slack target.
test/fixtures/output/notifications/integration/update/update-ms-teams-target.goldenAdds golden output for integration update MsTeams target.
test/fixtures/output/notifications/integration/update/update-invalid.goldenAdds golden output for integration update (404).
test/fixtures/output/notifications/integration/update/update-display-name.goldenAdds golden output for integration update display-name.
test/fixtures/output/notifications/integration/update/update-description.goldenAdds golden output for integration update description.
test/fixtures/output/notifications/integration/update-help.goldenAdds golden help for integration update.
test/fixtures/output/notifications/integration/list/list.goldenAdds golden output for integration list (human).
test/fixtures/output/notifications/integration/list/list-yaml.goldenAdds golden output for integration list (yaml).
test/fixtures/output/notifications/integration/list/list-json.goldenAdds golden output for integration list (json).
test/fixtures/output/notifications/integration/list-help.goldenAdds golden help for integration list.
test/fixtures/output/notifications/integration/help.goldenAdds golden help for integration command group.
test/fixtures/output/notifications/integration/describe/describe-yaml.goldenAdds golden output for integration describe (yaml).
test/fixtures/output/notifications/integration/describe/describe-webhook-target.goldenAdds golden output for integration describe webhook target.
test/fixtures/output/notifications/integration/describe/describe-user-email-target.goldenAdds golden output for integration describe user-email target.
test/fixtures/output/notifications/integration/describe/describe-slack-target.goldenAdds golden output for integration describe slack target.
test/fixtures/output/notifications/integration/describe/describe-role-email-target.goldenAdds golden output for integration describe role-email target.
test/fixtures/output/notifications/integration/describe/describe-ms-teams-target.goldenAdds golden output for integration describe MsTeams target.
test/fixtures/output/notifications/integration/describe/describe-json.goldenAdds golden output for integration describe (json).
test/fixtures/output/notifications/integration/describe/describe-invalid.goldenAdds golden output for integration describe (404).
test/fixtures/output/notifications/integration/describe/describe-in-app-target.goldenAdds golden output for integration describe in-app target.
test/fixtures/output/notifications/integration/describe/describe-autocomplete.goldenAdds golden output for integration autocomplete.
test/fixtures/output/notifications/integration/describe-help.goldenAdds golden help for integration describe.
test/fixtures/output/notifications/integration/delete/delete.goldenAdds golden output for integration delete (force).
test/fixtures/output/notifications/integration/delete/delete-no-force.goldenAdds golden output for integration delete (prompt).
test/fixtures/output/notifications/integration/delete/delete-multiple.goldenAdds golden output for multi-delete integrations.
test/fixtures/output/notifications/integration/delete/delete-invalid.goldenAdds golden output for integration delete invalid + suggestions.
test/fixtures/output/notifications/integration/delete/delete-autocomplete.goldenAdds golden output for integration delete autocomplete.
test/fixtures/output/notifications/integration/delete-help.goldenAdds golden help for integration delete.
test/fixtures/output/notifications/integration/create/create-webhook-target.goldenAdds golden output for integration create webhook target.
test/fixtures/output/notifications/integration/create/create-slack-target.goldenAdds golden output for integration create slack target.
test/fixtures/output/notifications/integration/create/create-ms-teams-target.goldenAdds golden output for integration create MsTeams target.
test/fixtures/output/notifications/integration/create/create-description.goldenAdds golden output for integration create with description.
test/fixtures/output/notifications/integration/create-help.goldenAdds golden help for integration create.
test/fixtures/output/notifications/help.goldenAdds golden help for top-level notifications command group.
test/fixtures/output/help.goldenAdds the notifications entry to root help golden.
test/fixtures/input/notifications/user-notification/read_created_user_notification.jsonAdds fixture payload for reading user-notifications.
test/fixtures/input/notifications/user-notification/create_user_notification.jsonAdds fixture payload for creating user-notifications.
test/fixtures/input/notifications/subscription/read_created_subscription.jsonAdds fixture payload for reading subscriptions.
test/fixtures/input/notifications/subscription/create_subscription.jsonAdds fixture payload for creating subscriptions.
test/fixtures/input/notifications/resource-subscription/read_created_resource_subscription.jsonAdds fixture payload for reading resource-subscriptions.
test/fixtures/input/notifications/resource-subscription/create_resource_subscription.jsonAdds fixture payload for creating resource-subscriptions.
test/fixtures/input/notifications/resource-preference/read_created_resource_preference.jsonAdds fixture payload for reading resource-preferences.
test/fixtures/input/notifications/resource-preference/create_resource_preference.jsonAdds fixture payload for creating resource-preferences.
test/fixtures/input/notifications/notification-type/read_created_notification_type.jsonAdds fixture payload for reading notification-types.
test/fixtures/input/notifications/notification-type/create_notification_type.jsonAdds fixture payload for creating notification-types.
test/fixtures/input/notifications/integration/read_created_webhook_target.jsonAdds fixture payload for reading webhook integration targets.
test/fixtures/input/notifications/integration/read_created_user_email_target.jsonAdds fixture payload for reading user-email integration targets.
test/fixtures/input/notifications/integration/read_created_slack_target.jsonAdds fixture payload for reading slack integration targets.
test/fixtures/input/notifications/integration/read_created_role_email_target.jsonAdds fixture payload for reading role-email integration targets.
test/fixtures/input/notifications/integration/read_created_ms_teams_target.jsonAdds fixture payload for reading MsTeams integration targets.
test/fixtures/input/notifications/integration/read_created_in_app_target.jsonAdds fixture payload for reading in-app integration targets.
test/fixtures/input/notifications/integration/create_webhook_target.jsonAdds fixture payload for creating webhook integration targets.
test/fixtures/input/notifications/integration/create_user_email_target.jsonAdds fixture payload for creating user-email integration targets.
test/fixtures/input/notifications/integration/create_slack_target.jsonAdds fixture payload for creating slack integration targets.
test/fixtures/input/notifications/integration/create_role_email_target.jsonAdds fixture payload for creating role-email integration targets.
test/fixtures/input/notifications/integration/create_ms_teams_target.jsonAdds fixture payload for creating MsTeams integration targets.
test/fixtures/input/notifications/integration/create_in_app_target.jsonAdds fixture payload for creating in-app integration targets.
pkg/ccloudv2/notifications.goAdds Notifications v1 client + wrapper methods for CRUD/list operations.
pkg/ccloudv2/client.goRegisters NotificationsClient on the shared CCloud v2 client.
internal/notifications/command.goAdds the top-level notifications command and subcommand registration.
internal/notifications/command_user_notification.goAdds user-notification command group, output formatting, and autocomplete.
internal/notifications/command_user_notification_update.goAdds user-notification update command + --read support.
internal/notifications/command_user_notification_list.goAdds user-notification list command + filtering flags.
internal/notifications/command_user_notification_describe.goAdds user-notification describe command.
internal/notifications/command_subscription.goAdds subscription command group, output formatting, and autocomplete.
internal/notifications/command_subscription_update.goAdds subscription update command + flags.
internal/notifications/command_subscription_list.goAdds subscription list command.
internal/notifications/command_subscription_describe.goAdds subscription describe command.
internal/notifications/command_subscription_delete.goAdds subscription delete (multi-delete) using shared deletion helpers.
internal/notifications/command_subscription_create.goAdds subscription create command + flags.
internal/notifications/command_resource_subscription.goAdds resource-subscription command group + output formatting.
internal/notifications/command_resource_subscription_update.goAdds resource-subscription update command + flags.
internal/notifications/command_resource_subscription_describe.goAdds resource-subscription describe command.
internal/notifications/command_resource_subscription_delete.goAdds resource-subscription delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_subscription_create.goAdds resource-subscription create command + flags.
internal/notifications/command_resource_preference.goAdds resource-preference command group + output formatting.
internal/notifications/command_resource_preference_update.goAdds resource-preference update command + flags.
internal/notifications/command_resource_preference_describe.goAdds resource-preference describe command.
internal/notifications/command_resource_preference_delete.goAdds resource-preference delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_preference_create.goAdds resource-preference create command + flags.
internal/notifications/command_notification_type.goAdds notification-type command group + output formatting + autocomplete.
internal/notifications/command_notification_type_list.goAdds notification-type list command + filter flag.
internal/notifications/command_notification_type_describe.goAdds notification-type describe command.
internal/notifications/command_integration.goAdds integration command group + output formatting + autocomplete.
internal/notifications/command_integration_update.goAdds integration update command + target-kind handling.
internal/notifications/command_integration_list.goAdds integration list command.
internal/notifications/command_integration_describe.goAdds integration describe command.
internal/notifications/command_integration_delete.goAdds integration delete (multi-delete) using deletion helpers.
internal/notifications/command_integration_create.goAdds integration create command + target-kind handling.
internal/command.goRegisters notifications under the root command.
go.sumAdds checksums for the notifications internal SDK module.
go.modAdds dependency on github.com/confluentinc/ccloud-sdk-go-v2-internal/notifications.
cmd/lint/main.goExtends spellcheck vocabulary for new notifications-related terms.
.cli-generation-checksumUpdates generator checksum to reflect regenerated sources.
Files not reviewed (25)
  • internal/notifications/command.go: Generated file
  • internal/notifications/command_integration.go: Generated file
  • internal/notifications/command_integration_create.go: Generated file
  • internal/notifications/command_integration_delete.go: Generated file
  • internal/notifications/command_integration_describe.go: Generated file
  • internal/notifications/command_integration_list.go: Generated file
  • internal/notifications/command_integration_update.go: Generated file
  • internal/notifications/command_notification_type.go: Generated file
  • internal/notifications/command_notification_type_describe.go: Generated file
  • internal/notifications/command_notification_type_list.go: Generated file
  • internal/notifications/command_resource_preference.go: Generated file
  • internal/notifications/command_resource_preference_create.go: Generated file
  • internal/notifications/command_resource_preference_delete.go: Generated file
  • internal/notifications/command_resource_preference_describe.go: Generated file
  • internal/notifications/command_resource_preference_update.go: Generated file
  • internal/notifications/command_resource_subscription.go: Generated file
  • internal/notifications/command_resource_subscription_create.go: Generated file
  • internal/notifications/command_resource_subscription_delete.go: Generated file
  • internal/notifications/command_resource_subscription_describe.go: Generated file
  • internal/notifications/command_resource_subscription_update.go: Generated file
  • internal/notifications/command_subscription.go: Generated file
  • internal/notifications/command_subscription_create.go: Generated file
  • internal/notifications/command_subscription_delete.go: Generated file
  • internal/notifications/command_subscription_describe.go: Generated file
  • internal/notifications/command_subscription_list.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadinternal/notifications/command_subscription_create.go Outdated
Comment threadinternal/notifications/command_subscription_update.go Outdated
Comment threadinternal/notifications/command_integration_create.go
Comment threadinternal/notifications/command_integration_update.go
Comment threadinternal/notifications/command_resource_subscription_create.go Outdated
Comment threadcmd/lint/main.go Outdated
Comment threadinternal/notifications/command_resource_subscription_update.go Outdated
Two files conflicted.
test/fixtures/output/help.golden: main renamed `unified-stream-manager` to
`usm`, which shortened cobra's longest command name and re-padded every line in
the Available Commands block. Took main's block and regenerated the golden with
`go test ./test -run TestCLI/TestHelp -update`, which re-added the
notifications line at the new padding.
.cli-generation-checksum: main carries the flink region suite's value, this
branch carries notifications'. Kept this branch's. The file records the
last-generated suite only and drives PR labeling, so neither value is a drift
signal.
go build ./... and go test ./test -run TestCLI/TestNotifications both pass on
the merge result.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Picks up cli-terraform-generator's allow-list remedy fix. Eight stringSlice
flags now carry the CLI's own comma-separated-list wording instead of the
spec's HTTP-shape prose, the notifications parent command's Short registers
"Cloud Notifications", and one capitalized common noun is fixed in the spec.
Removes "Integrations" from properNouns: it was registered by an earlier merge
to satisfy one flag's help text, and RequireCapitalizeProperNouns then mandated
that capitalization across the whole CLI, failing three descriptions in
`confluent provider-integration`. "recieve" goes with the spec typo it covered.
`make lint-cli` passes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@airlock-confluentinc
airlock-confluentincBotforce-pushed the onboard-notifications-integration branch from 8d059d9 to ccc3483CompareAugust 14, 2026 16:26
ccloud-sdk-go-v2/notifications v0.1.0 is published, so the six commands and
their test-server handlers import it instead of the -internal path. The Alpine
docker build runs go build in a container with no GitHub credentials and the
repo carries no vendor/, so a private module cannot resolve there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

A list command's -o json output is a JSON array, not an object, so
Unmarshal into a map failed and fell through to the table-fallback
path, which grabbed the ASCII separator row as a fake id. Try an
array first and pull the id from its first element; fall back to a
plain object for describe-style output. Drop the table-parsing path
entirely — every CaptureID call site pairs with -o json now.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…r fixes
The last merge predated several generator-side fixes: the zeroCheck
replacement for optional StringSlice query params (a []string flag
never reads as a literal nil, so severity/resource-type/resource-crn/
sort filters were always sent even when unset), the switch from a
literal {id} placeholder to the spec's own example values in create/
update test args, and the List-before-Describe reordering plus -o
json request on every live-test List step used for ID capture.
Regenerated command/wrapper/test-server/fixture/golden files for
Integration, Subscription, ResourcePreference, ResourceSubscription,
NotificationType, and UserNotification.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nds to pick up objectref_write_placeholders
An array-valued ObjectReference field (integrations) built each element
as {Id: id} only, leaving the SDK's required related/resource_name
fields as empty strings on the wire. The real API rejects that with a
400. cli.objectref_write_placeholders already covered the scalar
notification_type case; this regeneration picks up the generator-side
fix that ported the same placeholder injection into the array-building
loops of create and update.
Regenerated Subscription and ResourceSubscription via cli-tfgen
--official-sdk to avoid a local SDK replace directive in go.mod.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

Sign up for freeto 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

@alexfayad
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Add the six notifications commands - #3443

Open
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration
Open

Add the six notifications commands#3443
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration

Conversation

@alexfayad

@alexfayadAlexander Fayad (alexfayad) commented Aug 13, 2026

Copy link
Copy Markdown

Release Notes

New Features

  • Add confluent notifications commands for managing notification integrations, subscriptions, resource preferences, resource subscriptions, notification types, and in-app user notifications.

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

Onboards Confluent Cloud Notifications to the CLI. Adds six command groups under confluent notifications: integration, subscription, resource-preference, resource-subscription, notification-type, and user-notification.

The code is generated by cli-terraform-generator from the notifications OpenAPI spec and Go SDK. The commands, the pkg/ccloudv2 wrapper, the test-server handlers, the integration tests, the live tests, and the goldens all come from the generator.

One API-specific workaround is baked in. The related and resource_name sub-fields of the shared GlobalObjectReference are marked required, readOnly, and format: uri in the spec, and the SDK serializes them unconditionally. A create that carried only id sent an empty string for both and Confluent Cloud rejected it with 400 Bad Request. The generated subscription and resource-subscription commands now fill both fields with a placeholder URI on create and update, matching the workaround the published confluent_ksql_cluster Terraform resource already uses.

Confluent Cloud only.

Blast Radius

New commands only. No existing command changes, and nothing outside internal/notifications shares this code. If a notifications command misbehaves, only customers running confluent notifications ... are affected.

References

Test & Review

Built a custom binary and ran the notifications commands against a real Confluent Cloud org. Verified create / describe / list / delete for integration, and create / describe / update / delete for subscription and resource-subscription with a multi-element integrations value, all without the prior 400. Generated integration and live tests are included.

CLI create against real Confluent Cloud (before/after the fix)

Before the fix, related/resource_name went out as a non-URI placeholder and Confluent Cloud rejected the create against the spec's format: uri on /integrations/0/related:

POST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"_","resource_name":"_"}],"notification_type":{"id":"nt-9KD1p","related":"_","resource_name":"_"}}HTTP/2.0 400 Bad Request{"errors":[{"status":"400","code":"1101","title":"Invalid request body","detail":"Invalid Json: Invalid request body","source":{"pointer":"/integrations/0/related"}}]}Error: Invalid Json: Invalid request body

The shipped command fills both fields with a placeholder URI and the create succeeds:

$ confluent notifications subscription create --notification-type nt-9KD1p --integrations i-59wqM --current-state ENABLED -o jsonPOST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}],"notification_type":{"id":"nt-9KD1p","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}}HTTP/2.0 201 Created{ "id": "s-gAXVpd", "notification_type": "nt-9KD1p", "current_state": "ENABLED"}

🤖 Generated with Claude Code

Generated by cli-terraform-generator merge mode from the notifications v1
OpenAPI spec: integration, subscription, resource-preference,
resource-subscription, notification-type, and user-notification, plus their
ccloudv2 wrappers, test-server handlers, integration tests, input fixtures,
output goldens, and live tests.
The integration command's target is a oneOf. Update leaves --kind optional so
an update touching only display-name or description is accepted, and rejects a
variant flag supplied without --kind rather than silently dropping it.
Verified with go build ./..., go vet, and
go test ./test/ -run 'TestCLI/TestNotifications'.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 13, 2026 18:00
@confluent-cla-assistant

confluent-cla-assistantBot commented Aug 13, 2026

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.

CopilotAI 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

This pull request introduces a new top-level notifications command group backed by the Notifications v1 CCloud SDK, adds the corresponding test-server endpoints, and wires in integration/live tests plus golden fixtures to validate CLI behavior.

Changes:

  • Add Notifications v1 API client bootstrap + CRUD/list wrappers in pkg/ccloudv2, and register the client on the shared ccloudv2.Client.
  • Add internal/notifications Cobra command tree (integrations, notification-types, resource-preferences, resource-subscriptions, subscriptions, user-notifications) and register it under the root command.
  • Extend the test server router + handlers, add integration/live tests, and add input/output fixtures + goldens for the new commands.

Reviewed changes

Copilot reviewed 185 out of 211 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
test/test-server/notifications_user_notification_handler.goAdds test-server handlers for user-notifications list/get/patch.
test/test-server/notifications_subscription_handler.goAdds test-server handlers for subscriptions list/create/get/update/delete.
test/test-server/notifications_resource_subscription_handler.goAdds test-server handlers for resource-subscriptions create/get/update/delete.
test/test-server/notifications_resource_preference_handler.goAdds test-server handlers for resource-preferences create/get/update/delete.
test/test-server/notifications_notification_type_handler.goAdds test-server handlers for notification-types list/get.
test/test-server/notifications_integration_handler.goAdds test-server handlers for integrations list/create/get/update/delete.
test/test-server/ccloudv2_router.goRegisters Notifications v1 routes in the test-server router.
test/notifications_user_notification_test.goAdds integration tests for user-notification describe/list/update + autocomplete.
test/notifications_subscription_test.goAdds integration tests for subscription CRUD + autocomplete.
test/notifications_resource_subscription_test.goAdds integration tests for resource-subscription CRUD.
test/notifications_resource_preference_test.goAdds integration tests for resource-preference CRUD.
test/notifications_notification_type_test.goAdds integration tests for notification-type describe/list + autocomplete.
test/notifications_integration_test.goAdds integration tests for integration CRUD + autocomplete.
test/live/notifications_user_notification_live_test.goAdds live CRUD coverage for user-notifications.
test/live/notifications_subscription_live_test.goAdds live CRUD coverage for subscriptions (env-var gated).
test/live/notifications_resource_subscription_live_test.goAdds live CRUD coverage for resource-subscriptions (env-var gated).
test/live/notifications_resource_preference_live_test.goAdds live CRUD coverage for resource-preferences.
test/live/notifications_notification_type_live_test.goAdds live coverage for notification-type list/describe.
test/fixtures/output/notifications/user-notification/update/update-read.goldenAdds golden output for user-notification update (human).
test/fixtures/output/notifications/user-notification/update/update-invalid.goldenAdds golden output for user-notification update (404).
test/fixtures/output/notifications/user-notification/update-help.goldenAdds golden help for user-notification update.
test/fixtures/output/notifications/user-notification/list/list.goldenAdds golden output for user-notification list (human).
test/fixtures/output/notifications/user-notification/list/list-yaml.goldenAdds golden output for user-notification list (yaml).
test/fixtures/output/notifications/user-notification/list/list-type.goldenAdds golden output for user-notification list filtered by type.
test/fixtures/output/notifications/user-notification/list/list-time-range.goldenAdds golden output for user-notification list filtered by time range.
test/fixtures/output/notifications/user-notification/list/list-sort.goldenAdds golden output for user-notification list sorted.
test/fixtures/output/notifications/user-notification/list/list-severity.goldenAdds golden output for user-notification list filtered by severity.
test/fixtures/output/notifications/user-notification/list/list-search.goldenAdds golden output for user-notification list filtered by search.
test/fixtures/output/notifications/user-notification/list/list-read.goldenAdds golden output for user-notification list filtered by read.
test/fixtures/output/notifications/user-notification/list/list-json.goldenAdds golden output for user-notification list (json).
test/fixtures/output/notifications/user-notification/list/list-include.goldenAdds golden output for user-notification list with include fields.
test/fixtures/output/notifications/user-notification/list/list-crn.goldenAdds golden output for user-notification list filtered by CRN.
test/fixtures/output/notifications/user-notification/list-help.goldenAdds golden help for user-notification list.
test/fixtures/output/notifications/user-notification/help.goldenAdds golden help for user-notification command group.
test/fixtures/output/notifications/user-notification/describe/describe.goldenAdds golden output for user-notification describe (human).
test/fixtures/output/notifications/user-notification/describe/describe-yaml.goldenAdds golden output for user-notification describe (yaml).
test/fixtures/output/notifications/user-notification/describe/describe-json.goldenAdds golden output for user-notification describe (json).
test/fixtures/output/notifications/user-notification/describe/describe-invalid.goldenAdds golden output for user-notification describe (404).
test/fixtures/output/notifications/user-notification/describe/describe-autocomplete.goldenAdds golden output for user-notification autocomplete.
test/fixtures/output/notifications/user-notification/describe-help.goldenAdds golden help for user-notification describe.
test/fixtures/output/notifications/subscription/update/update-invalid.goldenAdds golden output for subscription update (404).
test/fixtures/output/notifications/subscription/update/update-integrations.goldenAdds golden output for subscription update integrations (human).
test/fixtures/output/notifications/subscription/update/update-current-state.goldenAdds golden output for subscription update current-state (human).
test/fixtures/output/notifications/subscription/update-help.goldenAdds golden help for subscription update.
test/fixtures/output/notifications/subscription/list/list.goldenAdds golden output for subscription list (human).
test/fixtures/output/notifications/subscription/list/list-yaml.goldenAdds golden output for subscription list (yaml).
test/fixtures/output/notifications/subscription/list/list-json.goldenAdds golden output for subscription list (json).
test/fixtures/output/notifications/subscription/list-help.goldenAdds golden help for subscription list.
test/fixtures/output/notifications/subscription/help.goldenAdds golden help for subscription command group.
test/fixtures/output/notifications/subscription/describe/describe.goldenAdds golden output for subscription describe (human).
test/fixtures/output/notifications/subscription/describe/describe-yaml.goldenAdds golden output for subscription describe (yaml).
test/fixtures/output/notifications/subscription/describe/describe-json.goldenAdds golden output for subscription describe (json).
test/fixtures/output/notifications/subscription/describe/describe-invalid.goldenAdds golden output for subscription describe (404).
test/fixtures/output/notifications/subscription/describe/describe-autocomplete.goldenAdds golden output for subscription describe autocomplete.
test/fixtures/output/notifications/subscription/describe-help.goldenAdds golden help for subscription describe.
test/fixtures/output/notifications/subscription/delete/delete.goldenAdds golden output for subscription delete (force).
test/fixtures/output/notifications/subscription/delete/delete-no-force.goldenAdds golden output for subscription delete (prompt).
test/fixtures/output/notifications/subscription/delete/delete-multiple.goldenAdds golden output for multi-delete subscriptions.
test/fixtures/output/notifications/subscription/delete/delete-invalid.goldenAdds golden output for subscription delete invalid + suggestions.
test/fixtures/output/notifications/subscription/delete/delete-autocomplete.goldenAdds golden output for subscription delete autocomplete.
test/fixtures/output/notifications/subscription/delete-help.goldenAdds golden help for subscription delete.
test/fixtures/output/notifications/subscription/create/create.goldenAdds golden output for subscription create (human).
test/fixtures/output/notifications/subscription/create/create-current-state.goldenAdds golden output for subscription create with current-state.
test/fixtures/output/notifications/subscription/create-help.goldenAdds golden help for subscription create.
test/fixtures/output/notifications/resource-subscription/update/update-resource.goldenAdds golden output for resource-subscription update resource.
test/fixtures/output/notifications/resource-subscription/update/update-resource-type.goldenAdds golden output for resource-subscription update resource-type.
test/fixtures/output/notifications/resource-subscription/update/update-invalid.goldenAdds golden output for resource-subscription update (404).
test/fixtures/output/notifications/resource-subscription/update/update-integrations.goldenAdds golden output for resource-subscription update integrations.
test/fixtures/output/notifications/resource-subscription/update/update-current-state.goldenAdds golden output for resource-subscription update current-state.
test/fixtures/output/notifications/resource-subscription/update-help.goldenAdds golden help for resource-subscription update.
test/fixtures/output/notifications/resource-subscription/help.goldenAdds golden help for resource-subscription command group.
test/fixtures/output/notifications/resource-subscription/describe/describe.goldenAdds golden output for resource-subscription describe (human).
test/fixtures/output/notifications/resource-subscription/describe/describe-yaml.goldenAdds golden output for resource-subscription describe (yaml).
test/fixtures/output/notifications/resource-subscription/describe/describe-json.goldenAdds golden output for resource-subscription describe (json).
test/fixtures/output/notifications/resource-subscription/describe/describe-invalid.goldenAdds golden output for resource-subscription describe (404).
test/fixtures/output/notifications/resource-subscription/describe-help.goldenAdds golden help for resource-subscription describe.
test/fixtures/output/notifications/resource-subscription/delete/delete.goldenAdds golden output for resource-subscription delete (force).
test/fixtures/output/notifications/resource-subscription/delete/delete-no-force.goldenAdds golden output for resource-subscription delete (prompt).
test/fixtures/output/notifications/resource-subscription/delete/delete-multiple.goldenAdds golden output for multi-delete resource-subscriptions.
test/fixtures/output/notifications/resource-subscription/delete/delete-invalid.goldenAdds golden output for resource-subscription delete invalid + suggestions.
test/fixtures/output/notifications/resource-subscription/delete-help.goldenAdds golden help for resource-subscription delete.
test/fixtures/output/notifications/resource-subscription/create/create.goldenAdds golden output for resource-subscription create (human).
test/fixtures/output/notifications/resource-subscription/create/create-current-state.goldenAdds golden output for resource-subscription create with current-state.
test/fixtures/output/notifications/resource-subscription/create-help.goldenAdds golden help for resource-subscription create.
test/fixtures/output/notifications/resource-preference/update/update-resource.goldenAdds golden output for resource-preference update resource.
test/fixtures/output/notifications/resource-preference/update/update-resource-type.goldenAdds golden output for resource-preference update resource-type.
test/fixtures/output/notifications/resource-preference/update/update-invalid.goldenAdds golden output for resource-preference update (404).
test/fixtures/output/notifications/resource-preference/update/update-current-state.goldenAdds golden output for resource-preference update current-state.
test/fixtures/output/notifications/resource-preference/update-help.goldenAdds golden help for resource-preference update.
test/fixtures/output/notifications/resource-preference/help.goldenAdds golden help for resource-preference command group.
test/fixtures/output/notifications/resource-preference/describe/describe.goldenAdds golden output for resource-preference describe (human).
test/fixtures/output/notifications/resource-preference/describe/describe-yaml.goldenAdds golden output for resource-preference describe (yaml).
test/fixtures/output/notifications/resource-preference/describe/describe-json.goldenAdds golden output for resource-preference describe (json).
test/fixtures/output/notifications/resource-preference/describe/describe-invalid.goldenAdds golden output for resource-preference describe (404).
test/fixtures/output/notifications/resource-preference/describe-help.goldenAdds golden help for resource-preference describe.
test/fixtures/output/notifications/resource-preference/delete/delete.goldenAdds golden output for resource-preference delete (force).
test/fixtures/output/notifications/resource-preference/delete/delete-no-force.goldenAdds golden output for resource-preference delete (prompt).
test/fixtures/output/notifications/resource-preference/delete/delete-multiple.goldenAdds golden output for multi-delete resource-preferences.
test/fixtures/output/notifications/resource-preference/delete/delete-invalid.goldenAdds golden output for resource-preference delete invalid + suggestions.
test/fixtures/output/notifications/resource-preference/delete-help.goldenAdds golden help for resource-preference delete.
test/fixtures/output/notifications/resource-preference/create/create.goldenAdds golden output for resource-preference create (human).
test/fixtures/output/notifications/resource-preference/create/create-current-state.goldenAdds golden output for resource-preference create with current-state.
test/fixtures/output/notifications/resource-preference/create-help.goldenAdds golden help for resource-preference create.
test/fixtures/output/notifications/notification-type/list/list.goldenAdds golden output for notification-type list (human).
test/fixtures/output/notifications/notification-type/list/list-yaml.goldenAdds golden output for notification-type list (yaml).
test/fixtures/output/notifications/notification-type/list/list-resource-type.goldenAdds golden output for notification-type list filtered by resource-type.
test/fixtures/output/notifications/notification-type/list/list-json.goldenAdds golden output for notification-type list (json).
test/fixtures/output/notifications/notification-type/list-help.goldenAdds golden help for notification-type list.
test/fixtures/output/notifications/notification-type/help.goldenAdds golden help for notification-type command group.
test/fixtures/output/notifications/notification-type/describe/describe.goldenAdds golden output for notification-type describe (human).
test/fixtures/output/notifications/notification-type/describe/describe-yaml.goldenAdds golden output for notification-type describe (yaml).
test/fixtures/output/notifications/notification-type/describe/describe-json.goldenAdds golden output for notification-type describe (json).
test/fixtures/output/notifications/notification-type/describe/describe-invalid.goldenAdds golden output for notification-type describe (404).
test/fixtures/output/notifications/notification-type/describe/describe-autocomplete.goldenAdds golden output for notification-type autocomplete.
test/fixtures/output/notifications/notification-type/describe-help.goldenAdds golden help for notification-type describe.
test/fixtures/output/notifications/integration/update/update-webhook-target.goldenAdds golden output for integration update webhook target.
test/fixtures/output/notifications/integration/update/update-slack-target.goldenAdds golden output for integration update slack target.
test/fixtures/output/notifications/integration/update/update-ms-teams-target.goldenAdds golden output for integration update MsTeams target.
test/fixtures/output/notifications/integration/update/update-invalid.goldenAdds golden output for integration update (404).
test/fixtures/output/notifications/integration/update/update-display-name.goldenAdds golden output for integration update display-name.
test/fixtures/output/notifications/integration/update/update-description.goldenAdds golden output for integration update description.
test/fixtures/output/notifications/integration/update-help.goldenAdds golden help for integration update.
test/fixtures/output/notifications/integration/list/list.goldenAdds golden output for integration list (human).
test/fixtures/output/notifications/integration/list/list-yaml.goldenAdds golden output for integration list (yaml).
test/fixtures/output/notifications/integration/list/list-json.goldenAdds golden output for integration list (json).
test/fixtures/output/notifications/integration/list-help.goldenAdds golden help for integration list.
test/fixtures/output/notifications/integration/help.goldenAdds golden help for integration command group.
test/fixtures/output/notifications/integration/describe/describe-yaml.goldenAdds golden output for integration describe (yaml).
test/fixtures/output/notifications/integration/describe/describe-webhook-target.goldenAdds golden output for integration describe webhook target.
test/fixtures/output/notifications/integration/describe/describe-user-email-target.goldenAdds golden output for integration describe user-email target.
test/fixtures/output/notifications/integration/describe/describe-slack-target.goldenAdds golden output for integration describe slack target.
test/fixtures/output/notifications/integration/describe/describe-role-email-target.goldenAdds golden output for integration describe role-email target.
test/fixtures/output/notifications/integration/describe/describe-ms-teams-target.goldenAdds golden output for integration describe MsTeams target.
test/fixtures/output/notifications/integration/describe/describe-json.goldenAdds golden output for integration describe (json).
test/fixtures/output/notifications/integration/describe/describe-invalid.goldenAdds golden output for integration describe (404).
test/fixtures/output/notifications/integration/describe/describe-in-app-target.goldenAdds golden output for integration describe in-app target.
test/fixtures/output/notifications/integration/describe/describe-autocomplete.goldenAdds golden output for integration autocomplete.
test/fixtures/output/notifications/integration/describe-help.goldenAdds golden help for integration describe.
test/fixtures/output/notifications/integration/delete/delete.goldenAdds golden output for integration delete (force).
test/fixtures/output/notifications/integration/delete/delete-no-force.goldenAdds golden output for integration delete (prompt).
test/fixtures/output/notifications/integration/delete/delete-multiple.goldenAdds golden output for multi-delete integrations.
test/fixtures/output/notifications/integration/delete/delete-invalid.goldenAdds golden output for integration delete invalid + suggestions.
test/fixtures/output/notifications/integration/delete/delete-autocomplete.goldenAdds golden output for integration delete autocomplete.
test/fixtures/output/notifications/integration/delete-help.goldenAdds golden help for integration delete.
test/fixtures/output/notifications/integration/create/create-webhook-target.goldenAdds golden output for integration create webhook target.
test/fixtures/output/notifications/integration/create/create-slack-target.goldenAdds golden output for integration create slack target.
test/fixtures/output/notifications/integration/create/create-ms-teams-target.goldenAdds golden output for integration create MsTeams target.
test/fixtures/output/notifications/integration/create/create-description.goldenAdds golden output for integration create with description.
test/fixtures/output/notifications/integration/create-help.goldenAdds golden help for integration create.
test/fixtures/output/notifications/help.goldenAdds golden help for top-level notifications command group.
test/fixtures/output/help.goldenAdds the notifications entry to root help golden.
test/fixtures/input/notifications/user-notification/read_created_user_notification.jsonAdds fixture payload for reading user-notifications.
test/fixtures/input/notifications/user-notification/create_user_notification.jsonAdds fixture payload for creating user-notifications.
test/fixtures/input/notifications/subscription/read_created_subscription.jsonAdds fixture payload for reading subscriptions.
test/fixtures/input/notifications/subscription/create_subscription.jsonAdds fixture payload for creating subscriptions.
test/fixtures/input/notifications/resource-subscription/read_created_resource_subscription.jsonAdds fixture payload for reading resource-subscriptions.
test/fixtures/input/notifications/resource-subscription/create_resource_subscription.jsonAdds fixture payload for creating resource-subscriptions.
test/fixtures/input/notifications/resource-preference/read_created_resource_preference.jsonAdds fixture payload for reading resource-preferences.
test/fixtures/input/notifications/resource-preference/create_resource_preference.jsonAdds fixture payload for creating resource-preferences.
test/fixtures/input/notifications/notification-type/read_created_notification_type.jsonAdds fixture payload for reading notification-types.
test/fixtures/input/notifications/notification-type/create_notification_type.jsonAdds fixture payload for creating notification-types.
test/fixtures/input/notifications/integration/read_created_webhook_target.jsonAdds fixture payload for reading webhook integration targets.
test/fixtures/input/notifications/integration/read_created_user_email_target.jsonAdds fixture payload for reading user-email integration targets.
test/fixtures/input/notifications/integration/read_created_slack_target.jsonAdds fixture payload for reading slack integration targets.
test/fixtures/input/notifications/integration/read_created_role_email_target.jsonAdds fixture payload for reading role-email integration targets.
test/fixtures/input/notifications/integration/read_created_ms_teams_target.jsonAdds fixture payload for reading MsTeams integration targets.
test/fixtures/input/notifications/integration/read_created_in_app_target.jsonAdds fixture payload for reading in-app integration targets.
test/fixtures/input/notifications/integration/create_webhook_target.jsonAdds fixture payload for creating webhook integration targets.
test/fixtures/input/notifications/integration/create_user_email_target.jsonAdds fixture payload for creating user-email integration targets.
test/fixtures/input/notifications/integration/create_slack_target.jsonAdds fixture payload for creating slack integration targets.
test/fixtures/input/notifications/integration/create_role_email_target.jsonAdds fixture payload for creating role-email integration targets.
test/fixtures/input/notifications/integration/create_ms_teams_target.jsonAdds fixture payload for creating MsTeams integration targets.
test/fixtures/input/notifications/integration/create_in_app_target.jsonAdds fixture payload for creating in-app integration targets.
pkg/ccloudv2/notifications.goAdds Notifications v1 client + wrapper methods for CRUD/list operations.
pkg/ccloudv2/client.goRegisters NotificationsClient on the shared CCloud v2 client.
internal/notifications/command.goAdds the top-level notifications command and subcommand registration.
internal/notifications/command_user_notification.goAdds user-notification command group, output formatting, and autocomplete.
internal/notifications/command_user_notification_update.goAdds user-notification update command + --read support.
internal/notifications/command_user_notification_list.goAdds user-notification list command + filtering flags.
internal/notifications/command_user_notification_describe.goAdds user-notification describe command.
internal/notifications/command_subscription.goAdds subscription command group, output formatting, and autocomplete.
internal/notifications/command_subscription_update.goAdds subscription update command + flags.
internal/notifications/command_subscription_list.goAdds subscription list command.
internal/notifications/command_subscription_describe.goAdds subscription describe command.
internal/notifications/command_subscription_delete.goAdds subscription delete (multi-delete) using shared deletion helpers.
internal/notifications/command_subscription_create.goAdds subscription create command + flags.
internal/notifications/command_resource_subscription.goAdds resource-subscription command group + output formatting.
internal/notifications/command_resource_subscription_update.goAdds resource-subscription update command + flags.
internal/notifications/command_resource_subscription_describe.goAdds resource-subscription describe command.
internal/notifications/command_resource_subscription_delete.goAdds resource-subscription delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_subscription_create.goAdds resource-subscription create command + flags.
internal/notifications/command_resource_preference.goAdds resource-preference command group + output formatting.
internal/notifications/command_resource_preference_update.goAdds resource-preference update command + flags.
internal/notifications/command_resource_preference_describe.goAdds resource-preference describe command.
internal/notifications/command_resource_preference_delete.goAdds resource-preference delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_preference_create.goAdds resource-preference create command + flags.
internal/notifications/command_notification_type.goAdds notification-type command group + output formatting + autocomplete.
internal/notifications/command_notification_type_list.goAdds notification-type list command + filter flag.
internal/notifications/command_notification_type_describe.goAdds notification-type describe command.
internal/notifications/command_integration.goAdds integration command group + output formatting + autocomplete.
internal/notifications/command_integration_update.goAdds integration update command + target-kind handling.
internal/notifications/command_integration_list.goAdds integration list command.
internal/notifications/command_integration_describe.goAdds integration describe command.
internal/notifications/command_integration_delete.goAdds integration delete (multi-delete) using deletion helpers.
internal/notifications/command_integration_create.goAdds integration create command + target-kind handling.
internal/command.goRegisters notifications under the root command.
go.sumAdds checksums for the notifications internal SDK module.
go.modAdds dependency on github.com/confluentinc/ccloud-sdk-go-v2-internal/notifications.
cmd/lint/main.goExtends spellcheck vocabulary for new notifications-related terms.
.cli-generation-checksumUpdates generator checksum to reflect regenerated sources.
Files not reviewed (25)
  • internal/notifications/command.go: Generated file
  • internal/notifications/command_integration.go: Generated file
  • internal/notifications/command_integration_create.go: Generated file
  • internal/notifications/command_integration_delete.go: Generated file
  • internal/notifications/command_integration_describe.go: Generated file
  • internal/notifications/command_integration_list.go: Generated file
  • internal/notifications/command_integration_update.go: Generated file
  • internal/notifications/command_notification_type.go: Generated file
  • internal/notifications/command_notification_type_describe.go: Generated file
  • internal/notifications/command_notification_type_list.go: Generated file
  • internal/notifications/command_resource_preference.go: Generated file
  • internal/notifications/command_resource_preference_create.go: Generated file
  • internal/notifications/command_resource_preference_delete.go: Generated file
  • internal/notifications/command_resource_preference_describe.go: Generated file
  • internal/notifications/command_resource_preference_update.go: Generated file
  • internal/notifications/command_resource_subscription.go: Generated file
  • internal/notifications/command_resource_subscription_create.go: Generated file
  • internal/notifications/command_resource_subscription_delete.go: Generated file
  • internal/notifications/command_resource_subscription_describe.go: Generated file
  • internal/notifications/command_resource_subscription_update.go: Generated file
  • internal/notifications/command_subscription.go: Generated file
  • internal/notifications/command_subscription_create.go: Generated file
  • internal/notifications/command_subscription_delete.go: Generated file
  • internal/notifications/command_subscription_describe.go: Generated file
  • internal/notifications/command_subscription_list.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadinternal/notifications/command_subscription_create.go Outdated
Comment threadinternal/notifications/command_subscription_update.go Outdated
Comment threadinternal/notifications/command_integration_create.go
Comment threadinternal/notifications/command_integration_update.go
Comment threadinternal/notifications/command_resource_subscription_create.go Outdated
Comment threadcmd/lint/main.go Outdated
Comment threadinternal/notifications/command_resource_subscription_update.go Outdated
Two files conflicted.
test/fixtures/output/help.golden: main renamed `unified-stream-manager` to
`usm`, which shortened cobra's longest command name and re-padded every line in
the Available Commands block. Took main's block and regenerated the golden with
`go test ./test -run TestCLI/TestHelp -update`, which re-added the
notifications line at the new padding.
.cli-generation-checksum: main carries the flink region suite's value, this
branch carries notifications'. Kept this branch's. The file records the
last-generated suite only and drives PR labeling, so neither value is a drift
signal.
go build ./... and go test ./test -run TestCLI/TestNotifications both pass on
the merge result.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Picks up cli-terraform-generator's allow-list remedy fix. Eight stringSlice
flags now carry the CLI's own comma-separated-list wording instead of the
spec's HTTP-shape prose, the notifications parent command's Short registers
"Cloud Notifications", and one capitalized common noun is fixed in the spec.
Removes "Integrations" from properNouns: it was registered by an earlier merge
to satisfy one flag's help text, and RequireCapitalizeProperNouns then mandated
that capitalization across the whole CLI, failing three descriptions in
`confluent provider-integration`. "recieve" goes with the spec typo it covered.
`make lint-cli` passes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@airlock-confluentinc
airlock-confluentincBotforce-pushed the onboard-notifications-integration branch from 8d059d9 to ccc3483CompareAugust 14, 2026 16:26
ccloud-sdk-go-v2/notifications v0.1.0 is published, so the six commands and
their test-server handlers import it instead of the -internal path. The Alpine
docker build runs go build in a container with no GitHub credentials and the
repo carries no vendor/, so a private module cannot resolve there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

A list command's -o json output is a JSON array, not an object, so
Unmarshal into a map failed and fell through to the table-fallback
path, which grabbed the ASCII separator row as a fake id. Try an
array first and pull the id from its first element; fall back to a
plain object for describe-style output. Drop the table-parsing path
entirely — every CaptureID call site pairs with -o json now.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…r fixes
The last merge predated several generator-side fixes: the zeroCheck
replacement for optional StringSlice query params (a []string flag
never reads as a literal nil, so severity/resource-type/resource-crn/
sort filters were always sent even when unset), the switch from a
literal {id} placeholder to the spec's own example values in create/
update test args, and the List-before-Describe reordering plus -o
json request on every live-test List step used for ID capture.
Regenerated command/wrapper/test-server/fixture/golden files for
Integration, Subscription, ResourcePreference, ResourceSubscription,
NotificationType, and UserNotification.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nds to pick up objectref_write_placeholders
An array-valued ObjectReference field (integrations) built each element
as {Id: id} only, leaving the SDK's required related/resource_name
fields as empty strings on the wire. The real API rejects that with a
400. cli.objectref_write_placeholders already covered the scalar
notification_type case; this regeneration picks up the generator-side
fix that ported the same placeholder injection into the array-building
loops of create and update.
Regenerated Subscription and ResourceSubscription via cli-tfgen
--official-sdk to avoid a local SDK replace directive in go.mod.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

Sign up for freeto 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

@alexfayad
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Add the six notifications commands - #3443

Open
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration
Open

Add the six notifications commands#3443
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration

Conversation

@alexfayad

@alexfayadAlexander Fayad (alexfayad) commented Aug 13, 2026

Copy link
Copy Markdown

Release Notes

New Features

  • Add confluent notifications commands for managing notification integrations, subscriptions, resource preferences, resource subscriptions, notification types, and in-app user notifications.

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

Onboards Confluent Cloud Notifications to the CLI. Adds six command groups under confluent notifications: integration, subscription, resource-preference, resource-subscription, notification-type, and user-notification.

The code is generated by cli-terraform-generator from the notifications OpenAPI spec and Go SDK. The commands, the pkg/ccloudv2 wrapper, the test-server handlers, the integration tests, the live tests, and the goldens all come from the generator.

One API-specific workaround is baked in. The related and resource_name sub-fields of the shared GlobalObjectReference are marked required, readOnly, and format: uri in the spec, and the SDK serializes them unconditionally. A create that carried only id sent an empty string for both and Confluent Cloud rejected it with 400 Bad Request. The generated subscription and resource-subscription commands now fill both fields with a placeholder URI on create and update, matching the workaround the published confluent_ksql_cluster Terraform resource already uses.

Confluent Cloud only.

Blast Radius

New commands only. No existing command changes, and nothing outside internal/notifications shares this code. If a notifications command misbehaves, only customers running confluent notifications ... are affected.

References

Test & Review

Built a custom binary and ran the notifications commands against a real Confluent Cloud org. Verified create / describe / list / delete for integration, and create / describe / update / delete for subscription and resource-subscription with a multi-element integrations value, all without the prior 400. Generated integration and live tests are included.

CLI create against real Confluent Cloud (before/after the fix)

Before the fix, related/resource_name went out as a non-URI placeholder and Confluent Cloud rejected the create against the spec's format: uri on /integrations/0/related:

POST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"_","resource_name":"_"}],"notification_type":{"id":"nt-9KD1p","related":"_","resource_name":"_"}}HTTP/2.0 400 Bad Request{"errors":[{"status":"400","code":"1101","title":"Invalid request body","detail":"Invalid Json: Invalid request body","source":{"pointer":"/integrations/0/related"}}]}Error: Invalid Json: Invalid request body

The shipped command fills both fields with a placeholder URI and the create succeeds:

$ confluent notifications subscription create --notification-type nt-9KD1p --integrations i-59wqM --current-state ENABLED -o jsonPOST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}],"notification_type":{"id":"nt-9KD1p","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}}HTTP/2.0 201 Created{ "id": "s-gAXVpd", "notification_type": "nt-9KD1p", "current_state": "ENABLED"}

🤖 Generated with Claude Code

Generated by cli-terraform-generator merge mode from the notifications v1
OpenAPI spec: integration, subscription, resource-preference,
resource-subscription, notification-type, and user-notification, plus their
ccloudv2 wrappers, test-server handlers, integration tests, input fixtures,
output goldens, and live tests.
The integration command's target is a oneOf. Update leaves --kind optional so
an update touching only display-name or description is accepted, and rejects a
variant flag supplied without --kind rather than silently dropping it.
Verified with go build ./..., go vet, and
go test ./test/ -run 'TestCLI/TestNotifications'.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 13, 2026 18:00
@confluent-cla-assistant

confluent-cla-assistantBot commented Aug 13, 2026

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.

CopilotAI 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

This pull request introduces a new top-level notifications command group backed by the Notifications v1 CCloud SDK, adds the corresponding test-server endpoints, and wires in integration/live tests plus golden fixtures to validate CLI behavior.

Changes:

  • Add Notifications v1 API client bootstrap + CRUD/list wrappers in pkg/ccloudv2, and register the client on the shared ccloudv2.Client.
  • Add internal/notifications Cobra command tree (integrations, notification-types, resource-preferences, resource-subscriptions, subscriptions, user-notifications) and register it under the root command.
  • Extend the test server router + handlers, add integration/live tests, and add input/output fixtures + goldens for the new commands.

Reviewed changes

Copilot reviewed 185 out of 211 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
test/test-server/notifications_user_notification_handler.goAdds test-server handlers for user-notifications list/get/patch.
test/test-server/notifications_subscription_handler.goAdds test-server handlers for subscriptions list/create/get/update/delete.
test/test-server/notifications_resource_subscription_handler.goAdds test-server handlers for resource-subscriptions create/get/update/delete.
test/test-server/notifications_resource_preference_handler.goAdds test-server handlers for resource-preferences create/get/update/delete.
test/test-server/notifications_notification_type_handler.goAdds test-server handlers for notification-types list/get.
test/test-server/notifications_integration_handler.goAdds test-server handlers for integrations list/create/get/update/delete.
test/test-server/ccloudv2_router.goRegisters Notifications v1 routes in the test-server router.
test/notifications_user_notification_test.goAdds integration tests for user-notification describe/list/update + autocomplete.
test/notifications_subscription_test.goAdds integration tests for subscription CRUD + autocomplete.
test/notifications_resource_subscription_test.goAdds integration tests for resource-subscription CRUD.
test/notifications_resource_preference_test.goAdds integration tests for resource-preference CRUD.
test/notifications_notification_type_test.goAdds integration tests for notification-type describe/list + autocomplete.
test/notifications_integration_test.goAdds integration tests for integration CRUD + autocomplete.
test/live/notifications_user_notification_live_test.goAdds live CRUD coverage for user-notifications.
test/live/notifications_subscription_live_test.goAdds live CRUD coverage for subscriptions (env-var gated).
test/live/notifications_resource_subscription_live_test.goAdds live CRUD coverage for resource-subscriptions (env-var gated).
test/live/notifications_resource_preference_live_test.goAdds live CRUD coverage for resource-preferences.
test/live/notifications_notification_type_live_test.goAdds live coverage for notification-type list/describe.
test/fixtures/output/notifications/user-notification/update/update-read.goldenAdds golden output for user-notification update (human).
test/fixtures/output/notifications/user-notification/update/update-invalid.goldenAdds golden output for user-notification update (404).
test/fixtures/output/notifications/user-notification/update-help.goldenAdds golden help for user-notification update.
test/fixtures/output/notifications/user-notification/list/list.goldenAdds golden output for user-notification list (human).
test/fixtures/output/notifications/user-notification/list/list-yaml.goldenAdds golden output for user-notification list (yaml).
test/fixtures/output/notifications/user-notification/list/list-type.goldenAdds golden output for user-notification list filtered by type.
test/fixtures/output/notifications/user-notification/list/list-time-range.goldenAdds golden output for user-notification list filtered by time range.
test/fixtures/output/notifications/user-notification/list/list-sort.goldenAdds golden output for user-notification list sorted.
test/fixtures/output/notifications/user-notification/list/list-severity.goldenAdds golden output for user-notification list filtered by severity.
test/fixtures/output/notifications/user-notification/list/list-search.goldenAdds golden output for user-notification list filtered by search.
test/fixtures/output/notifications/user-notification/list/list-read.goldenAdds golden output for user-notification list filtered by read.
test/fixtures/output/notifications/user-notification/list/list-json.goldenAdds golden output for user-notification list (json).
test/fixtures/output/notifications/user-notification/list/list-include.goldenAdds golden output for user-notification list with include fields.
test/fixtures/output/notifications/user-notification/list/list-crn.goldenAdds golden output for user-notification list filtered by CRN.
test/fixtures/output/notifications/user-notification/list-help.goldenAdds golden help for user-notification list.
test/fixtures/output/notifications/user-notification/help.goldenAdds golden help for user-notification command group.
test/fixtures/output/notifications/user-notification/describe/describe.goldenAdds golden output for user-notification describe (human).
test/fixtures/output/notifications/user-notification/describe/describe-yaml.goldenAdds golden output for user-notification describe (yaml).
test/fixtures/output/notifications/user-notification/describe/describe-json.goldenAdds golden output for user-notification describe (json).
test/fixtures/output/notifications/user-notification/describe/describe-invalid.goldenAdds golden output for user-notification describe (404).
test/fixtures/output/notifications/user-notification/describe/describe-autocomplete.goldenAdds golden output for user-notification autocomplete.
test/fixtures/output/notifications/user-notification/describe-help.goldenAdds golden help for user-notification describe.
test/fixtures/output/notifications/subscription/update/update-invalid.goldenAdds golden output for subscription update (404).
test/fixtures/output/notifications/subscription/update/update-integrations.goldenAdds golden output for subscription update integrations (human).
test/fixtures/output/notifications/subscription/update/update-current-state.goldenAdds golden output for subscription update current-state (human).
test/fixtures/output/notifications/subscription/update-help.goldenAdds golden help for subscription update.
test/fixtures/output/notifications/subscription/list/list.goldenAdds golden output for subscription list (human).
test/fixtures/output/notifications/subscription/list/list-yaml.goldenAdds golden output for subscription list (yaml).
test/fixtures/output/notifications/subscription/list/list-json.goldenAdds golden output for subscription list (json).
test/fixtures/output/notifications/subscription/list-help.goldenAdds golden help for subscription list.
test/fixtures/output/notifications/subscription/help.goldenAdds golden help for subscription command group.
test/fixtures/output/notifications/subscription/describe/describe.goldenAdds golden output for subscription describe (human).
test/fixtures/output/notifications/subscription/describe/describe-yaml.goldenAdds golden output for subscription describe (yaml).
test/fixtures/output/notifications/subscription/describe/describe-json.goldenAdds golden output for subscription describe (json).
test/fixtures/output/notifications/subscription/describe/describe-invalid.goldenAdds golden output for subscription describe (404).
test/fixtures/output/notifications/subscription/describe/describe-autocomplete.goldenAdds golden output for subscription describe autocomplete.
test/fixtures/output/notifications/subscription/describe-help.goldenAdds golden help for subscription describe.
test/fixtures/output/notifications/subscription/delete/delete.goldenAdds golden output for subscription delete (force).
test/fixtures/output/notifications/subscription/delete/delete-no-force.goldenAdds golden output for subscription delete (prompt).
test/fixtures/output/notifications/subscription/delete/delete-multiple.goldenAdds golden output for multi-delete subscriptions.
test/fixtures/output/notifications/subscription/delete/delete-invalid.goldenAdds golden output for subscription delete invalid + suggestions.
test/fixtures/output/notifications/subscription/delete/delete-autocomplete.goldenAdds golden output for subscription delete autocomplete.
test/fixtures/output/notifications/subscription/delete-help.goldenAdds golden help for subscription delete.
test/fixtures/output/notifications/subscription/create/create.goldenAdds golden output for subscription create (human).
test/fixtures/output/notifications/subscription/create/create-current-state.goldenAdds golden output for subscription create with current-state.
test/fixtures/output/notifications/subscription/create-help.goldenAdds golden help for subscription create.
test/fixtures/output/notifications/resource-subscription/update/update-resource.goldenAdds golden output for resource-subscription update resource.
test/fixtures/output/notifications/resource-subscription/update/update-resource-type.goldenAdds golden output for resource-subscription update resource-type.
test/fixtures/output/notifications/resource-subscription/update/update-invalid.goldenAdds golden output for resource-subscription update (404).
test/fixtures/output/notifications/resource-subscription/update/update-integrations.goldenAdds golden output for resource-subscription update integrations.
test/fixtures/output/notifications/resource-subscription/update/update-current-state.goldenAdds golden output for resource-subscription update current-state.
test/fixtures/output/notifications/resource-subscription/update-help.goldenAdds golden help for resource-subscription update.
test/fixtures/output/notifications/resource-subscription/help.goldenAdds golden help for resource-subscription command group.
test/fixtures/output/notifications/resource-subscription/describe/describe.goldenAdds golden output for resource-subscription describe (human).
test/fixtures/output/notifications/resource-subscription/describe/describe-yaml.goldenAdds golden output for resource-subscription describe (yaml).
test/fixtures/output/notifications/resource-subscription/describe/describe-json.goldenAdds golden output for resource-subscription describe (json).
test/fixtures/output/notifications/resource-subscription/describe/describe-invalid.goldenAdds golden output for resource-subscription describe (404).
test/fixtures/output/notifications/resource-subscription/describe-help.goldenAdds golden help for resource-subscription describe.
test/fixtures/output/notifications/resource-subscription/delete/delete.goldenAdds golden output for resource-subscription delete (force).
test/fixtures/output/notifications/resource-subscription/delete/delete-no-force.goldenAdds golden output for resource-subscription delete (prompt).
test/fixtures/output/notifications/resource-subscription/delete/delete-multiple.goldenAdds golden output for multi-delete resource-subscriptions.
test/fixtures/output/notifications/resource-subscription/delete/delete-invalid.goldenAdds golden output for resource-subscription delete invalid + suggestions.
test/fixtures/output/notifications/resource-subscription/delete-help.goldenAdds golden help for resource-subscription delete.
test/fixtures/output/notifications/resource-subscription/create/create.goldenAdds golden output for resource-subscription create (human).
test/fixtures/output/notifications/resource-subscription/create/create-current-state.goldenAdds golden output for resource-subscription create with current-state.
test/fixtures/output/notifications/resource-subscription/create-help.goldenAdds golden help for resource-subscription create.
test/fixtures/output/notifications/resource-preference/update/update-resource.goldenAdds golden output for resource-preference update resource.
test/fixtures/output/notifications/resource-preference/update/update-resource-type.goldenAdds golden output for resource-preference update resource-type.
test/fixtures/output/notifications/resource-preference/update/update-invalid.goldenAdds golden output for resource-preference update (404).
test/fixtures/output/notifications/resource-preference/update/update-current-state.goldenAdds golden output for resource-preference update current-state.
test/fixtures/output/notifications/resource-preference/update-help.goldenAdds golden help for resource-preference update.
test/fixtures/output/notifications/resource-preference/help.goldenAdds golden help for resource-preference command group.
test/fixtures/output/notifications/resource-preference/describe/describe.goldenAdds golden output for resource-preference describe (human).
test/fixtures/output/notifications/resource-preference/describe/describe-yaml.goldenAdds golden output for resource-preference describe (yaml).
test/fixtures/output/notifications/resource-preference/describe/describe-json.goldenAdds golden output for resource-preference describe (json).
test/fixtures/output/notifications/resource-preference/describe/describe-invalid.goldenAdds golden output for resource-preference describe (404).
test/fixtures/output/notifications/resource-preference/describe-help.goldenAdds golden help for resource-preference describe.
test/fixtures/output/notifications/resource-preference/delete/delete.goldenAdds golden output for resource-preference delete (force).
test/fixtures/output/notifications/resource-preference/delete/delete-no-force.goldenAdds golden output for resource-preference delete (prompt).
test/fixtures/output/notifications/resource-preference/delete/delete-multiple.goldenAdds golden output for multi-delete resource-preferences.
test/fixtures/output/notifications/resource-preference/delete/delete-invalid.goldenAdds golden output for resource-preference delete invalid + suggestions.
test/fixtures/output/notifications/resource-preference/delete-help.goldenAdds golden help for resource-preference delete.
test/fixtures/output/notifications/resource-preference/create/create.goldenAdds golden output for resource-preference create (human).
test/fixtures/output/notifications/resource-preference/create/create-current-state.goldenAdds golden output for resource-preference create with current-state.
test/fixtures/output/notifications/resource-preference/create-help.goldenAdds golden help for resource-preference create.
test/fixtures/output/notifications/notification-type/list/list.goldenAdds golden output for notification-type list (human).
test/fixtures/output/notifications/notification-type/list/list-yaml.goldenAdds golden output for notification-type list (yaml).
test/fixtures/output/notifications/notification-type/list/list-resource-type.goldenAdds golden output for notification-type list filtered by resource-type.
test/fixtures/output/notifications/notification-type/list/list-json.goldenAdds golden output for notification-type list (json).
test/fixtures/output/notifications/notification-type/list-help.goldenAdds golden help for notification-type list.
test/fixtures/output/notifications/notification-type/help.goldenAdds golden help for notification-type command group.
test/fixtures/output/notifications/notification-type/describe/describe.goldenAdds golden output for notification-type describe (human).
test/fixtures/output/notifications/notification-type/describe/describe-yaml.goldenAdds golden output for notification-type describe (yaml).
test/fixtures/output/notifications/notification-type/describe/describe-json.goldenAdds golden output for notification-type describe (json).
test/fixtures/output/notifications/notification-type/describe/describe-invalid.goldenAdds golden output for notification-type describe (404).
test/fixtures/output/notifications/notification-type/describe/describe-autocomplete.goldenAdds golden output for notification-type autocomplete.
test/fixtures/output/notifications/notification-type/describe-help.goldenAdds golden help for notification-type describe.
test/fixtures/output/notifications/integration/update/update-webhook-target.goldenAdds golden output for integration update webhook target.
test/fixtures/output/notifications/integration/update/update-slack-target.goldenAdds golden output for integration update slack target.
test/fixtures/output/notifications/integration/update/update-ms-teams-target.goldenAdds golden output for integration update MsTeams target.
test/fixtures/output/notifications/integration/update/update-invalid.goldenAdds golden output for integration update (404).
test/fixtures/output/notifications/integration/update/update-display-name.goldenAdds golden output for integration update display-name.
test/fixtures/output/notifications/integration/update/update-description.goldenAdds golden output for integration update description.
test/fixtures/output/notifications/integration/update-help.goldenAdds golden help for integration update.
test/fixtures/output/notifications/integration/list/list.goldenAdds golden output for integration list (human).
test/fixtures/output/notifications/integration/list/list-yaml.goldenAdds golden output for integration list (yaml).
test/fixtures/output/notifications/integration/list/list-json.goldenAdds golden output for integration list (json).
test/fixtures/output/notifications/integration/list-help.goldenAdds golden help for integration list.
test/fixtures/output/notifications/integration/help.goldenAdds golden help for integration command group.
test/fixtures/output/notifications/integration/describe/describe-yaml.goldenAdds golden output for integration describe (yaml).
test/fixtures/output/notifications/integration/describe/describe-webhook-target.goldenAdds golden output for integration describe webhook target.
test/fixtures/output/notifications/integration/describe/describe-user-email-target.goldenAdds golden output for integration describe user-email target.
test/fixtures/output/notifications/integration/describe/describe-slack-target.goldenAdds golden output for integration describe slack target.
test/fixtures/output/notifications/integration/describe/describe-role-email-target.goldenAdds golden output for integration describe role-email target.
test/fixtures/output/notifications/integration/describe/describe-ms-teams-target.goldenAdds golden output for integration describe MsTeams target.
test/fixtures/output/notifications/integration/describe/describe-json.goldenAdds golden output for integration describe (json).
test/fixtures/output/notifications/integration/describe/describe-invalid.goldenAdds golden output for integration describe (404).
test/fixtures/output/notifications/integration/describe/describe-in-app-target.goldenAdds golden output for integration describe in-app target.
test/fixtures/output/notifications/integration/describe/describe-autocomplete.goldenAdds golden output for integration autocomplete.
test/fixtures/output/notifications/integration/describe-help.goldenAdds golden help for integration describe.
test/fixtures/output/notifications/integration/delete/delete.goldenAdds golden output for integration delete (force).
test/fixtures/output/notifications/integration/delete/delete-no-force.goldenAdds golden output for integration delete (prompt).
test/fixtures/output/notifications/integration/delete/delete-multiple.goldenAdds golden output for multi-delete integrations.
test/fixtures/output/notifications/integration/delete/delete-invalid.goldenAdds golden output for integration delete invalid + suggestions.
test/fixtures/output/notifications/integration/delete/delete-autocomplete.goldenAdds golden output for integration delete autocomplete.
test/fixtures/output/notifications/integration/delete-help.goldenAdds golden help for integration delete.
test/fixtures/output/notifications/integration/create/create-webhook-target.goldenAdds golden output for integration create webhook target.
test/fixtures/output/notifications/integration/create/create-slack-target.goldenAdds golden output for integration create slack target.
test/fixtures/output/notifications/integration/create/create-ms-teams-target.goldenAdds golden output for integration create MsTeams target.
test/fixtures/output/notifications/integration/create/create-description.goldenAdds golden output for integration create with description.
test/fixtures/output/notifications/integration/create-help.goldenAdds golden help for integration create.
test/fixtures/output/notifications/help.goldenAdds golden help for top-level notifications command group.
test/fixtures/output/help.goldenAdds the notifications entry to root help golden.
test/fixtures/input/notifications/user-notification/read_created_user_notification.jsonAdds fixture payload for reading user-notifications.
test/fixtures/input/notifications/user-notification/create_user_notification.jsonAdds fixture payload for creating user-notifications.
test/fixtures/input/notifications/subscription/read_created_subscription.jsonAdds fixture payload for reading subscriptions.
test/fixtures/input/notifications/subscription/create_subscription.jsonAdds fixture payload for creating subscriptions.
test/fixtures/input/notifications/resource-subscription/read_created_resource_subscription.jsonAdds fixture payload for reading resource-subscriptions.
test/fixtures/input/notifications/resource-subscription/create_resource_subscription.jsonAdds fixture payload for creating resource-subscriptions.
test/fixtures/input/notifications/resource-preference/read_created_resource_preference.jsonAdds fixture payload for reading resource-preferences.
test/fixtures/input/notifications/resource-preference/create_resource_preference.jsonAdds fixture payload for creating resource-preferences.
test/fixtures/input/notifications/notification-type/read_created_notification_type.jsonAdds fixture payload for reading notification-types.
test/fixtures/input/notifications/notification-type/create_notification_type.jsonAdds fixture payload for creating notification-types.
test/fixtures/input/notifications/integration/read_created_webhook_target.jsonAdds fixture payload for reading webhook integration targets.
test/fixtures/input/notifications/integration/read_created_user_email_target.jsonAdds fixture payload for reading user-email integration targets.
test/fixtures/input/notifications/integration/read_created_slack_target.jsonAdds fixture payload for reading slack integration targets.
test/fixtures/input/notifications/integration/read_created_role_email_target.jsonAdds fixture payload for reading role-email integration targets.
test/fixtures/input/notifications/integration/read_created_ms_teams_target.jsonAdds fixture payload for reading MsTeams integration targets.
test/fixtures/input/notifications/integration/read_created_in_app_target.jsonAdds fixture payload for reading in-app integration targets.
test/fixtures/input/notifications/integration/create_webhook_target.jsonAdds fixture payload for creating webhook integration targets.
test/fixtures/input/notifications/integration/create_user_email_target.jsonAdds fixture payload for creating user-email integration targets.
test/fixtures/input/notifications/integration/create_slack_target.jsonAdds fixture payload for creating slack integration targets.
test/fixtures/input/notifications/integration/create_role_email_target.jsonAdds fixture payload for creating role-email integration targets.
test/fixtures/input/notifications/integration/create_ms_teams_target.jsonAdds fixture payload for creating MsTeams integration targets.
test/fixtures/input/notifications/integration/create_in_app_target.jsonAdds fixture payload for creating in-app integration targets.
pkg/ccloudv2/notifications.goAdds Notifications v1 client + wrapper methods for CRUD/list operations.
pkg/ccloudv2/client.goRegisters NotificationsClient on the shared CCloud v2 client.
internal/notifications/command.goAdds the top-level notifications command and subcommand registration.
internal/notifications/command_user_notification.goAdds user-notification command group, output formatting, and autocomplete.
internal/notifications/command_user_notification_update.goAdds user-notification update command + --read support.
internal/notifications/command_user_notification_list.goAdds user-notification list command + filtering flags.
internal/notifications/command_user_notification_describe.goAdds user-notification describe command.
internal/notifications/command_subscription.goAdds subscription command group, output formatting, and autocomplete.
internal/notifications/command_subscription_update.goAdds subscription update command + flags.
internal/notifications/command_subscription_list.goAdds subscription list command.
internal/notifications/command_subscription_describe.goAdds subscription describe command.
internal/notifications/command_subscription_delete.goAdds subscription delete (multi-delete) using shared deletion helpers.
internal/notifications/command_subscription_create.goAdds subscription create command + flags.
internal/notifications/command_resource_subscription.goAdds resource-subscription command group + output formatting.
internal/notifications/command_resource_subscription_update.goAdds resource-subscription update command + flags.
internal/notifications/command_resource_subscription_describe.goAdds resource-subscription describe command.
internal/notifications/command_resource_subscription_delete.goAdds resource-subscription delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_subscription_create.goAdds resource-subscription create command + flags.
internal/notifications/command_resource_preference.goAdds resource-preference command group + output formatting.
internal/notifications/command_resource_preference_update.goAdds resource-preference update command + flags.
internal/notifications/command_resource_preference_describe.goAdds resource-preference describe command.
internal/notifications/command_resource_preference_delete.goAdds resource-preference delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_preference_create.goAdds resource-preference create command + flags.
internal/notifications/command_notification_type.goAdds notification-type command group + output formatting + autocomplete.
internal/notifications/command_notification_type_list.goAdds notification-type list command + filter flag.
internal/notifications/command_notification_type_describe.goAdds notification-type describe command.
internal/notifications/command_integration.goAdds integration command group + output formatting + autocomplete.
internal/notifications/command_integration_update.goAdds integration update command + target-kind handling.
internal/notifications/command_integration_list.goAdds integration list command.
internal/notifications/command_integration_describe.goAdds integration describe command.
internal/notifications/command_integration_delete.goAdds integration delete (multi-delete) using deletion helpers.
internal/notifications/command_integration_create.goAdds integration create command + target-kind handling.
internal/command.goRegisters notifications under the root command.
go.sumAdds checksums for the notifications internal SDK module.
go.modAdds dependency on github.com/confluentinc/ccloud-sdk-go-v2-internal/notifications.
cmd/lint/main.goExtends spellcheck vocabulary for new notifications-related terms.
.cli-generation-checksumUpdates generator checksum to reflect regenerated sources.
Files not reviewed (25)
  • internal/notifications/command.go: Generated file
  • internal/notifications/command_integration.go: Generated file
  • internal/notifications/command_integration_create.go: Generated file
  • internal/notifications/command_integration_delete.go: Generated file
  • internal/notifications/command_integration_describe.go: Generated file
  • internal/notifications/command_integration_list.go: Generated file
  • internal/notifications/command_integration_update.go: Generated file
  • internal/notifications/command_notification_type.go: Generated file
  • internal/notifications/command_notification_type_describe.go: Generated file
  • internal/notifications/command_notification_type_list.go: Generated file
  • internal/notifications/command_resource_preference.go: Generated file
  • internal/notifications/command_resource_preference_create.go: Generated file
  • internal/notifications/command_resource_preference_delete.go: Generated file
  • internal/notifications/command_resource_preference_describe.go: Generated file
  • internal/notifications/command_resource_preference_update.go: Generated file
  • internal/notifications/command_resource_subscription.go: Generated file
  • internal/notifications/command_resource_subscription_create.go: Generated file
  • internal/notifications/command_resource_subscription_delete.go: Generated file
  • internal/notifications/command_resource_subscription_describe.go: Generated file
  • internal/notifications/command_resource_subscription_update.go: Generated file
  • internal/notifications/command_subscription.go: Generated file
  • internal/notifications/command_subscription_create.go: Generated file
  • internal/notifications/command_subscription_delete.go: Generated file
  • internal/notifications/command_subscription_describe.go: Generated file
  • internal/notifications/command_subscription_list.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadinternal/notifications/command_subscription_create.go Outdated
Comment threadinternal/notifications/command_subscription_update.go Outdated
Comment threadinternal/notifications/command_integration_create.go
Comment threadinternal/notifications/command_integration_update.go
Comment threadinternal/notifications/command_resource_subscription_create.go Outdated
Comment threadcmd/lint/main.go Outdated
Comment threadinternal/notifications/command_resource_subscription_update.go Outdated
Two files conflicted.
test/fixtures/output/help.golden: main renamed `unified-stream-manager` to
`usm`, which shortened cobra's longest command name and re-padded every line in
the Available Commands block. Took main's block and regenerated the golden with
`go test ./test -run TestCLI/TestHelp -update`, which re-added the
notifications line at the new padding.
.cli-generation-checksum: main carries the flink region suite's value, this
branch carries notifications'. Kept this branch's. The file records the
last-generated suite only and drives PR labeling, so neither value is a drift
signal.
go build ./... and go test ./test -run TestCLI/TestNotifications both pass on
the merge result.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Picks up cli-terraform-generator's allow-list remedy fix. Eight stringSlice
flags now carry the CLI's own comma-separated-list wording instead of the
spec's HTTP-shape prose, the notifications parent command's Short registers
"Cloud Notifications", and one capitalized common noun is fixed in the spec.
Removes "Integrations" from properNouns: it was registered by an earlier merge
to satisfy one flag's help text, and RequireCapitalizeProperNouns then mandated
that capitalization across the whole CLI, failing three descriptions in
`confluent provider-integration`. "recieve" goes with the spec typo it covered.
`make lint-cli` passes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@airlock-confluentinc
airlock-confluentincBotforce-pushed the onboard-notifications-integration branch from 8d059d9 to ccc3483CompareAugust 14, 2026 16:26
ccloud-sdk-go-v2/notifications v0.1.0 is published, so the six commands and
their test-server handlers import it instead of the -internal path. The Alpine
docker build runs go build in a container with no GitHub credentials and the
repo carries no vendor/, so a private module cannot resolve there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

A list command's -o json output is a JSON array, not an object, so
Unmarshal into a map failed and fell through to the table-fallback
path, which grabbed the ASCII separator row as a fake id. Try an
array first and pull the id from its first element; fall back to a
plain object for describe-style output. Drop the table-parsing path
entirely — every CaptureID call site pairs with -o json now.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…r fixes
The last merge predated several generator-side fixes: the zeroCheck
replacement for optional StringSlice query params (a []string flag
never reads as a literal nil, so severity/resource-type/resource-crn/
sort filters were always sent even when unset), the switch from a
literal {id} placeholder to the spec's own example values in create/
update test args, and the List-before-Describe reordering plus -o
json request on every live-test List step used for ID capture.
Regenerated command/wrapper/test-server/fixture/golden files for
Integration, Subscription, ResourcePreference, ResourceSubscription,
NotificationType, and UserNotification.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nds to pick up objectref_write_placeholders
An array-valued ObjectReference field (integrations) built each element
as {Id: id} only, leaving the SDK's required related/resource_name
fields as empty strings on the wire. The real API rejects that with a
400. cli.objectref_write_placeholders already covered the scalar
notification_type case; this regeneration picks up the generator-side
fix that ported the same placeholder injection into the array-building
loops of create and update.
Regenerated Subscription and ResourceSubscription via cli-tfgen
--official-sdk to avoid a local SDK replace directive in go.mod.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

Sign up for freeto 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

@alexfayad
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Add the six notifications commands - #3443

Open
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration
Open

Add the six notifications commands#3443
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration

Conversation

@alexfayad

@alexfayadAlexander Fayad (alexfayad) commented Aug 13, 2026

Copy link
Copy Markdown

Release Notes

New Features

  • Add confluent notifications commands for managing notification integrations, subscriptions, resource preferences, resource subscriptions, notification types, and in-app user notifications.

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

Onboards Confluent Cloud Notifications to the CLI. Adds six command groups under confluent notifications: integration, subscription, resource-preference, resource-subscription, notification-type, and user-notification.

The code is generated by cli-terraform-generator from the notifications OpenAPI spec and Go SDK. The commands, the pkg/ccloudv2 wrapper, the test-server handlers, the integration tests, the live tests, and the goldens all come from the generator.

One API-specific workaround is baked in. The related and resource_name sub-fields of the shared GlobalObjectReference are marked required, readOnly, and format: uri in the spec, and the SDK serializes them unconditionally. A create that carried only id sent an empty string for both and Confluent Cloud rejected it with 400 Bad Request. The generated subscription and resource-subscription commands now fill both fields with a placeholder URI on create and update, matching the workaround the published confluent_ksql_cluster Terraform resource already uses.

Confluent Cloud only.

Blast Radius

New commands only. No existing command changes, and nothing outside internal/notifications shares this code. If a notifications command misbehaves, only customers running confluent notifications ... are affected.

References

Test & Review

Built a custom binary and ran the notifications commands against a real Confluent Cloud org. Verified create / describe / list / delete for integration, and create / describe / update / delete for subscription and resource-subscription with a multi-element integrations value, all without the prior 400. Generated integration and live tests are included.

CLI create against real Confluent Cloud (before/after the fix)

Before the fix, related/resource_name went out as a non-URI placeholder and Confluent Cloud rejected the create against the spec's format: uri on /integrations/0/related:

POST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"_","resource_name":"_"}],"notification_type":{"id":"nt-9KD1p","related":"_","resource_name":"_"}}HTTP/2.0 400 Bad Request{"errors":[{"status":"400","code":"1101","title":"Invalid request body","detail":"Invalid Json: Invalid request body","source":{"pointer":"/integrations/0/related"}}]}Error: Invalid Json: Invalid request body

The shipped command fills both fields with a placeholder URI and the create succeeds:

$ confluent notifications subscription create --notification-type nt-9KD1p --integrations i-59wqM --current-state ENABLED -o jsonPOST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}],"notification_type":{"id":"nt-9KD1p","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}}HTTP/2.0 201 Created{ "id": "s-gAXVpd", "notification_type": "nt-9KD1p", "current_state": "ENABLED"}

🤖 Generated with Claude Code

Generated by cli-terraform-generator merge mode from the notifications v1
OpenAPI spec: integration, subscription, resource-preference,
resource-subscription, notification-type, and user-notification, plus their
ccloudv2 wrappers, test-server handlers, integration tests, input fixtures,
output goldens, and live tests.
The integration command's target is a oneOf. Update leaves --kind optional so
an update touching only display-name or description is accepted, and rejects a
variant flag supplied without --kind rather than silently dropping it.
Verified with go build ./..., go vet, and
go test ./test/ -run 'TestCLI/TestNotifications'.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 13, 2026 18:00
@confluent-cla-assistant

confluent-cla-assistantBot commented Aug 13, 2026

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.

CopilotAI 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

This pull request introduces a new top-level notifications command group backed by the Notifications v1 CCloud SDK, adds the corresponding test-server endpoints, and wires in integration/live tests plus golden fixtures to validate CLI behavior.

Changes:

  • Add Notifications v1 API client bootstrap + CRUD/list wrappers in pkg/ccloudv2, and register the client on the shared ccloudv2.Client.
  • Add internal/notifications Cobra command tree (integrations, notification-types, resource-preferences, resource-subscriptions, subscriptions, user-notifications) and register it under the root command.
  • Extend the test server router + handlers, add integration/live tests, and add input/output fixtures + goldens for the new commands.

Reviewed changes

Copilot reviewed 185 out of 211 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
test/test-server/notifications_user_notification_handler.goAdds test-server handlers for user-notifications list/get/patch.
test/test-server/notifications_subscription_handler.goAdds test-server handlers for subscriptions list/create/get/update/delete.
test/test-server/notifications_resource_subscription_handler.goAdds test-server handlers for resource-subscriptions create/get/update/delete.
test/test-server/notifications_resource_preference_handler.goAdds test-server handlers for resource-preferences create/get/update/delete.
test/test-server/notifications_notification_type_handler.goAdds test-server handlers for notification-types list/get.
test/test-server/notifications_integration_handler.goAdds test-server handlers for integrations list/create/get/update/delete.
test/test-server/ccloudv2_router.goRegisters Notifications v1 routes in the test-server router.
test/notifications_user_notification_test.goAdds integration tests for user-notification describe/list/update + autocomplete.
test/notifications_subscription_test.goAdds integration tests for subscription CRUD + autocomplete.
test/notifications_resource_subscription_test.goAdds integration tests for resource-subscription CRUD.
test/notifications_resource_preference_test.goAdds integration tests for resource-preference CRUD.
test/notifications_notification_type_test.goAdds integration tests for notification-type describe/list + autocomplete.
test/notifications_integration_test.goAdds integration tests for integration CRUD + autocomplete.
test/live/notifications_user_notification_live_test.goAdds live CRUD coverage for user-notifications.
test/live/notifications_subscription_live_test.goAdds live CRUD coverage for subscriptions (env-var gated).
test/live/notifications_resource_subscription_live_test.goAdds live CRUD coverage for resource-subscriptions (env-var gated).
test/live/notifications_resource_preference_live_test.goAdds live CRUD coverage for resource-preferences.
test/live/notifications_notification_type_live_test.goAdds live coverage for notification-type list/describe.
test/fixtures/output/notifications/user-notification/update/update-read.goldenAdds golden output for user-notification update (human).
test/fixtures/output/notifications/user-notification/update/update-invalid.goldenAdds golden output for user-notification update (404).
test/fixtures/output/notifications/user-notification/update-help.goldenAdds golden help for user-notification update.
test/fixtures/output/notifications/user-notification/list/list.goldenAdds golden output for user-notification list (human).
test/fixtures/output/notifications/user-notification/list/list-yaml.goldenAdds golden output for user-notification list (yaml).
test/fixtures/output/notifications/user-notification/list/list-type.goldenAdds golden output for user-notification list filtered by type.
test/fixtures/output/notifications/user-notification/list/list-time-range.goldenAdds golden output for user-notification list filtered by time range.
test/fixtures/output/notifications/user-notification/list/list-sort.goldenAdds golden output for user-notification list sorted.
test/fixtures/output/notifications/user-notification/list/list-severity.goldenAdds golden output for user-notification list filtered by severity.
test/fixtures/output/notifications/user-notification/list/list-search.goldenAdds golden output for user-notification list filtered by search.
test/fixtures/output/notifications/user-notification/list/list-read.goldenAdds golden output for user-notification list filtered by read.
test/fixtures/output/notifications/user-notification/list/list-json.goldenAdds golden output for user-notification list (json).
test/fixtures/output/notifications/user-notification/list/list-include.goldenAdds golden output for user-notification list with include fields.
test/fixtures/output/notifications/user-notification/list/list-crn.goldenAdds golden output for user-notification list filtered by CRN.
test/fixtures/output/notifications/user-notification/list-help.goldenAdds golden help for user-notification list.
test/fixtures/output/notifications/user-notification/help.goldenAdds golden help for user-notification command group.
test/fixtures/output/notifications/user-notification/describe/describe.goldenAdds golden output for user-notification describe (human).
test/fixtures/output/notifications/user-notification/describe/describe-yaml.goldenAdds golden output for user-notification describe (yaml).
test/fixtures/output/notifications/user-notification/describe/describe-json.goldenAdds golden output for user-notification describe (json).
test/fixtures/output/notifications/user-notification/describe/describe-invalid.goldenAdds golden output for user-notification describe (404).
test/fixtures/output/notifications/user-notification/describe/describe-autocomplete.goldenAdds golden output for user-notification autocomplete.
test/fixtures/output/notifications/user-notification/describe-help.goldenAdds golden help for user-notification describe.
test/fixtures/output/notifications/subscription/update/update-invalid.goldenAdds golden output for subscription update (404).
test/fixtures/output/notifications/subscription/update/update-integrations.goldenAdds golden output for subscription update integrations (human).
test/fixtures/output/notifications/subscription/update/update-current-state.goldenAdds golden output for subscription update current-state (human).
test/fixtures/output/notifications/subscription/update-help.goldenAdds golden help for subscription update.
test/fixtures/output/notifications/subscription/list/list.goldenAdds golden output for subscription list (human).
test/fixtures/output/notifications/subscription/list/list-yaml.goldenAdds golden output for subscription list (yaml).
test/fixtures/output/notifications/subscription/list/list-json.goldenAdds golden output for subscription list (json).
test/fixtures/output/notifications/subscription/list-help.goldenAdds golden help for subscription list.
test/fixtures/output/notifications/subscription/help.goldenAdds golden help for subscription command group.
test/fixtures/output/notifications/subscription/describe/describe.goldenAdds golden output for subscription describe (human).
test/fixtures/output/notifications/subscription/describe/describe-yaml.goldenAdds golden output for subscription describe (yaml).
test/fixtures/output/notifications/subscription/describe/describe-json.goldenAdds golden output for subscription describe (json).
test/fixtures/output/notifications/subscription/describe/describe-invalid.goldenAdds golden output for subscription describe (404).
test/fixtures/output/notifications/subscription/describe/describe-autocomplete.goldenAdds golden output for subscription describe autocomplete.
test/fixtures/output/notifications/subscription/describe-help.goldenAdds golden help for subscription describe.
test/fixtures/output/notifications/subscription/delete/delete.goldenAdds golden output for subscription delete (force).
test/fixtures/output/notifications/subscription/delete/delete-no-force.goldenAdds golden output for subscription delete (prompt).
test/fixtures/output/notifications/subscription/delete/delete-multiple.goldenAdds golden output for multi-delete subscriptions.
test/fixtures/output/notifications/subscription/delete/delete-invalid.goldenAdds golden output for subscription delete invalid + suggestions.
test/fixtures/output/notifications/subscription/delete/delete-autocomplete.goldenAdds golden output for subscription delete autocomplete.
test/fixtures/output/notifications/subscription/delete-help.goldenAdds golden help for subscription delete.
test/fixtures/output/notifications/subscription/create/create.goldenAdds golden output for subscription create (human).
test/fixtures/output/notifications/subscription/create/create-current-state.goldenAdds golden output for subscription create with current-state.
test/fixtures/output/notifications/subscription/create-help.goldenAdds golden help for subscription create.
test/fixtures/output/notifications/resource-subscription/update/update-resource.goldenAdds golden output for resource-subscription update resource.
test/fixtures/output/notifications/resource-subscription/update/update-resource-type.goldenAdds golden output for resource-subscription update resource-type.
test/fixtures/output/notifications/resource-subscription/update/update-invalid.goldenAdds golden output for resource-subscription update (404).
test/fixtures/output/notifications/resource-subscription/update/update-integrations.goldenAdds golden output for resource-subscription update integrations.
test/fixtures/output/notifications/resource-subscription/update/update-current-state.goldenAdds golden output for resource-subscription update current-state.
test/fixtures/output/notifications/resource-subscription/update-help.goldenAdds golden help for resource-subscription update.
test/fixtures/output/notifications/resource-subscription/help.goldenAdds golden help for resource-subscription command group.
test/fixtures/output/notifications/resource-subscription/describe/describe.goldenAdds golden output for resource-subscription describe (human).
test/fixtures/output/notifications/resource-subscription/describe/describe-yaml.goldenAdds golden output for resource-subscription describe (yaml).
test/fixtures/output/notifications/resource-subscription/describe/describe-json.goldenAdds golden output for resource-subscription describe (json).
test/fixtures/output/notifications/resource-subscription/describe/describe-invalid.goldenAdds golden output for resource-subscription describe (404).
test/fixtures/output/notifications/resource-subscription/describe-help.goldenAdds golden help for resource-subscription describe.
test/fixtures/output/notifications/resource-subscription/delete/delete.goldenAdds golden output for resource-subscription delete (force).
test/fixtures/output/notifications/resource-subscription/delete/delete-no-force.goldenAdds golden output for resource-subscription delete (prompt).
test/fixtures/output/notifications/resource-subscription/delete/delete-multiple.goldenAdds golden output for multi-delete resource-subscriptions.
test/fixtures/output/notifications/resource-subscription/delete/delete-invalid.goldenAdds golden output for resource-subscription delete invalid + suggestions.
test/fixtures/output/notifications/resource-subscription/delete-help.goldenAdds golden help for resource-subscription delete.
test/fixtures/output/notifications/resource-subscription/create/create.goldenAdds golden output for resource-subscription create (human).
test/fixtures/output/notifications/resource-subscription/create/create-current-state.goldenAdds golden output for resource-subscription create with current-state.
test/fixtures/output/notifications/resource-subscription/create-help.goldenAdds golden help for resource-subscription create.
test/fixtures/output/notifications/resource-preference/update/update-resource.goldenAdds golden output for resource-preference update resource.
test/fixtures/output/notifications/resource-preference/update/update-resource-type.goldenAdds golden output for resource-preference update resource-type.
test/fixtures/output/notifications/resource-preference/update/update-invalid.goldenAdds golden output for resource-preference update (404).
test/fixtures/output/notifications/resource-preference/update/update-current-state.goldenAdds golden output for resource-preference update current-state.
test/fixtures/output/notifications/resource-preference/update-help.goldenAdds golden help for resource-preference update.
test/fixtures/output/notifications/resource-preference/help.goldenAdds golden help for resource-preference command group.
test/fixtures/output/notifications/resource-preference/describe/describe.goldenAdds golden output for resource-preference describe (human).
test/fixtures/output/notifications/resource-preference/describe/describe-yaml.goldenAdds golden output for resource-preference describe (yaml).
test/fixtures/output/notifications/resource-preference/describe/describe-json.goldenAdds golden output for resource-preference describe (json).
test/fixtures/output/notifications/resource-preference/describe/describe-invalid.goldenAdds golden output for resource-preference describe (404).
test/fixtures/output/notifications/resource-preference/describe-help.goldenAdds golden help for resource-preference describe.
test/fixtures/output/notifications/resource-preference/delete/delete.goldenAdds golden output for resource-preference delete (force).
test/fixtures/output/notifications/resource-preference/delete/delete-no-force.goldenAdds golden output for resource-preference delete (prompt).
test/fixtures/output/notifications/resource-preference/delete/delete-multiple.goldenAdds golden output for multi-delete resource-preferences.
test/fixtures/output/notifications/resource-preference/delete/delete-invalid.goldenAdds golden output for resource-preference delete invalid + suggestions.
test/fixtures/output/notifications/resource-preference/delete-help.goldenAdds golden help for resource-preference delete.
test/fixtures/output/notifications/resource-preference/create/create.goldenAdds golden output for resource-preference create (human).
test/fixtures/output/notifications/resource-preference/create/create-current-state.goldenAdds golden output for resource-preference create with current-state.
test/fixtures/output/notifications/resource-preference/create-help.goldenAdds golden help for resource-preference create.
test/fixtures/output/notifications/notification-type/list/list.goldenAdds golden output for notification-type list (human).
test/fixtures/output/notifications/notification-type/list/list-yaml.goldenAdds golden output for notification-type list (yaml).
test/fixtures/output/notifications/notification-type/list/list-resource-type.goldenAdds golden output for notification-type list filtered by resource-type.
test/fixtures/output/notifications/notification-type/list/list-json.goldenAdds golden output for notification-type list (json).
test/fixtures/output/notifications/notification-type/list-help.goldenAdds golden help for notification-type list.
test/fixtures/output/notifications/notification-type/help.goldenAdds golden help for notification-type command group.
test/fixtures/output/notifications/notification-type/describe/describe.goldenAdds golden output for notification-type describe (human).
test/fixtures/output/notifications/notification-type/describe/describe-yaml.goldenAdds golden output for notification-type describe (yaml).
test/fixtures/output/notifications/notification-type/describe/describe-json.goldenAdds golden output for notification-type describe (json).
test/fixtures/output/notifications/notification-type/describe/describe-invalid.goldenAdds golden output for notification-type describe (404).
test/fixtures/output/notifications/notification-type/describe/describe-autocomplete.goldenAdds golden output for notification-type autocomplete.
test/fixtures/output/notifications/notification-type/describe-help.goldenAdds golden help for notification-type describe.
test/fixtures/output/notifications/integration/update/update-webhook-target.goldenAdds golden output for integration update webhook target.
test/fixtures/output/notifications/integration/update/update-slack-target.goldenAdds golden output for integration update slack target.
test/fixtures/output/notifications/integration/update/update-ms-teams-target.goldenAdds golden output for integration update MsTeams target.
test/fixtures/output/notifications/integration/update/update-invalid.goldenAdds golden output for integration update (404).
test/fixtures/output/notifications/integration/update/update-display-name.goldenAdds golden output for integration update display-name.
test/fixtures/output/notifications/integration/update/update-description.goldenAdds golden output for integration update description.
test/fixtures/output/notifications/integration/update-help.goldenAdds golden help for integration update.
test/fixtures/output/notifications/integration/list/list.goldenAdds golden output for integration list (human).
test/fixtures/output/notifications/integration/list/list-yaml.goldenAdds golden output for integration list (yaml).
test/fixtures/output/notifications/integration/list/list-json.goldenAdds golden output for integration list (json).
test/fixtures/output/notifications/integration/list-help.goldenAdds golden help for integration list.
test/fixtures/output/notifications/integration/help.goldenAdds golden help for integration command group.
test/fixtures/output/notifications/integration/describe/describe-yaml.goldenAdds golden output for integration describe (yaml).
test/fixtures/output/notifications/integration/describe/describe-webhook-target.goldenAdds golden output for integration describe webhook target.
test/fixtures/output/notifications/integration/describe/describe-user-email-target.goldenAdds golden output for integration describe user-email target.
test/fixtures/output/notifications/integration/describe/describe-slack-target.goldenAdds golden output for integration describe slack target.
test/fixtures/output/notifications/integration/describe/describe-role-email-target.goldenAdds golden output for integration describe role-email target.
test/fixtures/output/notifications/integration/describe/describe-ms-teams-target.goldenAdds golden output for integration describe MsTeams target.
test/fixtures/output/notifications/integration/describe/describe-json.goldenAdds golden output for integration describe (json).
test/fixtures/output/notifications/integration/describe/describe-invalid.goldenAdds golden output for integration describe (404).
test/fixtures/output/notifications/integration/describe/describe-in-app-target.goldenAdds golden output for integration describe in-app target.
test/fixtures/output/notifications/integration/describe/describe-autocomplete.goldenAdds golden output for integration autocomplete.
test/fixtures/output/notifications/integration/describe-help.goldenAdds golden help for integration describe.
test/fixtures/output/notifications/integration/delete/delete.goldenAdds golden output for integration delete (force).
test/fixtures/output/notifications/integration/delete/delete-no-force.goldenAdds golden output for integration delete (prompt).
test/fixtures/output/notifications/integration/delete/delete-multiple.goldenAdds golden output for multi-delete integrations.
test/fixtures/output/notifications/integration/delete/delete-invalid.goldenAdds golden output for integration delete invalid + suggestions.
test/fixtures/output/notifications/integration/delete/delete-autocomplete.goldenAdds golden output for integration delete autocomplete.
test/fixtures/output/notifications/integration/delete-help.goldenAdds golden help for integration delete.
test/fixtures/output/notifications/integration/create/create-webhook-target.goldenAdds golden output for integration create webhook target.
test/fixtures/output/notifications/integration/create/create-slack-target.goldenAdds golden output for integration create slack target.
test/fixtures/output/notifications/integration/create/create-ms-teams-target.goldenAdds golden output for integration create MsTeams target.
test/fixtures/output/notifications/integration/create/create-description.goldenAdds golden output for integration create with description.
test/fixtures/output/notifications/integration/create-help.goldenAdds golden help for integration create.
test/fixtures/output/notifications/help.goldenAdds golden help for top-level notifications command group.
test/fixtures/output/help.goldenAdds the notifications entry to root help golden.
test/fixtures/input/notifications/user-notification/read_created_user_notification.jsonAdds fixture payload for reading user-notifications.
test/fixtures/input/notifications/user-notification/create_user_notification.jsonAdds fixture payload for creating user-notifications.
test/fixtures/input/notifications/subscription/read_created_subscription.jsonAdds fixture payload for reading subscriptions.
test/fixtures/input/notifications/subscription/create_subscription.jsonAdds fixture payload for creating subscriptions.
test/fixtures/input/notifications/resource-subscription/read_created_resource_subscription.jsonAdds fixture payload for reading resource-subscriptions.
test/fixtures/input/notifications/resource-subscription/create_resource_subscription.jsonAdds fixture payload for creating resource-subscriptions.
test/fixtures/input/notifications/resource-preference/read_created_resource_preference.jsonAdds fixture payload for reading resource-preferences.
test/fixtures/input/notifications/resource-preference/create_resource_preference.jsonAdds fixture payload for creating resource-preferences.
test/fixtures/input/notifications/notification-type/read_created_notification_type.jsonAdds fixture payload for reading notification-types.
test/fixtures/input/notifications/notification-type/create_notification_type.jsonAdds fixture payload for creating notification-types.
test/fixtures/input/notifications/integration/read_created_webhook_target.jsonAdds fixture payload for reading webhook integration targets.
test/fixtures/input/notifications/integration/read_created_user_email_target.jsonAdds fixture payload for reading user-email integration targets.
test/fixtures/input/notifications/integration/read_created_slack_target.jsonAdds fixture payload for reading slack integration targets.
test/fixtures/input/notifications/integration/read_created_role_email_target.jsonAdds fixture payload for reading role-email integration targets.
test/fixtures/input/notifications/integration/read_created_ms_teams_target.jsonAdds fixture payload for reading MsTeams integration targets.
test/fixtures/input/notifications/integration/read_created_in_app_target.jsonAdds fixture payload for reading in-app integration targets.
test/fixtures/input/notifications/integration/create_webhook_target.jsonAdds fixture payload for creating webhook integration targets.
test/fixtures/input/notifications/integration/create_user_email_target.jsonAdds fixture payload for creating user-email integration targets.
test/fixtures/input/notifications/integration/create_slack_target.jsonAdds fixture payload for creating slack integration targets.
test/fixtures/input/notifications/integration/create_role_email_target.jsonAdds fixture payload for creating role-email integration targets.
test/fixtures/input/notifications/integration/create_ms_teams_target.jsonAdds fixture payload for creating MsTeams integration targets.
test/fixtures/input/notifications/integration/create_in_app_target.jsonAdds fixture payload for creating in-app integration targets.
pkg/ccloudv2/notifications.goAdds Notifications v1 client + wrapper methods for CRUD/list operations.
pkg/ccloudv2/client.goRegisters NotificationsClient on the shared CCloud v2 client.
internal/notifications/command.goAdds the top-level notifications command and subcommand registration.
internal/notifications/command_user_notification.goAdds user-notification command group, output formatting, and autocomplete.
internal/notifications/command_user_notification_update.goAdds user-notification update command + --read support.
internal/notifications/command_user_notification_list.goAdds user-notification list command + filtering flags.
internal/notifications/command_user_notification_describe.goAdds user-notification describe command.
internal/notifications/command_subscription.goAdds subscription command group, output formatting, and autocomplete.
internal/notifications/command_subscription_update.goAdds subscription update command + flags.
internal/notifications/command_subscription_list.goAdds subscription list command.
internal/notifications/command_subscription_describe.goAdds subscription describe command.
internal/notifications/command_subscription_delete.goAdds subscription delete (multi-delete) using shared deletion helpers.
internal/notifications/command_subscription_create.goAdds subscription create command + flags.
internal/notifications/command_resource_subscription.goAdds resource-subscription command group + output formatting.
internal/notifications/command_resource_subscription_update.goAdds resource-subscription update command + flags.
internal/notifications/command_resource_subscription_describe.goAdds resource-subscription describe command.
internal/notifications/command_resource_subscription_delete.goAdds resource-subscription delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_subscription_create.goAdds resource-subscription create command + flags.
internal/notifications/command_resource_preference.goAdds resource-preference command group + output formatting.
internal/notifications/command_resource_preference_update.goAdds resource-preference update command + flags.
internal/notifications/command_resource_preference_describe.goAdds resource-preference describe command.
internal/notifications/command_resource_preference_delete.goAdds resource-preference delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_preference_create.goAdds resource-preference create command + flags.
internal/notifications/command_notification_type.goAdds notification-type command group + output formatting + autocomplete.
internal/notifications/command_notification_type_list.goAdds notification-type list command + filter flag.
internal/notifications/command_notification_type_describe.goAdds notification-type describe command.
internal/notifications/command_integration.goAdds integration command group + output formatting + autocomplete.
internal/notifications/command_integration_update.goAdds integration update command + target-kind handling.
internal/notifications/command_integration_list.goAdds integration list command.
internal/notifications/command_integration_describe.goAdds integration describe command.
internal/notifications/command_integration_delete.goAdds integration delete (multi-delete) using deletion helpers.
internal/notifications/command_integration_create.goAdds integration create command + target-kind handling.
internal/command.goRegisters notifications under the root command.
go.sumAdds checksums for the notifications internal SDK module.
go.modAdds dependency on github.com/confluentinc/ccloud-sdk-go-v2-internal/notifications.
cmd/lint/main.goExtends spellcheck vocabulary for new notifications-related terms.
.cli-generation-checksumUpdates generator checksum to reflect regenerated sources.
Files not reviewed (25)
  • internal/notifications/command.go: Generated file
  • internal/notifications/command_integration.go: Generated file
  • internal/notifications/command_integration_create.go: Generated file
  • internal/notifications/command_integration_delete.go: Generated file
  • internal/notifications/command_integration_describe.go: Generated file
  • internal/notifications/command_integration_list.go: Generated file
  • internal/notifications/command_integration_update.go: Generated file
  • internal/notifications/command_notification_type.go: Generated file
  • internal/notifications/command_notification_type_describe.go: Generated file
  • internal/notifications/command_notification_type_list.go: Generated file
  • internal/notifications/command_resource_preference.go: Generated file
  • internal/notifications/command_resource_preference_create.go: Generated file
  • internal/notifications/command_resource_preference_delete.go: Generated file
  • internal/notifications/command_resource_preference_describe.go: Generated file
  • internal/notifications/command_resource_preference_update.go: Generated file
  • internal/notifications/command_resource_subscription.go: Generated file
  • internal/notifications/command_resource_subscription_create.go: Generated file
  • internal/notifications/command_resource_subscription_delete.go: Generated file
  • internal/notifications/command_resource_subscription_describe.go: Generated file
  • internal/notifications/command_resource_subscription_update.go: Generated file
  • internal/notifications/command_subscription.go: Generated file
  • internal/notifications/command_subscription_create.go: Generated file
  • internal/notifications/command_subscription_delete.go: Generated file
  • internal/notifications/command_subscription_describe.go: Generated file
  • internal/notifications/command_subscription_list.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadinternal/notifications/command_subscription_create.go Outdated
Comment threadinternal/notifications/command_subscription_update.go Outdated
Comment threadinternal/notifications/command_integration_create.go
Comment threadinternal/notifications/command_integration_update.go
Comment threadinternal/notifications/command_resource_subscription_create.go Outdated
Comment threadcmd/lint/main.go Outdated
Comment threadinternal/notifications/command_resource_subscription_update.go Outdated
Two files conflicted.
test/fixtures/output/help.golden: main renamed `unified-stream-manager` to
`usm`, which shortened cobra's longest command name and re-padded every line in
the Available Commands block. Took main's block and regenerated the golden with
`go test ./test -run TestCLI/TestHelp -update`, which re-added the
notifications line at the new padding.
.cli-generation-checksum: main carries the flink region suite's value, this
branch carries notifications'. Kept this branch's. The file records the
last-generated suite only and drives PR labeling, so neither value is a drift
signal.
go build ./... and go test ./test -run TestCLI/TestNotifications both pass on
the merge result.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Picks up cli-terraform-generator's allow-list remedy fix. Eight stringSlice
flags now carry the CLI's own comma-separated-list wording instead of the
spec's HTTP-shape prose, the notifications parent command's Short registers
"Cloud Notifications", and one capitalized common noun is fixed in the spec.
Removes "Integrations" from properNouns: it was registered by an earlier merge
to satisfy one flag's help text, and RequireCapitalizeProperNouns then mandated
that capitalization across the whole CLI, failing three descriptions in
`confluent provider-integration`. "recieve" goes with the spec typo it covered.
`make lint-cli` passes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@airlock-confluentinc
airlock-confluentincBotforce-pushed the onboard-notifications-integration branch from 8d059d9 to ccc3483CompareAugust 14, 2026 16:26
ccloud-sdk-go-v2/notifications v0.1.0 is published, so the six commands and
their test-server handlers import it instead of the -internal path. The Alpine
docker build runs go build in a container with no GitHub credentials and the
repo carries no vendor/, so a private module cannot resolve there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

A list command's -o json output is a JSON array, not an object, so
Unmarshal into a map failed and fell through to the table-fallback
path, which grabbed the ASCII separator row as a fake id. Try an
array first and pull the id from its first element; fall back to a
plain object for describe-style output. Drop the table-parsing path
entirely — every CaptureID call site pairs with -o json now.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…r fixes
The last merge predated several generator-side fixes: the zeroCheck
replacement for optional StringSlice query params (a []string flag
never reads as a literal nil, so severity/resource-type/resource-crn/
sort filters were always sent even when unset), the switch from a
literal {id} placeholder to the spec's own example values in create/
update test args, and the List-before-Describe reordering plus -o
json request on every live-test List step used for ID capture.
Regenerated command/wrapper/test-server/fixture/golden files for
Integration, Subscription, ResourcePreference, ResourceSubscription,
NotificationType, and UserNotification.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nds to pick up objectref_write_placeholders
An array-valued ObjectReference field (integrations) built each element
as {Id: id} only, leaving the SDK's required related/resource_name
fields as empty strings on the wire. The real API rejects that with a
400. cli.objectref_write_placeholders already covered the scalar
notification_type case; this regeneration picks up the generator-side
fix that ported the same placeholder injection into the array-building
loops of create and update.
Regenerated Subscription and ResourceSubscription via cli-tfgen
--official-sdk to avoid a local SDK replace directive in go.mod.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

Sign up for freeto 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

@alexfayad
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Add the six notifications commands - #3443

Open
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration
Open

Add the six notifications commands#3443
Alexander Fayad (alexfayad) wants to merge 9 commits into
mainfrom
onboard-notifications-integration

Conversation

@alexfayad

@alexfayadAlexander Fayad (alexfayad) commented Aug 13, 2026

Copy link
Copy Markdown

Release Notes

New Features

  • Add confluent notifications commands for managing notification integrations, subscriptions, resource preferences, resource subscriptions, notification types, and in-app user notifications.

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

Onboards Confluent Cloud Notifications to the CLI. Adds six command groups under confluent notifications: integration, subscription, resource-preference, resource-subscription, notification-type, and user-notification.

The code is generated by cli-terraform-generator from the notifications OpenAPI spec and Go SDK. The commands, the pkg/ccloudv2 wrapper, the test-server handlers, the integration tests, the live tests, and the goldens all come from the generator.

One API-specific workaround is baked in. The related and resource_name sub-fields of the shared GlobalObjectReference are marked required, readOnly, and format: uri in the spec, and the SDK serializes them unconditionally. A create that carried only id sent an empty string for both and Confluent Cloud rejected it with 400 Bad Request. The generated subscription and resource-subscription commands now fill both fields with a placeholder URI on create and update, matching the workaround the published confluent_ksql_cluster Terraform resource already uses.

Confluent Cloud only.

Blast Radius

New commands only. No existing command changes, and nothing outside internal/notifications shares this code. If a notifications command misbehaves, only customers running confluent notifications ... are affected.

References

Test & Review

Built a custom binary and ran the notifications commands against a real Confluent Cloud org. Verified create / describe / list / delete for integration, and create / describe / update / delete for subscription and resource-subscription with a multi-element integrations value, all without the prior 400. Generated integration and live tests are included.

CLI create against real Confluent Cloud (before/after the fix)

Before the fix, related/resource_name went out as a non-URI placeholder and Confluent Cloud rejected the create against the spec's format: uri on /integrations/0/related:

POST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"_","resource_name":"_"}],"notification_type":{"id":"nt-9KD1p","related":"_","resource_name":"_"}}HTTP/2.0 400 Bad Request{"errors":[{"status":"400","code":"1101","title":"Invalid request body","detail":"Invalid Json: Invalid request body","source":{"pointer":"/integrations/0/related"}}]}Error: Invalid Json: Invalid request body

The shipped command fills both fields with a placeholder URI and the create succeeds:

$ confluent notifications subscription create --notification-type nt-9KD1p --integrations i-59wqM --current-state ENABLED -o jsonPOST /notifications/v1/subscriptions{"current_state":"ENABLED","integrations":[{"id":"i-59wqM","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}],"notification_type":{"id":"nt-9KD1p","related":"https://confluent.cloud/_","resource_name":"https://confluent.cloud/_"}}HTTP/2.0 201 Created{ "id": "s-gAXVpd", "notification_type": "nt-9KD1p", "current_state": "ENABLED"}

🤖 Generated with Claude Code

Generated by cli-terraform-generator merge mode from the notifications v1
OpenAPI spec: integration, subscription, resource-preference,
resource-subscription, notification-type, and user-notification, plus their
ccloudv2 wrappers, test-server handlers, integration tests, input fixtures,
output goldens, and live tests.
The integration command's target is a oneOf. Update leaves --kind optional so
an update touching only display-name or description is accepted, and rejects a
variant flag supplied without --kind rather than silently dropping it.
Verified with go build ./..., go vet, and
go test ./test/ -run 'TestCLI/TestNotifications'.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CopilotAI lite review requested due to automatic review settings August 13, 2026 18:00
@confluent-cla-assistant

confluent-cla-assistantBot commented Aug 13, 2026

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.

CopilotAI 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

This pull request introduces a new top-level notifications command group backed by the Notifications v1 CCloud SDK, adds the corresponding test-server endpoints, and wires in integration/live tests plus golden fixtures to validate CLI behavior.

Changes:

  • Add Notifications v1 API client bootstrap + CRUD/list wrappers in pkg/ccloudv2, and register the client on the shared ccloudv2.Client.
  • Add internal/notifications Cobra command tree (integrations, notification-types, resource-preferences, resource-subscriptions, subscriptions, user-notifications) and register it under the root command.
  • Extend the test server router + handlers, add integration/live tests, and add input/output fixtures + goldens for the new commands.

Reviewed changes

Copilot reviewed 185 out of 211 changed files in this pull request and generated 7 comments.

Show a summary per file
FileDescription
test/test-server/notifications_user_notification_handler.goAdds test-server handlers for user-notifications list/get/patch.
test/test-server/notifications_subscription_handler.goAdds test-server handlers for subscriptions list/create/get/update/delete.
test/test-server/notifications_resource_subscription_handler.goAdds test-server handlers for resource-subscriptions create/get/update/delete.
test/test-server/notifications_resource_preference_handler.goAdds test-server handlers for resource-preferences create/get/update/delete.
test/test-server/notifications_notification_type_handler.goAdds test-server handlers for notification-types list/get.
test/test-server/notifications_integration_handler.goAdds test-server handlers for integrations list/create/get/update/delete.
test/test-server/ccloudv2_router.goRegisters Notifications v1 routes in the test-server router.
test/notifications_user_notification_test.goAdds integration tests for user-notification describe/list/update + autocomplete.
test/notifications_subscription_test.goAdds integration tests for subscription CRUD + autocomplete.
test/notifications_resource_subscription_test.goAdds integration tests for resource-subscription CRUD.
test/notifications_resource_preference_test.goAdds integration tests for resource-preference CRUD.
test/notifications_notification_type_test.goAdds integration tests for notification-type describe/list + autocomplete.
test/notifications_integration_test.goAdds integration tests for integration CRUD + autocomplete.
test/live/notifications_user_notification_live_test.goAdds live CRUD coverage for user-notifications.
test/live/notifications_subscription_live_test.goAdds live CRUD coverage for subscriptions (env-var gated).
test/live/notifications_resource_subscription_live_test.goAdds live CRUD coverage for resource-subscriptions (env-var gated).
test/live/notifications_resource_preference_live_test.goAdds live CRUD coverage for resource-preferences.
test/live/notifications_notification_type_live_test.goAdds live coverage for notification-type list/describe.
test/fixtures/output/notifications/user-notification/update/update-read.goldenAdds golden output for user-notification update (human).
test/fixtures/output/notifications/user-notification/update/update-invalid.goldenAdds golden output for user-notification update (404).
test/fixtures/output/notifications/user-notification/update-help.goldenAdds golden help for user-notification update.
test/fixtures/output/notifications/user-notification/list/list.goldenAdds golden output for user-notification list (human).
test/fixtures/output/notifications/user-notification/list/list-yaml.goldenAdds golden output for user-notification list (yaml).
test/fixtures/output/notifications/user-notification/list/list-type.goldenAdds golden output for user-notification list filtered by type.
test/fixtures/output/notifications/user-notification/list/list-time-range.goldenAdds golden output for user-notification list filtered by time range.
test/fixtures/output/notifications/user-notification/list/list-sort.goldenAdds golden output for user-notification list sorted.
test/fixtures/output/notifications/user-notification/list/list-severity.goldenAdds golden output for user-notification list filtered by severity.
test/fixtures/output/notifications/user-notification/list/list-search.goldenAdds golden output for user-notification list filtered by search.
test/fixtures/output/notifications/user-notification/list/list-read.goldenAdds golden output for user-notification list filtered by read.
test/fixtures/output/notifications/user-notification/list/list-json.goldenAdds golden output for user-notification list (json).
test/fixtures/output/notifications/user-notification/list/list-include.goldenAdds golden output for user-notification list with include fields.
test/fixtures/output/notifications/user-notification/list/list-crn.goldenAdds golden output for user-notification list filtered by CRN.
test/fixtures/output/notifications/user-notification/list-help.goldenAdds golden help for user-notification list.
test/fixtures/output/notifications/user-notification/help.goldenAdds golden help for user-notification command group.
test/fixtures/output/notifications/user-notification/describe/describe.goldenAdds golden output for user-notification describe (human).
test/fixtures/output/notifications/user-notification/describe/describe-yaml.goldenAdds golden output for user-notification describe (yaml).
test/fixtures/output/notifications/user-notification/describe/describe-json.goldenAdds golden output for user-notification describe (json).
test/fixtures/output/notifications/user-notification/describe/describe-invalid.goldenAdds golden output for user-notification describe (404).
test/fixtures/output/notifications/user-notification/describe/describe-autocomplete.goldenAdds golden output for user-notification autocomplete.
test/fixtures/output/notifications/user-notification/describe-help.goldenAdds golden help for user-notification describe.
test/fixtures/output/notifications/subscription/update/update-invalid.goldenAdds golden output for subscription update (404).
test/fixtures/output/notifications/subscription/update/update-integrations.goldenAdds golden output for subscription update integrations (human).
test/fixtures/output/notifications/subscription/update/update-current-state.goldenAdds golden output for subscription update current-state (human).
test/fixtures/output/notifications/subscription/update-help.goldenAdds golden help for subscription update.
test/fixtures/output/notifications/subscription/list/list.goldenAdds golden output for subscription list (human).
test/fixtures/output/notifications/subscription/list/list-yaml.goldenAdds golden output for subscription list (yaml).
test/fixtures/output/notifications/subscription/list/list-json.goldenAdds golden output for subscription list (json).
test/fixtures/output/notifications/subscription/list-help.goldenAdds golden help for subscription list.
test/fixtures/output/notifications/subscription/help.goldenAdds golden help for subscription command group.
test/fixtures/output/notifications/subscription/describe/describe.goldenAdds golden output for subscription describe (human).
test/fixtures/output/notifications/subscription/describe/describe-yaml.goldenAdds golden output for subscription describe (yaml).
test/fixtures/output/notifications/subscription/describe/describe-json.goldenAdds golden output for subscription describe (json).
test/fixtures/output/notifications/subscription/describe/describe-invalid.goldenAdds golden output for subscription describe (404).
test/fixtures/output/notifications/subscription/describe/describe-autocomplete.goldenAdds golden output for subscription describe autocomplete.
test/fixtures/output/notifications/subscription/describe-help.goldenAdds golden help for subscription describe.
test/fixtures/output/notifications/subscription/delete/delete.goldenAdds golden output for subscription delete (force).
test/fixtures/output/notifications/subscription/delete/delete-no-force.goldenAdds golden output for subscription delete (prompt).
test/fixtures/output/notifications/subscription/delete/delete-multiple.goldenAdds golden output for multi-delete subscriptions.
test/fixtures/output/notifications/subscription/delete/delete-invalid.goldenAdds golden output for subscription delete invalid + suggestions.
test/fixtures/output/notifications/subscription/delete/delete-autocomplete.goldenAdds golden output for subscription delete autocomplete.
test/fixtures/output/notifications/subscription/delete-help.goldenAdds golden help for subscription delete.
test/fixtures/output/notifications/subscription/create/create.goldenAdds golden output for subscription create (human).
test/fixtures/output/notifications/subscription/create/create-current-state.goldenAdds golden output for subscription create with current-state.
test/fixtures/output/notifications/subscription/create-help.goldenAdds golden help for subscription create.
test/fixtures/output/notifications/resource-subscription/update/update-resource.goldenAdds golden output for resource-subscription update resource.
test/fixtures/output/notifications/resource-subscription/update/update-resource-type.goldenAdds golden output for resource-subscription update resource-type.
test/fixtures/output/notifications/resource-subscription/update/update-invalid.goldenAdds golden output for resource-subscription update (404).
test/fixtures/output/notifications/resource-subscription/update/update-integrations.goldenAdds golden output for resource-subscription update integrations.
test/fixtures/output/notifications/resource-subscription/update/update-current-state.goldenAdds golden output for resource-subscription update current-state.
test/fixtures/output/notifications/resource-subscription/update-help.goldenAdds golden help for resource-subscription update.
test/fixtures/output/notifications/resource-subscription/help.goldenAdds golden help for resource-subscription command group.
test/fixtures/output/notifications/resource-subscription/describe/describe.goldenAdds golden output for resource-subscription describe (human).
test/fixtures/output/notifications/resource-subscription/describe/describe-yaml.goldenAdds golden output for resource-subscription describe (yaml).
test/fixtures/output/notifications/resource-subscription/describe/describe-json.goldenAdds golden output for resource-subscription describe (json).
test/fixtures/output/notifications/resource-subscription/describe/describe-invalid.goldenAdds golden output for resource-subscription describe (404).
test/fixtures/output/notifications/resource-subscription/describe-help.goldenAdds golden help for resource-subscription describe.
test/fixtures/output/notifications/resource-subscription/delete/delete.goldenAdds golden output for resource-subscription delete (force).
test/fixtures/output/notifications/resource-subscription/delete/delete-no-force.goldenAdds golden output for resource-subscription delete (prompt).
test/fixtures/output/notifications/resource-subscription/delete/delete-multiple.goldenAdds golden output for multi-delete resource-subscriptions.
test/fixtures/output/notifications/resource-subscription/delete/delete-invalid.goldenAdds golden output for resource-subscription delete invalid + suggestions.
test/fixtures/output/notifications/resource-subscription/delete-help.goldenAdds golden help for resource-subscription delete.
test/fixtures/output/notifications/resource-subscription/create/create.goldenAdds golden output for resource-subscription create (human).
test/fixtures/output/notifications/resource-subscription/create/create-current-state.goldenAdds golden output for resource-subscription create with current-state.
test/fixtures/output/notifications/resource-subscription/create-help.goldenAdds golden help for resource-subscription create.
test/fixtures/output/notifications/resource-preference/update/update-resource.goldenAdds golden output for resource-preference update resource.
test/fixtures/output/notifications/resource-preference/update/update-resource-type.goldenAdds golden output for resource-preference update resource-type.
test/fixtures/output/notifications/resource-preference/update/update-invalid.goldenAdds golden output for resource-preference update (404).
test/fixtures/output/notifications/resource-preference/update/update-current-state.goldenAdds golden output for resource-preference update current-state.
test/fixtures/output/notifications/resource-preference/update-help.goldenAdds golden help for resource-preference update.
test/fixtures/output/notifications/resource-preference/help.goldenAdds golden help for resource-preference command group.
test/fixtures/output/notifications/resource-preference/describe/describe.goldenAdds golden output for resource-preference describe (human).
test/fixtures/output/notifications/resource-preference/describe/describe-yaml.goldenAdds golden output for resource-preference describe (yaml).
test/fixtures/output/notifications/resource-preference/describe/describe-json.goldenAdds golden output for resource-preference describe (json).
test/fixtures/output/notifications/resource-preference/describe/describe-invalid.goldenAdds golden output for resource-preference describe (404).
test/fixtures/output/notifications/resource-preference/describe-help.goldenAdds golden help for resource-preference describe.
test/fixtures/output/notifications/resource-preference/delete/delete.goldenAdds golden output for resource-preference delete (force).
test/fixtures/output/notifications/resource-preference/delete/delete-no-force.goldenAdds golden output for resource-preference delete (prompt).
test/fixtures/output/notifications/resource-preference/delete/delete-multiple.goldenAdds golden output for multi-delete resource-preferences.
test/fixtures/output/notifications/resource-preference/delete/delete-invalid.goldenAdds golden output for resource-preference delete invalid + suggestions.
test/fixtures/output/notifications/resource-preference/delete-help.goldenAdds golden help for resource-preference delete.
test/fixtures/output/notifications/resource-preference/create/create.goldenAdds golden output for resource-preference create (human).
test/fixtures/output/notifications/resource-preference/create/create-current-state.goldenAdds golden output for resource-preference create with current-state.
test/fixtures/output/notifications/resource-preference/create-help.goldenAdds golden help for resource-preference create.
test/fixtures/output/notifications/notification-type/list/list.goldenAdds golden output for notification-type list (human).
test/fixtures/output/notifications/notification-type/list/list-yaml.goldenAdds golden output for notification-type list (yaml).
test/fixtures/output/notifications/notification-type/list/list-resource-type.goldenAdds golden output for notification-type list filtered by resource-type.
test/fixtures/output/notifications/notification-type/list/list-json.goldenAdds golden output for notification-type list (json).
test/fixtures/output/notifications/notification-type/list-help.goldenAdds golden help for notification-type list.
test/fixtures/output/notifications/notification-type/help.goldenAdds golden help for notification-type command group.
test/fixtures/output/notifications/notification-type/describe/describe.goldenAdds golden output for notification-type describe (human).
test/fixtures/output/notifications/notification-type/describe/describe-yaml.goldenAdds golden output for notification-type describe (yaml).
test/fixtures/output/notifications/notification-type/describe/describe-json.goldenAdds golden output for notification-type describe (json).
test/fixtures/output/notifications/notification-type/describe/describe-invalid.goldenAdds golden output for notification-type describe (404).
test/fixtures/output/notifications/notification-type/describe/describe-autocomplete.goldenAdds golden output for notification-type autocomplete.
test/fixtures/output/notifications/notification-type/describe-help.goldenAdds golden help for notification-type describe.
test/fixtures/output/notifications/integration/update/update-webhook-target.goldenAdds golden output for integration update webhook target.
test/fixtures/output/notifications/integration/update/update-slack-target.goldenAdds golden output for integration update slack target.
test/fixtures/output/notifications/integration/update/update-ms-teams-target.goldenAdds golden output for integration update MsTeams target.
test/fixtures/output/notifications/integration/update/update-invalid.goldenAdds golden output for integration update (404).
test/fixtures/output/notifications/integration/update/update-display-name.goldenAdds golden output for integration update display-name.
test/fixtures/output/notifications/integration/update/update-description.goldenAdds golden output for integration update description.
test/fixtures/output/notifications/integration/update-help.goldenAdds golden help for integration update.
test/fixtures/output/notifications/integration/list/list.goldenAdds golden output for integration list (human).
test/fixtures/output/notifications/integration/list/list-yaml.goldenAdds golden output for integration list (yaml).
test/fixtures/output/notifications/integration/list/list-json.goldenAdds golden output for integration list (json).
test/fixtures/output/notifications/integration/list-help.goldenAdds golden help for integration list.
test/fixtures/output/notifications/integration/help.goldenAdds golden help for integration command group.
test/fixtures/output/notifications/integration/describe/describe-yaml.goldenAdds golden output for integration describe (yaml).
test/fixtures/output/notifications/integration/describe/describe-webhook-target.goldenAdds golden output for integration describe webhook target.
test/fixtures/output/notifications/integration/describe/describe-user-email-target.goldenAdds golden output for integration describe user-email target.
test/fixtures/output/notifications/integration/describe/describe-slack-target.goldenAdds golden output for integration describe slack target.
test/fixtures/output/notifications/integration/describe/describe-role-email-target.goldenAdds golden output for integration describe role-email target.
test/fixtures/output/notifications/integration/describe/describe-ms-teams-target.goldenAdds golden output for integration describe MsTeams target.
test/fixtures/output/notifications/integration/describe/describe-json.goldenAdds golden output for integration describe (json).
test/fixtures/output/notifications/integration/describe/describe-invalid.goldenAdds golden output for integration describe (404).
test/fixtures/output/notifications/integration/describe/describe-in-app-target.goldenAdds golden output for integration describe in-app target.
test/fixtures/output/notifications/integration/describe/describe-autocomplete.goldenAdds golden output for integration autocomplete.
test/fixtures/output/notifications/integration/describe-help.goldenAdds golden help for integration describe.
test/fixtures/output/notifications/integration/delete/delete.goldenAdds golden output for integration delete (force).
test/fixtures/output/notifications/integration/delete/delete-no-force.goldenAdds golden output for integration delete (prompt).
test/fixtures/output/notifications/integration/delete/delete-multiple.goldenAdds golden output for multi-delete integrations.
test/fixtures/output/notifications/integration/delete/delete-invalid.goldenAdds golden output for integration delete invalid + suggestions.
test/fixtures/output/notifications/integration/delete/delete-autocomplete.goldenAdds golden output for integration delete autocomplete.
test/fixtures/output/notifications/integration/delete-help.goldenAdds golden help for integration delete.
test/fixtures/output/notifications/integration/create/create-webhook-target.goldenAdds golden output for integration create webhook target.
test/fixtures/output/notifications/integration/create/create-slack-target.goldenAdds golden output for integration create slack target.
test/fixtures/output/notifications/integration/create/create-ms-teams-target.goldenAdds golden output for integration create MsTeams target.
test/fixtures/output/notifications/integration/create/create-description.goldenAdds golden output for integration create with description.
test/fixtures/output/notifications/integration/create-help.goldenAdds golden help for integration create.
test/fixtures/output/notifications/help.goldenAdds golden help for top-level notifications command group.
test/fixtures/output/help.goldenAdds the notifications entry to root help golden.
test/fixtures/input/notifications/user-notification/read_created_user_notification.jsonAdds fixture payload for reading user-notifications.
test/fixtures/input/notifications/user-notification/create_user_notification.jsonAdds fixture payload for creating user-notifications.
test/fixtures/input/notifications/subscription/read_created_subscription.jsonAdds fixture payload for reading subscriptions.
test/fixtures/input/notifications/subscription/create_subscription.jsonAdds fixture payload for creating subscriptions.
test/fixtures/input/notifications/resource-subscription/read_created_resource_subscription.jsonAdds fixture payload for reading resource-subscriptions.
test/fixtures/input/notifications/resource-subscription/create_resource_subscription.jsonAdds fixture payload for creating resource-subscriptions.
test/fixtures/input/notifications/resource-preference/read_created_resource_preference.jsonAdds fixture payload for reading resource-preferences.
test/fixtures/input/notifications/resource-preference/create_resource_preference.jsonAdds fixture payload for creating resource-preferences.
test/fixtures/input/notifications/notification-type/read_created_notification_type.jsonAdds fixture payload for reading notification-types.
test/fixtures/input/notifications/notification-type/create_notification_type.jsonAdds fixture payload for creating notification-types.
test/fixtures/input/notifications/integration/read_created_webhook_target.jsonAdds fixture payload for reading webhook integration targets.
test/fixtures/input/notifications/integration/read_created_user_email_target.jsonAdds fixture payload for reading user-email integration targets.
test/fixtures/input/notifications/integration/read_created_slack_target.jsonAdds fixture payload for reading slack integration targets.
test/fixtures/input/notifications/integration/read_created_role_email_target.jsonAdds fixture payload for reading role-email integration targets.
test/fixtures/input/notifications/integration/read_created_ms_teams_target.jsonAdds fixture payload for reading MsTeams integration targets.
test/fixtures/input/notifications/integration/read_created_in_app_target.jsonAdds fixture payload for reading in-app integration targets.
test/fixtures/input/notifications/integration/create_webhook_target.jsonAdds fixture payload for creating webhook integration targets.
test/fixtures/input/notifications/integration/create_user_email_target.jsonAdds fixture payload for creating user-email integration targets.
test/fixtures/input/notifications/integration/create_slack_target.jsonAdds fixture payload for creating slack integration targets.
test/fixtures/input/notifications/integration/create_role_email_target.jsonAdds fixture payload for creating role-email integration targets.
test/fixtures/input/notifications/integration/create_ms_teams_target.jsonAdds fixture payload for creating MsTeams integration targets.
test/fixtures/input/notifications/integration/create_in_app_target.jsonAdds fixture payload for creating in-app integration targets.
pkg/ccloudv2/notifications.goAdds Notifications v1 client + wrapper methods for CRUD/list operations.
pkg/ccloudv2/client.goRegisters NotificationsClient on the shared CCloud v2 client.
internal/notifications/command.goAdds the top-level notifications command and subcommand registration.
internal/notifications/command_user_notification.goAdds user-notification command group, output formatting, and autocomplete.
internal/notifications/command_user_notification_update.goAdds user-notification update command + --read support.
internal/notifications/command_user_notification_list.goAdds user-notification list command + filtering flags.
internal/notifications/command_user_notification_describe.goAdds user-notification describe command.
internal/notifications/command_subscription.goAdds subscription command group, output formatting, and autocomplete.
internal/notifications/command_subscription_update.goAdds subscription update command + flags.
internal/notifications/command_subscription_list.goAdds subscription list command.
internal/notifications/command_subscription_describe.goAdds subscription describe command.
internal/notifications/command_subscription_delete.goAdds subscription delete (multi-delete) using shared deletion helpers.
internal/notifications/command_subscription_create.goAdds subscription create command + flags.
internal/notifications/command_resource_subscription.goAdds resource-subscription command group + output formatting.
internal/notifications/command_resource_subscription_update.goAdds resource-subscription update command + flags.
internal/notifications/command_resource_subscription_describe.goAdds resource-subscription describe command.
internal/notifications/command_resource_subscription_delete.goAdds resource-subscription delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_subscription_create.goAdds resource-subscription create command + flags.
internal/notifications/command_resource_preference.goAdds resource-preference command group + output formatting.
internal/notifications/command_resource_preference_update.goAdds resource-preference update command + flags.
internal/notifications/command_resource_preference_describe.goAdds resource-preference describe command.
internal/notifications/command_resource_preference_delete.goAdds resource-preference delete (multi-delete) using deletion helpers.
internal/notifications/command_resource_preference_create.goAdds resource-preference create command + flags.
internal/notifications/command_notification_type.goAdds notification-type command group + output formatting + autocomplete.
internal/notifications/command_notification_type_list.goAdds notification-type list command + filter flag.
internal/notifications/command_notification_type_describe.goAdds notification-type describe command.
internal/notifications/command_integration.goAdds integration command group + output formatting + autocomplete.
internal/notifications/command_integration_update.goAdds integration update command + target-kind handling.
internal/notifications/command_integration_list.goAdds integration list command.
internal/notifications/command_integration_describe.goAdds integration describe command.
internal/notifications/command_integration_delete.goAdds integration delete (multi-delete) using deletion helpers.
internal/notifications/command_integration_create.goAdds integration create command + target-kind handling.
internal/command.goRegisters notifications under the root command.
go.sumAdds checksums for the notifications internal SDK module.
go.modAdds dependency on github.com/confluentinc/ccloud-sdk-go-v2-internal/notifications.
cmd/lint/main.goExtends spellcheck vocabulary for new notifications-related terms.
.cli-generation-checksumUpdates generator checksum to reflect regenerated sources.
Files not reviewed (25)
  • internal/notifications/command.go: Generated file
  • internal/notifications/command_integration.go: Generated file
  • internal/notifications/command_integration_create.go: Generated file
  • internal/notifications/command_integration_delete.go: Generated file
  • internal/notifications/command_integration_describe.go: Generated file
  • internal/notifications/command_integration_list.go: Generated file
  • internal/notifications/command_integration_update.go: Generated file
  • internal/notifications/command_notification_type.go: Generated file
  • internal/notifications/command_notification_type_describe.go: Generated file
  • internal/notifications/command_notification_type_list.go: Generated file
  • internal/notifications/command_resource_preference.go: Generated file
  • internal/notifications/command_resource_preference_create.go: Generated file
  • internal/notifications/command_resource_preference_delete.go: Generated file
  • internal/notifications/command_resource_preference_describe.go: Generated file
  • internal/notifications/command_resource_preference_update.go: Generated file
  • internal/notifications/command_resource_subscription.go: Generated file
  • internal/notifications/command_resource_subscription_create.go: Generated file
  • internal/notifications/command_resource_subscription_delete.go: Generated file
  • internal/notifications/command_resource_subscription_describe.go: Generated file
  • internal/notifications/command_resource_subscription_update.go: Generated file
  • internal/notifications/command_subscription.go: Generated file
  • internal/notifications/command_subscription_create.go: Generated file
  • internal/notifications/command_subscription_delete.go: Generated file
  • internal/notifications/command_subscription_describe.go: Generated file
  • internal/notifications/command_subscription_list.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadinternal/notifications/command_subscription_create.go Outdated
Comment threadinternal/notifications/command_subscription_update.go Outdated
Comment threadinternal/notifications/command_integration_create.go
Comment threadinternal/notifications/command_integration_update.go
Comment threadinternal/notifications/command_resource_subscription_create.go Outdated
Comment threadcmd/lint/main.go Outdated
Comment threadinternal/notifications/command_resource_subscription_update.go Outdated
Two files conflicted.
test/fixtures/output/help.golden: main renamed `unified-stream-manager` to
`usm`, which shortened cobra's longest command name and re-padded every line in
the Available Commands block. Took main's block and regenerated the golden with
`go test ./test -run TestCLI/TestHelp -update`, which re-added the
notifications line at the new padding.
.cli-generation-checksum: main carries the flink region suite's value, this
branch carries notifications'. Kept this branch's. The file records the
last-generated suite only and drives PR labeling, so neither value is a drift
signal.
go build ./... and go test ./test -run TestCLI/TestNotifications both pass on
the merge result.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Picks up cli-terraform-generator's allow-list remedy fix. Eight stringSlice
flags now carry the CLI's own comma-separated-list wording instead of the
spec's HTTP-shape prose, the notifications parent command's Short registers
"Cloud Notifications", and one capitalized common noun is fixed in the spec.
Removes "Integrations" from properNouns: it was registered by an earlier merge
to satisfy one flag's help text, and RequireCapitalizeProperNouns then mandated
that capitalization across the whole CLI, failing three descriptions in
`confluent provider-integration`. "recieve" goes with the spec typo it covered.
`make lint-cli` passes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@airlock-confluentinc
airlock-confluentincBotforce-pushed the onboard-notifications-integration branch from 8d059d9 to ccc3483CompareAugust 14, 2026 16:26
ccloud-sdk-go-v2/notifications v0.1.0 is published, so the six commands and
their test-server handlers import it instead of the -internal path. The Alpine
docker build runs go build in a container with no GitHub credentials and the
repo carries no vendor/, so a private module cannot resolve there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

A list command's -o json output is a JSON array, not an object, so
Unmarshal into a map failed and fell through to the table-fallback
path, which grabbed the ASCII separator row as a fake id. Try an
array first and pull the id from its first element; fall back to a
plain object for describe-style output. Drop the table-parsing path
entirely — every CaptureID call site pairs with -o json now.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…r fixes
The last merge predated several generator-side fixes: the zeroCheck
replacement for optional StringSlice query params (a []string flag
never reads as a literal nil, so severity/resource-type/resource-crn/
sort filters were always sent even when unset), the switch from a
literal {id} placeholder to the spec's own example values in create/
update test args, and the List-before-Describe reordering plus -o
json request on every live-test List step used for ID capture.
Regenerated command/wrapper/test-server/fixture/golden files for
Integration, Subscription, ResourcePreference, ResourceSubscription,
NotificationType, and UserNotification.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nds to pick up objectref_write_placeholders
An array-valued ObjectReference field (integrations) built each element
as {Id: id} only, leaving the SDK's required related/resource_name
fields as empty strings on the wire. The real API rejects that with a
400. cli.objectref_write_placeholders already covered the scalar
notification_type case; this regeneration picks up the generator-side
fix that ported the same placeholder injection into the array-building
loops of create and update.
Regenerated Subscription and ResourceSubscription via cli-tfgen
--official-sdk to avoid a local SDK replace directive in go.mod.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqube-confluent

Copy link
Copy Markdown

Sign up for freeto 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

@alexfayad