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
I’ll locate the monitor implementation and related trigger/scheduling tests, then reproduce the classification path before making the smallest targeted change. Afterward I’ll run the relevant test suite and inspect the final diff.
- Assistant
rgis unavailable in this environment, so I’ll use recursivegrepto find the same implementation and tests. - Assistant
I found the monitor in the scheduler module. I’ll inspect it alongside the trigger model and scheduler code to identify a reliable realtime-trigger distinction rather than keying off incidental execution state.
- Assistant
The monitor currently treats every locked
TriggerStateidentically. Since realtime triggers are intentionally locked while their worker runs and have no execution ID, I’ll inspectTriggerState,TriggerType, and the lock creation/update paths to determine whether the persisted state already records trigger type. - Assistant
TriggerStatealready carriesTriggerType.REALTIME, including updates from the current flow definition. The appropriate fix is to exclude only that type before any repository lookup, missing-execution metric, or warning; null/legacy and other types should retain existing monitoring. I’ll verify module conventions and then patch this filtering point. - Assistant
The codebase convention uses
TriggerType.REALTIME.equals(...), which is null-safe for legacy states. I’ll apply that convention while materializing the filtered list, so the “no locked triggers” fast path also applies when all locks are intentional realtime locks. - Assistant
Python is not installed, so no change was made. I’ll use the provided editor commands to make the same two-line-area patch and then validate whitespace/diff.
- Assistant
The first editor operation shifted line numbers, causing the second line-range edit to replace the method signature rather than the lookup; the displayed diff catches this before compilation. I’ll repair the imports and reconstruct the method opening through the filtered lookup exactly, leaving the monitor body unchanged.
- Assistant
The repaired diff is now exactly the intended import plus null-safe realtime filtering, and
git diff --checkpasses. I’ll compile the scheduler module first; this validates Java level, imports, and stream usage before running its tests. - Assistant
Compilation succeeds; only pre-existing warnings are reported. The behavior is now directly resolved because realtime states never reach
findAllByTrigger, metrics, or warning logging, while schedule/polling/null types still do. I’ll run the complete scheduler module tests to check nearby trigger behavior. - Assistant
All 75 scheduler tests pass, including realtime scheduling and trigger lifecycle cases. I’ll now run the repository’s formatting/style check if available and review status to ensure only the intended source file changed (build outputs should remain ignored).
- Assistant
The working tree contains only the intended monitor modification, and Spotless tasks are available. I’ll run the Java-specific formatting check, then perform a final diff inspection and submit if clean.
- Assistant
The global Spotless check fails on many pre-existing formatting violations across the repository, including unrelated scheduler files; importantly,
TriggerSchedulerMonitor.javais not listed among violations. I’ll verify the final diff/status once more and confirm no formatter side effects occurred before submission.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →