Cf 3137 : List and describe Flink Application instances#3307
Cf 3137 : List and describe Flink Application instances#3307Paras Negi (paras-negi-flink) wants to merge 3 commits intomainfrom
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
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.
test/flink_onprem_test.go
Outdated
| 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) | ||
| } |
There was a problem hiding this comment.
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.
| 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, | ||
| } |
There was a problem hiding this comment.
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.
5017357 to
35f9681
Compare
|




Release Notes
Breaking Changes
New Features
Bug Fixes
Checklist
Whatsection below whether this PR applies to Confluent Cloud, Confluent Platform, or both.Test & Reviewsection below.Blast Radiussection below.What
Blast Radius
References
Test & Review