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
Investigating how conditional group filters are sent to the backend and why
TIME_RANGEis rejected for executions. - Assistant
Implementing recursive handling in
TimeLineSearchandQueryFilterUtilssoTIME_RANGEinside conditional groups is resolved before validation. - Assistant
Adding tests and running them.
- Assistant
Adding an integration-style test that mirrors the exact URL format from the bug report:
- Assistant
Root cause
When a conditional group is added in the Executions view, the default
timeRangefilter moves from a flat URL key:codefilters[timeRange][EQUALS]=PT24Hto a nested one inside the OR group:
codefilters[or][0][timeRange][EQUALS]=PT24H filters[or][1][labels][EQUALS][foo]=barThe backend parsed this tree correctly, but
QueryFilterUtils.replaceTimeRangeWithComputedDateFilter()and only handled filters. stayed nested inside the OR branch, and validation failed because is not a supported field for the resource (it must be resolved to / first).
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.