Skip to content
TheChatArchiveThe Chat Archive
DeepSeekdeepseek/deepseek-v4-pro· deepseekHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

ISSUE DESCRIPTION [Filters] Backend do not accept conditional groups Describe the issue…

  1. User

    ISSUE DESCRIPTION

    [Filters] Backend do not accept conditional groups

    Describe the issue

    HTTP 400 is returned at a simple conditional group filter query.

    Reproduction

    1. Navigate to the Executions view
    2. Add a new conditional group to the default set of filters
    3. Keep the OR operator
    4. Add a new filer - e.g. labels foo:bar
    5. 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

    ADDITIONAL ADVICE

    Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use git checkout <file> to restore the file to its original state. You can also reset all changes in the repository using git reset --hard command. Additionally, you can use git stash and git stash pop to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call submit) using git status or git diff commands. However you don't need to use git add or git commit before submitting your changes. In fact, submit only submits currently unstaged changes because it uses git diff to get the changes that need to be submitted.

    CHECKLIST

    Before submitting your solution, please go over the following checklist and make sure you've done everything:

    • If an error was reported in the issue description, I have successfully reproduced it.
    • If an error was reported in the issue description, I have confirmed that my fix resolves the error.
    • I have thought about edge cases and made sure my fix handles them as well.
    • I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.

    Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!

    (Current directory: /kestra, current file: none) bash-$

  2. DeepSeek Assistant

    Let me start by understanding the repository structure and the issue. The issue is about filters - specifically, the backend doesn't accept conditional groups. When a conditional group filter query is made, it returns HTTP 400 with an error about TIME_RANGE not being supported for EXECUTION resource.

    Let me first explore the repository structure and find relevant code related to filters.

  3. DeepSeek Assistant

    Let me look at the key files related to this issue. The error message mentions "Invalid query filters" and "TIME_RANGE is not supported for resource EXECUTION". Let me look at the QueryFilter.java model and the QueryFilterUtils.java to understand how filters are validated.

  4. DeepSeek Assistant

    The issue is about conditional groups in filters. Let me look at how filters are parsed and validated from the web

  5. DeepSeek Assistant

    Now let me find where the filter validation occurs in the web layer and how the filters are parsed.

  6. DeepSeek Assistant

    Let me look at the test and the ErrorController to understand the flow better

  7. DeepSeek Assistant

    Let me look at how AbstractJdbcRepository handles filters with TIME_RANGE

  8. DeepSeek Assistant

    Let me continue reading AbstractJdbcRepository to understand the full flow.

  9. DeepSeek Assistant

    Now let me look at the TimeLineSearch class to understand how it extracts time range from filters:

  10. DeepSeek Assistant

    Let me find where the filters are received and processed in the ExecutionController

  11. DeepSeek Assistant

    Let me look at the ExecutionController to see how filters are received from the web request.

  12. DeepSeek Assistant

    Let me look at how filters are received and processed in the controller.

  13. DeepSeek Assistant

    Now let me look at the QueryFilterFormat converter to understand how filters are deserialized.

  14. DeepSeek Assistant

    Let me find the binder for QueryFilterFormat.

  15. DeepSeek Assistant

    Let me look at the binder.

  16. DeepSeek Assistant

    Let me look at the test for QueryFilterFormatBinder to understand how filters are parsed.

  17. DeepSeek Assistant

    Let me check the DateUtils.validateTimeline method:

  18. DeepSeek Assistant

    Let me look at the DateUtils validateTimeline method.

  19. DeepSeek Assistant

    Let me look at the AbstractJdbcExecutionRepository to see how filters are processed.

  20. DeepSeek Assistant

    Let me look at the find method in AbstractJdbcExecutionRepository to see how it handles filters.

  21. DeepSeek Assistant

    Let me look at the computeFindCondition method to understand the full flow.

  22. DeepSeek Assistant

    Let me read more of the buildDateFilter

  23. DeepSeek Assistant

    Let me write a reproduction script to understand the issue better. First, let me check the test file for QueryFilter to understand what tests exist

  24. DeepSeek Assistant

    Let me look at the test around line 748 where it tests node validation with EXECUTION

  25. DeepSeek Assistant

    Let me create a reproduction script to understand the issue.

  26. DeepSeek Assistant

    Let me check the build system and try to run the

  27. DeepSeek Assistant

    Let me run the existing unit tests related to this issue to see what's happening

  28. DeepSeek Assistant

    Let me run the QueryFilterUtils test and QueryFilterTest

  29. DeepSeek Assistant

    Let me look at the QueryFilterUtilsTest

  30. DeepSeek Assistant

    Let me write a quick inline test to reproduce the issue

  31. DeepSeek Assistant

    Let me place this test in the proper location and run it

  32. DeepSeek Assistant

    Let me search for all places where filters might bypass the replacement

  33. DeepSeek Assistant

    Let me look at the getExecutionIds method to see if it might be the source of the error

  34. DeepSeek Assistant

    Let me look at the getExecutionIds

  35. DeepSeek Assistant

    Let me check git log for recent changes to the filter-related files

  36. DeepSeek Assistant

    Let me look at the commit that added AND/OR support to understand the changes

  37. DeepSeek Assistant

    Let me look at the diff for QueryFilterUtils

  38. DeepSeek Assistant

    Let me check if QueryFilterUtils.java was changed in any recent commit

  39. DeepSeek Assistant

    Let me check the AbstractJdbcRepository changes in the AND/OR commit

  40. DeepSeek Assistant

    Let me look at the changes to AbstractJdbcExecutionRepository in that commit

  41. DeepSeek Assistant

    Let me look at the Searchable utility to understand the full picture

  42. DeepSeek Assistant

    Let me look at all the paths where validation might be triggered without replacement

  43. DeepSeek Assistant

    Let me look at lines around 326 in AbstractJdbcExecutionRepository

  44. DeepSeek Assistant

    Let me check all callers of find

  45. DeepSeek Assistant

    Let me look at recent changes to ExecutionController related to filters

  46. DeepSeek Assistant

    Let me look at the diff for ExecutionController from the AND/OR commit

  47. DeepSeek Assistant

    Let me look at the SearchableTest to understand the API format better

  48. DeepSeek Assistant

    Let me add a simple test to the existing test file to check the specific scenario. Let me first look at the full replaceTimeRangeWithComputedDateFilter flow by tracing it through

  49. DeepSeek Assistant

    Now I understand the issue. The replaceTimeRangeWithComputedDateFilter method and its helpers (updateFilters, updateFiltersForEndDate, TimeLineSearch.extractFrom) don't recurse into node children. When TIME_RANGE is inside a conditional group (node), it won't be replaced with START_DATE/END_DATE, and validation will fail because TIME_RANGE is not supported for EXECUTION.

    Let me verify this by looking at the code one more time and then implementing the fix.

  50. DeepSeek Assistant

    Now I have a clear picture of the issue. The replaceTimeRangeWithComputedDateFilter, updateFilters, updateFiltersForEndDate, and TimeLineSearch.extractFrom methods don't recurse into node children (conditional groups). When a TIME_RANGE filter is inside a conditional group, it's not replaced with START_DATE/END_DATE, causing validation to fail.

    Let me implement the fix. First, let me look at the full files I need to modify

  51. DeepSeek Assistant

    Now let me implement the fix. I'll start with QueryFilterUtils.java:

  52. DeepSeek Assistant

    Let me edit the QueryFilterUtils to make it handle nodes recursively

  53. DeepSeek Assistant

    Let me use the --file option

  54. DeepSeek Assistant

    Let me open the file first

  55. DeepSeek Assistant

    Let me use sed to make the changes instead

  56. DeepSeek Assistant

    Let me check what scripting tools are available

  57. DeepSeek Assistant

    Let me look at the exact lines I need to change

  58. DeepSeek Assistant

    Let me use sed to replace the updateFilters method with a recursive version

  59. DeepSeek Assistant

    Now let me update the updateFiltersForEndDate method similarly

  60. DeepSeek Assistant

    Let me find and update the updateFiltersForEndDate method

  61. DeepSeek Assistant

    Let me look at updateFiltersForEndDate

  62. DeepSeek Assistant

    Now let me update updateFiltersForEndDate to be recursive

  63. DeepSeek Assistant

    Now let me update TimeLineSearch.extractFrom to recurse into nodes

  64. DeepSeek Assistant

    Now let me update TimeLineSearch to recurse into nodes

  65. DeepSeek Assistant

    Let me check the current state of TimeLineSearch.java

  66. DeepSeek Assistant

    The file got corrupted. Let me restore it from git and use a clean approach

  67. DeepSeek Assistant

    Let me also restore and use a cleaner approach

  68. DeepSeek Assistant

    Let me write the full updated files using a clean approach. First, let me create the updated QueryFilterUtils.java

  69. DeepSeek Assistant

    Now update TimeLineSearch.java with recursion

  70. DeepSeek Assistant

    Now update DateUtils.validateTimeline to recurse into nodes

  71. DeepSeek Assistant

    Let me also check if rewriteTriggerDateFilters needs recursion. Let me also verify the files compile correctly.

  72. DeepSeek Assistant

    The compilation passes. Now let me run the existing tests to make sure they still pass.

  73. DeepSeek Assistant

    Let me see the compilation errors

  74. DeepSeek Assistant

    Let me remove the test file I created earlier

  75. DeepSeek Assistant

    Now let me run the tests again

  76. DeepSeek Assistant

    All tests pass. Let me also run the core tests and the execution repository tests to make sure nothing is broken.

  77. DeepSeek Assistant

    Let me run the JDBC tests related to execution filters

  78. DeepSeek Assistant

    Let me also fix rewriteTriggerDateFilters to handle nodes recursively. But first, let me check the current state of the QueryFilterUtils file.

  79. DeepSeek Assistant

    Let me fix rewriteTriggerDateFilters to handle nodes recursively

  80. DeepSeek Assistant

    Let me update rewriteTriggerDateFilters to handle nodes recursively

  81. DeepSeek Assistant

    Let me verify the changes compile correctly

  82. DeepSeek Assistant

    Let me see the compilation errors

  83. DeepSeek Assistant

    Let me check the file around line 229

  84. DeepSeek Assistant

    There are leftover lines from the sed replacement. Let me fix them

  85. DeepSeek Assistant

    Let me verify the end of the

  86. DeepSeek Assistant

    Let me compile

  87. DeepSeek Assistant

    Let me see the errors

  88. DeepSeek Assistant

    The closing brace is missing. Let me check and fix.

  89. DeepSeek Assistant

    Let me add the missing closing brace

  90. DeepSeek Assistant

    Let me compile

  91. DeepSeek Assistant

    Compilation successful. Now let me run all relevant tests

  92. DeepSeek Assistant

    All tests pass. Let me also verify the final state of all modified files

  93. DeepSeek Assistant

    Let me verify the final state of each file. First QueryFilterUtils:

  94. DeepSeek Assistant

    Let me verify the DateUtils and TimeLineSearch files

  95. DeepSeek Assistant

    Let me verify TimeLineSearch.java

  96. DeepSeek Assistant

    Let me run a broader set of related tests to make sure nothing is broken

  97. DeepSeek Assistant

    Let me run a more targeted test

  98. DeepSeek Assistant

    Let me run the webserver utility tests specifically

  99. DeepSeek Assistant

    Let me now verify the overall changes with git diff to ensure everything looks correct

  100. DeepSeek Assistant

    Let me check the ExecutionControllerTest to make sure the existing test expectations still hold

  101. DeepSeek Assistant

    The fix is complete. Let me verify once more that all tests pass and submit.

  102. DeepSeek Assistant

    All tests pass. Let me now submit the

  103. DeepSeek Assistant

    Let me now submit the changes.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.