Skip to content

[CF-4208] Add --name/--status filtering to on-prem application list - #3428

Draft
Paras Negi (paras-negi-flink) wants to merge 1 commit into
cli-cf-4208-flink-list-limit-filterfrom
cli-cf-4208-application-filtering
Draft

[CF-4208] Add --name/--status filtering to on-prem application list#3428
Paras Negi (paras-negi-flink) wants to merge 1 commit into
cli-cf-4208-flink-list-limit-filterfrom
cli-cf-4208-application-filtering

Conversation

@paras-negi-flink

@paras-negi-flink Paras Negi (paras-negi-flink) commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Release Notes

New Features

  • Added --name and --status filters to the on-prem (Confluent Platform / CMF) confluent flink application list command, to filter large environments server-side instead of "list everything then grep".

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 attached manual CLI verification results 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

Stacked on #3424 (--page-size). Base branch is cli-cf-4208-flink-list-limit-filter, so this diff shows only the filtering change. Review/merge #3424 first.

What

Confluent Platform (CMF on-prem) only — filtering half of CF-4208; Confluent Cloud flink commands are untouched.

flink application list had no filtering, so at scale the only pattern was "list everything then grep" (CF-4202). This adds server-side filtering:

  • --name — by application name; supports a trailing * wildcard (e.g. --name my-app*).
  • --status — by Flink job state (RUNNING, FINISHED, FAILED, CANCELED, RECONCILING, COMPLETED, UNKNOWN).

Both compose into CMF's single generic filter query as name=<value>,state=<value>; ListApplications gains a filter argument applied before pagination. An unknown --status prints a [WARN] to stderr but still queries, since CMF treats an unknown state as a no-match (matching statement list --status).

Blast Radius

  • Scoped to application list; with neither flag set, behavior is unchanged (no filter param). No CmfClientInterface/mock change. Non-breaking, easy to revert.

References

Test & Review

  • Unit TestBuildApplicationFilter: name / wildcard / status / combined composition (name=a*,state=RUNNING).
  • Integration: --name exact + wildcard, --status match / no-match / invalid (asserts [WARN] + empty), combined --name+--status; help golden regenerated. make lint clean.
# combined --name + --status (AND semantics)
$ confluent flink application list --environment default --name default-application-1* --status reconciling
          Name          | Environment |     Job Name      | Job Status
------------------------+-------------+-------------------+--------------
  default-application-1 | default     | State machine job | RECONCILING

# unrecognized --status -> visible warning, still queries
$ confluent flink application list --environment default --status bogus -o json
[WARN] Invalid status "BOGUS". Valid statuses are "RUNNING", "FINISHED", "FAILED", "CANCELED", "RECONCILING", "COMPLETED", and "UNKNOWN".
[]

🤖 Generated with Claude Code

Stacked on the --page-size PR. Add server-side filtering to
`flink application list` via --name (supports a "*" suffix wildcard) and
--status, composed into the CMF applications "filter" query
(name=<value>,state=<value>). ListApplications gains a filter parameter
that is applied via the SDK's .Filter(...) before pagination.

An unrecognized --status prints a [WARN] to stderr but still queries, since
the CMF server treats an unknown state as a no-match rather than an error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@confluent-cla-assistant

Copy link
Copy Markdown

❌ Error getting contributor login(s).
Please ensure the email address associated with this commit is added to your Github account.

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.

1 participant