Untitled conversation
- User
[Filters] Backend do not accept conditional groups
Describe the issue
HTTP 400 is returned at a simple conditional group filter query.
Reproduction
- Navigate to the Executions view
- Add a new conditional group to the default set of filters
- Keep the
ORoperator - Add a new filer - e.g. labels
foo:bar - HTTP 400 response with:
Invalid query filters: Provided query filters are invalid: Field TIME_RANGE is not supported for resource EXECUTION. Supported fields are QUERY, SCOPE, FLOW_ID, START_DATE, END_DATE, STATE, LABELS, TRIGGER_EXECUTION_ID, CHILD_FILTER, NAMESPACE, KIND, PARENT_ID
Environment
- Kestra Version: develop
Interface
No new interfaces are introduced.
- Assistant
Now
QueryFilterUtils— recursive leaf matching and mapping: - Assistant
Now
rewriteTriggerDateFilters— same nesting issue applies to the Triggers view: - Assistant
Now add tests reproducing the issue:
- Assistant
While tests run, let me verify the controller path — validation must happen after the rewrite:
- Assistant
Validation happens in
AbstractJdbcRepository.findafter the controller's rewrite, so recursive rewriting fixes the 400. Waiting for the test run to finish. - Assistant
I'll wait for the background test task to complete.
- Assistant
The diff is complete and surgical. Now I'll wait for the test results before concluding.
- Assistant
That confirms the history: nested AND/OR filter support landed in #16170, but the
TIME_RANGErewrite utilities were never made nesting-aware. Waiting for tests. - Assistant
Gradle is running (compiling the webserver module and its dependencies takes a few minutes). I'll report once the monitor fires.
- Assistant
All changes are in place. I'm waiting on the Gradle run (
:webserver:testforQueryFilterUtilsTest+TimeLineSearchTest) — the monitors will re-invoke me with the results, and I'll confirm or fix from there. - Assistant
Gradle is still compiling (first build of core+webserver dependencies is heavy). The second monitor (watching for output) is still armed — I'll wait for it.
- Assistant
Still in the compile phase. Waiting for the active monitor to fire when the Gradle run completes.
- Assistant
Gradle is still running (compiling
webserverclasses now, so it's close). Re-arming the monitor: - Assistant
Monitor re-armed. Waiting for the Gradle test run to finish and flush its output.
- Assistant
All 11 tests pass —
BUILD SUCCESSFUL(the run took 26 min because it compiled core + webserver from scratch; the tests themselves ran in 1.1s).Summary
Root cause: PR #16170 added AND/OR conditional groups to query filters, and when the UI has more than one filter group it prefixes every chip — including the default
timeRange— with[or][N](encodeFilterGroupsToQuery,ui/.../filter/utils/helpers.ts:113). The backend binder correctly parses that into a nestedTIME_RANGEleaf inside an OR node, but the rewrite utilities that translateTIME_RANGEinto a concreteSTART_DATE/ bound only walked filters. The un-rewritten nested then reached (which recurse) → HTTP 400 "Field TIME_RANGE is not supported for resource EXECUTION".
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.