Skip to content

Add cli command for ApplicationEvent list#3315

Draft
Paras Negi (paras-negi-flink) wants to merge 2 commits intomainfrom
CF-3138
Draft

Add cli command for ApplicationEvent list#3315
Paras Negi (paras-negi-flink) wants to merge 2 commits intomainfrom
CF-3138

Conversation

@paras-negi-flink
Copy link
Copy Markdown

Release Notes

Breaking Changes

  • PLACEHOLDER

New Features

  • PLACEHOLDER

Bug Fixes

  • PLACEHOLDER

Checklist

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

What

Blast Radius

References

Test & Review

Copilot AI review requested due to automatic review settings April 11, 2026 02:45
@confluent-cla-assistant
Copy link
Copy Markdown

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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 list and wire it into the existing flink application command 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.

Comment on lines +1 to +18
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).
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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).

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants