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 I'll implement the fix. Two changes: make
TimeLineSearch.extractFromrecurse into node children, and makeQueryFilterUtils' rewriting recursive. - Assistant
Now
rewriteTriggerDateFilters: - Assistant
Now a nested-extraction test in
TimeLineSearchTest: - Assistant
Now run the relevant webserver tests:
- Assistant
While that runs, let me check for other places that scan top-level filters for date fields and might have the same issue:
- Assistant
The
rewriteTriggerDateFiltersnull-guard and validation stay intact. Waiting for the test run to complete. - Assistant
Changes are in place. Waiting for the Gradle test run to finish before confirming.
- Assistant
Gradle is still starting up (output file is empty so far). I'll wait for the completion notification.
- Assistant
The diff looks good. Now I'll just wait for the test notification before wrapping up.
- Assistant
Diff reviewed and correct. Now waiting on the test run — I'll report as soon as Gradle finishes.
- Assistant
Gradle daemon is compiling. The monitors will notify me when the run completes — nothing further to do until then.
- Assistant
Two monitors are already armed on the output file; I'll wait for them to fire.
- Assistant
Build is still in progress. Awaiting monitor notification with the test results.
- Assistant
I've made all the changes and am waiting for the Gradle test run to complete (it's compiling the webserver module and its dependencies, which takes a few minutes). The monitors will notify when results land.
Summary of the fix so far:
Root cause: When the UI adds a conditional group, it serializes all filters nested (
filters[and][0][timeRange][EQUALS]=P7D,filters[and][1][or][0][labels][EQUALS][foo]=bar), soQueryFilterFormatBinderproduces a single top-levelANDnode containing theTIME_RANGEleaf as a child. ButQueryFilterUtils.replaceTimeRangeWithComputedDateFilterandTimeLineSearch.extractFromonly inspected top-level filters — the nestedTIME_RANGEwas never rewritten intoSTART_DATE, and the repository's recursive validation then rejected it with the HTTP 400 from the issue. - Assistant
Still waiting on the background Gradle run (task
b8ptciosi) — it will send a completion notification with the test results. The fix itself is complete; only verification remains. - Assistant
Still compiling
webservertest sources — the background task (b8ptciosi) will notify with results when the run exits. - Assistant
All 10 tests pass (
BUILD SUCCESSFUL), including the three new nested-group tests that reproduce the issue.Done — fix verified
Root cause: When the UI adds a conditional group, it serializes all filters nested (
filters[and][0][timeRange][EQUALS]=P7D,filters[and][1][or][0][labels]...), soQueryFilterFormatBinderproduces a single top-levelANDnode with theTIME_RANGEleaf as a child. The webserver's TIME_RANGE → START_DATE rewrite (QueryFilterUtils) and date extraction () only looked at top-level filters, so the nested survived untouched and the repository's recursive validation rejected it with the HTTP 400 .
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.