[CF-4208] Add --name/--status filtering to on-prem application list - #3428
Draft
Paras Negi (paras-negi-flink) wants to merge 1 commit into
Draft
Conversation
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>
|
❌ Error getting contributor login(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
flink application listexposes 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
filterquery (name=<value>,state=<value>), since the endpoint exposes only a single generic filter parameter (no dedicated name/state params).ListApplicationsgains afilterargument applied via the SDK's.Filter(...)before pagination.An unrecognized
--statusprints 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 ofstatement list --status).Scope
application list— no changes to the statement-list commands or the mockedCmfClientInterface(ListApplicationsisn't part of it, so no mock regeneration).--limitis intentionally not included (dropped in the base PR as low-value).Testing
buildApplicationFilter(name, wildcard, status, combined composition).filterparam (before paging), so filtering is exercised end-to-end.--nameexact + wildcard,--statusmatch / no-match / invalid (asserts the[WARN]+ empty result), and combined--name+--status. Help golden regenerated.make lintpasses; full flink suite passes except the pre-existingTestFlinkShell/TestFlinkShellOnPremTUI tests (fail identically on a cleanmain).🤖 Generated with Claude Code