Skip to content

Cf 3137 : List and describe Flink Application instances#3307

Draft
Paras Negi (paras-negi-flink) wants to merge 3 commits intomainfrom
CF-3137
Draft

Cf 3137 : List and describe Flink Application instances#3307
Paras Negi (paras-negi-flink) wants to merge 3 commits intomainfrom
CF-3137

Conversation

@paras-negi-flink
Copy link
Copy Markdown

@paras-negi-flink Paras Negi (paras-negi-flink) commented Apr 6, 2026

Release Notes

Breaking Changes

  • PLACEHOLDER

New Features

  • PLACEHOLDER

Bug Fixes

  • PLACEHOLDER

Checklist

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

What

Blast Radius

References

Test & Review

Copilot AI review requested due to automatic review settings April 6, 2026 05:39
@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 Confluent Platform (CMF/on-prem) CLI support for working with Flink Application Instances, and extends the CMF catalog surface with an update operation, including corresponding test-server routes and golden-based integration coverage.

Changes:

  • Add confluent flink application instance [list|describe] commands backed by new CMF REST client methods.
  • Add confluent flink catalog update <resourceFilePath> command (JSON/YAML) and CMF REST client support for updating catalogs.
  • Extend on-prem test server handlers/routes and add integration tests + golden fixtures for the new commands.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/flink/cmf_rest_client.go Adds CMF client methods for catalog update + application instance list/describe.
internal/flink/command_application.go Wires new application instance subcommand into the Flink application command tree.
internal/flink/command_application_instance*.go Implements instance list/describe commands and SDK→local conversion for serialized output.
internal/flink/local_types.go Adds local (serialized) types for Flink application instances.
internal/flink/command_catalog.go Adds shared helpers for catalog output and resource file parsing; registers catalog update subcommand.
internal/flink/command_catalog_update.go Implements flink catalog update using a resource file and follow-up describe.
test/test-server/flink_onprem_router.go Adds CMF routes for application instance list/describe.
test/test-server/flink_onprem_handler.go Implements handlers for instance list/describe and adds catalog PUT support in the test server.
test/flink_onprem_test.go Adds integration test cases for instance list/describe and catalog update.
test/fixtures/input/flink/catalog/update-*.{json,yaml} Adds catalog update request payloads for tests.
test/fixtures/output/flink/application/** Adds help + output fixtures for the new instance commands.
test/fixtures/output/flink/catalog/** Adds help + output fixtures for the new catalog update command.

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

Comment on lines +448 to +459
func (s *CLITestSuite) TestFlinkCatalogUpdateOnPrem() {
tests := []CLITest{
// success
{args: "flink catalog update test/fixtures/input/flink/catalog/update-successful.json", fixture: "flink/catalog/update-success.golden"},
{args: "flink catalog update test/fixtures/input/flink/catalog/update-successful.json --output json", fixture: "flink/catalog/update-success-json.golden"},
{args: "flink catalog update test/fixtures/input/flink/catalog/update-successful.json --output yaml", fixture: "flink/catalog/update-success-yaml.golden"},
// failure
{args: "flink catalog update test/fixtures/input/flink/catalog/update-invalid-failure.json", fixture: "flink/catalog/update-invalid-failure.golden", exitCode: 1},
}

runIntegrationTestsWithMultipleAuth(s, tests)
}
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

TestFlinkCatalogUpdateOnPrem duplicates the JSON update cases that are already covered in TestFlinkCatalogUpdateWithYAML (which currently tests both JSON and YAML resource files). This makes the suite do redundant work and increases fixture coupling. Consider keeping a single catalog-update test and either (a) move all JSON cases into the OnPrem test and make the WithYAML test YAML-only, or (b) drop the OnPrem test and keep the combined JSON+YAML coverage in one place.

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +18
func (c *command) newCatalogUpdateCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "update <resourceFilePath>",
Short: "Update a Flink catalog.",
Long: "Update an existing Kafka Catalog in Confluent Platform from a resource file.",
Args: cobra.ExactArgs(1),
RunE: c.catalogUpdate,
}
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

This PR introduces the flink catalog update command in addition to Flink application instance list/describe. The PR title/description currently only references application instances and has placeholder release notes, so it’s unclear whether the catalog update command is in-scope and should be documented/released together. Please update the PR description/release notes (or split into a separate PR) so reviewers and release tooling can track the catalog update feature correctly.

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