Skip to content
TheChatArchiveThe Chat Archive
GLMz-ai/glm-5.2· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

ISSUE DESCRIPTION The TriggerSchedulerMonitor reports realtime triggers as locked…

  1. User

    ISSUE DESCRIPTION

    The TriggerSchedulerMonitor reports realtime triggers as locked

    Describe the issue

    The TriggerSchedulerMonitor reports realtime triggers as locked.

    [tenant: main] [namespace: company.team] [flow: realtime-kafka] [trigger: kafka] No execution found, schedule is blocked since '2026-04-27T13:38:23.415498Z'

    But as those trigger will always be blocked without any executionID they will be reported indefinitly.

    Environment

    • Kestra Version: develop

    Interface

    No new interfaces are introduced.

    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. GLM Assistant

    I'll start by exploring the repository structure and finding the relevant files related to the issue.

  3. GLM Assistant

    I'll search for the relevant files one at a time.

  4. GLM Assistant

    Now let me look at the TriggerType enum to understand the different trigger types:

  5. GLM Assistant

    Now I understand the issue. The TriggerSchedulerMonitor checks all locked triggers and reports them as blocked if no execution is found. But realtime triggers will always be locked without an execution ID, so they get reported indefinitely. Let me look at how findTriggersEligibleForScheduling works:

  6. GLM Assistant

    Now I have a clear understanding of the issue. The TriggerSchedulerMonitor retrieves all locked triggers and reports them as blocked if no execution is found. For realtime triggers (like Kafka), they're always locked (continuously listening for events) and don't have executions tied to the lock state, so they get reported indefinitely as blocked.

    The fix is to filter out realtime triggers from this monitoring. Let me look at the TriggerState class to confirm the type field is accessible:

  7. GLM Assistant

    The type field is accessible via the getType() getter (Lombok @Getter). Now let me look at the existing tests for TriggerSchedulerMonitor:

  8. GLM Assistant

    Let me look at the scheduler test directory and understand the test patterns:

  9. GLM Assistant

    Now let me look at the findAllByTrigger method to understand how executions are queried for realtime triggers:

  10. GLM Assistant

    Now I have a clear understanding of the issue. The TriggerSchedulerMonitor monitors all locked triggers. For realtime triggers (like Kafka), they are always locked because they continuously listen for events, but there's no execution tied to that lock state. The monitor keeps checking for an execution and finding none, reports them as blocked indefinitely.

    The fix is to filter out realtime triggers from this monitoring. Let me implement this:

  11. GLM Assistant

    Now I'll implement the fix. I need to:

    1. Import TriggerType
    2. Filter out realtime triggers since they are always locked and don't have executions tied to the lock state
  12. GLM Assistant

    Now let me add the filter to skip realtime triggers. I'll modify the forEach lambda to skip realtime triggers:

  13. GLM Assistant

    The changes look good. Now let me verify the file compiles correctly by building the scheduler module:

  14. GLM Assistant

    The code compiles successfully. Now let me run the existing scheduler tests to make sure I didn't break anything:

  15. GLM Assistant

    All 75 tests pass. Let me also review the final state of the modified file to confirm the changes are correct:

  16. GLM Assistant

    The changes are clean and focused. Let me also check if there are any edge cases I should consider. Let me verify that the getType() method can return null (since TriggerType.from() can return null for unsupported triggers):

  17. GLM Assistant

    The getType() method can return null for unsupported triggers, but the comparison state.getType() == TriggerType.REALTIME handles this correctly — if getType() is null, the comparison returns false, so the trigger still goes through normal monitoring (which is the correct behavior; we only skip realtime triggers).

    Let me view the final file one more time to confirm everything is in order:

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