ISSUE DESCRIPTION The TriggerSchedulerMonitor reports realtime triggers as locked…
- User
ISSUE DESCRIPTION
The
TriggerSchedulerMonitorreports realtime triggers as lockedDescribe the issue
The
TriggerSchedulerMonitorreports 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 usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto 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-$
Assistant
No existing test. Let's update the code to filter out REALTIME triggers early.
Assistant
Now let's filter out REALTIME triggers before processing, since they are intentionally always locked without a bound execution.
Assistant
Now let's compile to verify correctness.
Assistant
Compiles fine, just warnings. Now let's double check git diff and run any relevant scheduler tests.
Assistant
No test references. Let's run full scheduler test suite build task (compileTestJava) to ensure nothing broke, and also check checklist items.
Assistant
Compiles fine with only warnings, no errors. Let's also run scheduler tests related to trigger scheduling to be safe (a subset, since full run might be slow).
Assistant
Test ran without failures reported (quiet mode, no errors surfaced). Let's confirm test result summary.
Assistant
All 4 tests pass, failures=0. The fix compiles and doesn't break existing tests.
Assistant
I need to attach the appender to the specific trigger logger. Let's fix the test to use the ROOT logger instead, which will capture all child loggers.
Assistant
Now let's first verify the test reproduces the issue by temporarily reverting the fix, running test (should fail), then reapplying fix and confirming pass.
Assistant
Good, has NoArgsConstructor. Let's use real MetricRegistry with SimpleMeterRegistry.
Assistant
I accidentally left a stray ">>> REPLACE" line. Let me remove it.
Assistant
Reproduced the exact bug from the issue. Now let's restore the fix and re-run.
Assistant
The fix resolves the issue — the test passes with the fix and fails without it. Now let's remove the temporary test file as instructed.
Assistant
All green. Let's do a final review of the diff.
Assistant
This is the final, clean diff. Now let's go through the checklist explicitly.
Assistant
All items in the checklist have been addressed:
- Reproduced the error: I wrote a temporary JUnit test that instantiated
TriggerSchedulerMonitorwith an in-memoryTriggerStateStorecontaining aREALTIMEtype trigger state that was locked and had no matching execution. Running the original (unmodified) code produced exactly the reported log line:No execution found, schedule is blocked since '...'. - Confirmed the fix resolves it: After applying the fix (filtering out
TriggerType.REALTIMEstates before the monitor's execution-lookup loop), the same test no longer emitted the warning. The temporary test was then removed as instructed by the guidelines (no new/modified tests should remain in the repo). - Edge cases considered:
- Legacy/older
TriggerStaterecords that might have a type are left untouched (they fail the filter check and are still monitored as before), preserving backward compatibility.
- Legacy/older
- Reproduced the error: I wrote a temporary JUnit test that instantiated
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.