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
Now let me check existing tests for this monitor:
- Assistant
Now I'll apply the fix — skip realtime triggers in the monitor, since they are locked for their whole lifetime and never bound to an execution:
- Assistant
Now let me write a unit test. First, let me look at existing test style and the
Fixturesclass: - Assistant
Now I'll write the unit test:
- Assistant
The Gradle build is still starting up. I'll wait for it to finish.
- Assistant
While the test runs, let me double-check the final state of the fix:
- Assistant
The test run is in progress — I'll report as soon as the monitor emits the build result.
- Assistant
Gradle is running (output is piped through
tail -30, so it flushes at completion). Waiting for the notification. - Assistant
Changes are in place. Waiting on the test run to confirm.
- Assistant
I have two background watchers armed on the test run. I'll wait for their notifications rather than polling.
- Assistant
All watchers are set. I'll continue as soon as the test command finishes.
- Assistant
One cleanup —
java.time.Instantis unused in the test: - Assistant
The Gradle daemon is active and working (load ~2). Waiting for completion notifications from the background watchers.
- Assistant
That was just the 2-minute progress checker (the main test output was still empty at that point). Still waiting on the actual test run.
- Assistant
The scheduler build directory doesn't exist yet — Gradle is compiling upstream modules (core, etc.) first, which takes several minutes on a cold build. The watchers will notify when the test run completes; I'll report the results then.
- Assistant
Waiting for build progress notifications.
- Assistant
The diff is minimal and surgical. Now waiting on the build.
- Assistant
All monitors armed. Ending this turn — I'll pick up when a build event arrives.
- Assistant
Gradle is still resolving dependencies (cache lock actively touched). I'll rely on the armed monitors now and report when the test completes.
- Assistant
Waiting for the build to finish — the monitors will re-invoke me when there's progress. No further action needed right now.
- Assistant
Compilation has started (core and scheduler build dirs now exist). Re-arming the completion watch:
- Assistant
Compilation has begun and the result watcher is re-armed. I'll report the test outcome when the run finishes.
- Assistant
Scheduler main and test classes are compiled; the test JVM is now running. The final-result watcher (still armed) will deliver the outcome shortly.
- Assistant
BUILD SUCCESSFUL — both tests pass:
io.kestra.scheduler.TriggerSchedulerMonitorTest ✔ shouldNotReportRealtimeTriggersAsBlocked() io.kestra.scheduler.TriggerSchedulerMonitorTest ✔ shouldCheckExecutionForNonRealtimeLockedTriggers() 2 passing (5.1s)Summary
Issue:
TriggerSchedulerMonitorreported realtime triggers as blocked ("No execution found, schedule is blocked since ...") indefinitely. Realtime triggers hold their lock for their entire lifetime and are never bound to a single execution ID, so the warning — and thescheduler.execution.missing.durationmetric — were permanent false positives for them.Fix (TriggerSchedulerMonitor.java:64-68): skip states with
TriggerType.REALTIMEin the monitoring loop before the execution lookup:// Realtime triggers are locked for their entire lifetime and are not bound to a // single execution, so they must not be reported as blocked. if (TriggerType.REALTIME == state.getType()) { return; }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.