The TriggerSchedulerMonitor reports realtime triggers as locked Describe the issue The…
- User
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.
- Assistant
Investigating how
TriggerSchedulerMonitortreats realtime triggers versus scheduled triggers. - Assistant
Implementing the fix: realtime triggers stay locked while listening, so the monitor shouldn't treat them as blocked schedules.
- Assistant
Fixed.
TriggerSchedulerMonitorwas treating all locked triggers the same, but realtime triggers are intentionally locked while listening for events — they won't have an execution until something actually fires.Root cause
In
TriggerScheduler.processWorkerTrigger, realtime triggers are always locked when dispatched to a worker:private void processWorkerTrigger(Clock clock, TriggerState triggerState, TriggerEvaluationContext triggerEvaluationContext, WorkerTriggerInterface trigger) { final boolean mustBeLocked = trigger instanceof RealtimeTriggerInterface || !((AbstractTrigger) trigger).isAllowConcurrent(); updateNextEvaluationDateAndGetOnSuccess(clock, triggerState, triggerEvaluationContext).ifPresent(state -> { try { this.triggerWorkerJobPublisher.send(state, triggerEvaluationContext.trigger(), triggerEvaluationContext.flow(), triggerEvaluationContext.conditionContext()); state = state .lastTriggeredDate(clock) .locked(clock, mustBeLocked);The monitor then looked for an execution for every locked trigger and warned when none was found — which is correct for schedule triggers (locked because an execution was just created) but wrong for realtime triggers (locked while idle, waiting for events).
Fix
Skip
TriggerType.REALTIMEtriggers in the monitor:triggers.forEach(state -> { if (TriggerType.REALTIME.equals(state.getType())) { return; } Optional<Execution> execution = this.executionRepository.findAllByTrigger(state).next().blockOptional();Tests
Added
TriggerSchedulerMonitorTestwith three cases:- Locked realtime trigger → no execution lookup
- Locked schedule trigger → execution lookup still happens
- Mixed triggers → only non-realtime triggers are checked
All three tests pass.The fix is in place and verified.
TriggerSchedulerMonitornow skipsTriggerType.REALTIMEtriggers, so idle realtime listeners no longer produce false "schedule is blocked" warnings. Three unit tests inTriggerSchedulerMonitorTestall pass.
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
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- fable-5Compare side by side →
- fable-5Compare side by side →