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 how execution filters and conditional groups are translated and validated. Assumption: the UI’s default
TIME_RANGEfilter is valid at the top level but leaks into a backend child-group validation path that only accepts resolvedSTART_DATE/END_DATE. Success means grouped execution queries accept the same valid fields as ordinary queries, reject genuinely unsupported fields, and a focused regression test plus the relevant module build pass. I’ll favor a narrow normalization/validation fix over widening unrelated resource capabilities. - Assistant
rgis not installed in this checkout, so I’m switching to repository-localfind/grep. The worktree is currently clean. - Assistant
The failure is confirmed in the shared rewrite path:
TIME_RANGEis converted only for root-level leaves. Once the binder places the default time range inside anORnode, it reaches repository validation unchanged and is rejected. AddingTIME_RANGEto the execution resource would only postpone failure to SQL generation, so I’m keeping it a pseudo-field and making the existing date rewrite traverse filter nodes while preserving their logical structure. - Assistant
The implementation now rewrites nested date pseudo-filters in place, including the analogous trigger-date path, and recursively detects date filters so it does not inject an unintended root-level default boundary. I added a regression test that models
OR(timeRange, labels)and verifies both tree preservation and execution-resource validation. Next I’m compiling and running the focused webserver tests. - Assistant
The focused Gradle invocation is still in project configuration with no test output yet; there is no failure so far. While it runs, I’m also checking the changed tree-mapping code for formatting and edge cases such as nested groups under
END_DATEmode. - Assistant
Gradle is actively resolving/transforming cached module artifacts (the process is healthy, but this monorepo’s first configuration is unusually slow). The code review found no widening of accepted fields: nested
TIME_RANGEis still eliminated before repository validation, and logicalAND/ORnodes remain unchanged. - Assistant
The delay was a Gradle plugin artifact lookup attempting a remote connection, so I stopped that invocation to honor the no-internet constraint. I’m rerunning in Gradle offline mode; if the local cache lacks that plugin, I’ll report the build-environment limitation separately from code/test failures.
- Assistant
Offline compilation of the affected webserver module passed. The JUnit task itself cannot be configured offline because
mockito-core:5.23.0is absent from the local Gradle cache, so I’m supplementing the compile check with a direct runtime regression smoke test against the compiled classes; this exercises the same nested rewrite and validation assertions without fetching dependencies.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.