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

Copy link
Copy Markdown
Contributor

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

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

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

Both are composed into the CMF applications filter query (name=<value>,state=<value>), since the endpoint exposes only a single generic filter parameter (no dedicated name/state params). ListApplications gains a filter argument applied via the SDK's .Filter(...) before pagination.

An unrecognized --status prints a [WARN] to stderr but still queries, because the CMF server treats an unknown state as a no-match rather than an error (matching the lenient behavior of statement list --status).

Scope

  • Tightly scoped to application list — no changes to the statement-list commands or the mocked CmfClientInterface (ListApplications isn't part of it, so no mock regeneration).
  • --limit is intentionally not included (dropped in the base PR as low-value).

Testing

  • Unit test for buildApplicationFilter (name, wildcard, status, combined composition).
  • The applications test-server mock now applies the filter param (before paging), so filtering is exercised end-to-end.
  • Integration cases: --name exact + wildcard, --status match / no-match / invalid (asserts the [WARN] + empty result), and combined --name+--status. Help golden regenerated.
  • make lint passes; full flink suite passes except the pre-existing TestFlinkShell/TestFlinkShellOnPrem TUI tests (fail identically on a clean main).

🤖 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