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
I’ll trace the execution filter DTO/validation path and its tests first. Success means conditional groups accept the default time-range filter without weakening unsupported-field validation elsewhere, with a focused regression test and the relevant Gradle tests passing. My working assumption is that
TIME_RANGEis a UI/default-filter alias expanded later, but nested-group validation is checking it too early. - Assistant
rgisn’t installed in this checkout, so I’m using targeted recursive searches instead. I’m also checking the worktree state before editing so unrelated local changes remain untouched. - Assistant
The failure is confirmed: conditional groups are validated recursively by the JDBC layer, but the webserver’s
TIME_RANGErewrite only examines and rewrites top-level leaves. A nestedTIME_RANGEtherefore reaches validation unchanged. I’m choosing a recursive, structure-preserving rewrite in the existing utility; addingTIME_RANGEto repository-supported fields would leak a UI convenience field into SQL generation and is broader/less safe. - Assistant
The focused test run is still compiling quietly. The regression test checks both halves of the contract: the OR group remains intact, and the rewritten result passes the same execution-resource validation that previously produced HTTP 400.
- Assistant
Gradle configuration is blocked trying to resolve a build plugin remotely, so I’m stopping that attempt and rerunning in offline mode against the local dependency cache. This keeps verification local as requested.
- Assistant
Offline verification exposed a local-cache gap:
mockito-core:5.23.0is not cached, so Gradle cannot even create the webserver test task. I’ll still run the production and test compilation paths that are locally available, then use the existing cached artifacts if possible; I won’t alter dependency versions just to make the environment pass. - Assistant
Production compilation now passes offline. Because the exact Mockito agent is unavailable locally, I also executed the regression scenario directly against the compiled classes: a nested
OR(timeRange, labels)is rewritten toOR(startDate, labels)and passes execution filter validation. I’m doing the final surgical-diff review now.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.