CF-3138 : Add cli command for ApplicationEvent list#3315
CF-3138 : Add cli command for ApplicationEvent list#3315Paras Negi (paras-negi-flink) wants to merge 2 commits into
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Pull request overview
Adds a new on-prem (CMF) CLI subcommand to list Flink application events, including CMF client support, test-server routing/handler coverage, and golden/integration test fixtures.
Changes:
- Introduce
confluent flink application event listand wire it into the existingflink applicationcommand tree. - Add CMF REST client support for listing application events with pagination.
- Extend the on-prem test server + integration tests and add/update golden fixtures (help + output formats).
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
internal/flink/command_application.go |
Registers the new application event command under flink application. |
internal/flink/command_application_event.go |
Adds the event command group and SDK→local event conversion types for serialized output. |
internal/flink/command_application_event_list.go |
Implements event list command behavior, output formatting (human/json/yaml), and required flags. |
pkg/flink/cmf_rest_client.go |
Adds ListApplicationEvents() CMF client method with page iteration. |
test/test-server/flink_onprem_router.go |
Adds test-server route for the events endpoint. |
test/test-server/flink_onprem_handler.go |
Implements mock handler returning paged application events for integration tests. |
test/flink_onprem_test.go |
Adds integration test cases covering missing flags + human/json/yaml outputs + empty result. |
test/fixtures/output/flink/application/help-onprem.golden |
Updates flink application help output to include the new event subcommand. |
test/fixtures/output/flink/application/event/help-onprem.golden |
Adds help golden for flink application event. |
test/fixtures/output/flink/application/event/list-help-onprem.golden |
Adds help golden for flink application event list. |
test/fixtures/output/flink/application/event-list-*.golden |
Adds integration output fixtures for missing flags / empty / human / json / yaml. |
test/fixtures/output/flink/application/event-list-help-onprem.golden |
Adds a duplicate help fixture (not used by help test harness). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| List Flink application events. | ||
|
|
||
| Usage: | ||
| confluent flink application event list [flags] | ||
|
|
||
| Flags: | ||
| --environment string REQUIRED: Name of the Flink environment. | ||
| --application string REQUIRED: Name of the Flink application. | ||
| --url string Base URL of the Confluent Manager for Apache Flink (CMF). Environment variable "CONFLUENT_CMF_URL" may be set in place of this flag. | ||
| --client-key-path string Path to client private key for mTLS authentication. Environment variable "CONFLUENT_CMF_CLIENT_KEY_PATH" may be set in place of this flag. | ||
| --client-cert-path string Path to client cert to be verified by Confluent Manager for Apache Flink. Include for mTLS authentication. Environment variable "CONFLUENT_CMF_CLIENT_CERT_PATH" may be set in place of this flag. | ||
| --certificate-authority-path string Path to a PEM-encoded Certificate Authority to verify the Confluent Manager for Apache Flink connection. Environment variable "CONFLUENT_CMF_CERTIFICATE_AUTHORITY_PATH" may be set in place of this flag. | ||
| -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") | ||
|
|
||
| Global Flags: | ||
| -h, --help Show help for this command. | ||
| --unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets. | ||
| -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). |
There was a problem hiding this comment.
TestHelp fixtures for leaf commands are expected under test/fixtures/output/<cmd path>/ (e.g., .../event/list-help-onprem.golden). This file duplicates the correct fixture at test/fixtures/output/flink/application/event/list-help-onprem.golden and is not referenced by the help test harness, so it’s dead weight and can cause confusion. Consider deleting this duplicate fixture and keeping only the path-based one.
| List Flink application events. | |
| Usage: | |
| confluent flink application event list [flags] | |
| Flags: | |
| --environment string REQUIRED: Name of the Flink environment. | |
| --application string REQUIRED: Name of the Flink application. | |
| --url string Base URL of the Confluent Manager for Apache Flink (CMF). Environment variable "CONFLUENT_CMF_URL" may be set in place of this flag. | |
| --client-key-path string Path to client private key for mTLS authentication. Environment variable "CONFLUENT_CMF_CLIENT_KEY_PATH" may be set in place of this flag. | |
| --client-cert-path string Path to client cert to be verified by Confluent Manager for Apache Flink. Include for mTLS authentication. Environment variable "CONFLUENT_CMF_CLIENT_CERT_PATH" may be set in place of this flag. | |
| --certificate-authority-path string Path to a PEM-encoded Certificate Authority to verify the Confluent Manager for Apache Flink connection. Environment variable "CONFLUENT_CMF_CERTIFICATE_AUTHORITY_PATH" may be set in place of this flag. | |
| -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") | |
| Global Flags: | |
| -h, --help Show help for this command. | |
| --unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets. | |
| -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). |
|




Release Notes
Breaking Changes
New Features
confluent flink application event listcommand to list Flink application events in Confluent Platform.Bug Fixes
Checklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
This PR implements CF-3138 — CLI: List Flink Application events for the Confluent CLI, targeting Confluent Platform / CP Flink (CMF on-prem):
confluent flink application:confluent flink application event list --environment <env> --application <app>GET /cmf/api/v1alpha1/environments/{envName}/applications/{appName}/events(paginated)CmfRestClientwrapper (ListApplicationEvents) and corresponding local types/output formatting, following existing patterns used for catalogs, databases, and compute pools.Blast Radius
References
Test & Review
Environment
confluentinc/cliCF-31382.3-SNAPSHOTcmf-serviceexposed viakubectl port-forward svc/cmf-service 8080:80 -n e2e)Manual CLI validation