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 and validated on the backend — the error suggests
TIME_RANGEis being used whereEXECUTIONexpectsSTART_DATE/END_DATE. - Assistant
Implementing recursive handling for
TIME_RANGEin nested filter groups — it's currently only converted at the top level. - Assistant
Implementing recursive traversal in
TimeLineSearchandQueryFilterUtils. - Assistant
Adding tests for nested filter groups:
- Assistant
Recursive extraction was merging computed
startDatefrom nestedTIME_RANGEfilters, which triggered the mutual-exclusivity check. Refactoring to collect raw values first, then resolve at the top level. - Assistant
Tests passed. Running related filter validation tests:
- Assistant
The bug was in how the backend handled
TIME_RANGEinside conditional (OR/AND) filter groups.Root cause
When a user adds a conditional group on the Executions view, the default
timeRangefilter moves into a nested structure like:filters[or][0][timeRange][EQUALS]=PT168H filters[or][1][labels][EQUALS][foo]=barThe backend already converts top-level
TIME_RANGEfilters toSTART_DATEbefore validation, but that conversion only ran on flat filters. Inside nested groups, was left unchanged and failed validation because does not support that field.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.