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
I’ll trace how
TriggerSchedulerMonitordistinguishes scheduled versus realtime trigger locks and how execution IDs are populated. Assumption: realtime locks are valid long-lived state and should be excluded from the “blocked schedule” warning, while existing warnings for genuinely stuck scheduled triggers must remain unchanged. Success means a focused regression test reproduces the false report, the smallest implementation change fixes it, and the relevant Gradle tests pass. - Assistant
rgis unavailable in this checkout environment, so I’m switching to targetedfind/grepsearches. I’ll first locate the monitor and its tests, then compare trigger model types before changing behavior. - Assistant
The state model already carries an explicit
TriggerType.REALTIME, so the clean discriminator is available without loading flow definitions or changing persistence. I’m choosing to filter realtime states inside the monitor (not infindTriggersEligibleForScheduling, which is shared by actual scheduling) and will add a unit test proving the repository and missing-execution metric are never consulted for realtime locks while scheduled locks still are. - Assistant
The implementation now short-circuits only
REALTIMEstates; unknown/legacy types and schedule/polling states retain the prior monitoring behavior. The regression test supplies one realtime and one scheduled lock and verifies only the scheduled state reaches execution lookup, which is the path that emits the false warning. I’m running the focused scheduler test now. - Assistant
The focused build is still running without emitted Gradle output (likely configuration/dependency resolution); no failure has appeared. While it continues, I’m keeping the scope to these two scheduler files and will inspect the final test report rather than treating process exit alone as verification.
- Assistant
Gradle has become idle during configuration with no task output, consistent with dependency/plugin resolution rather than test execution. Since this task must stay local, I’m stopping that attempt and rerunning the same focused test in offline mode against the existing dependency cache.
- Assistant
Offline verification exposed a concrete environment limitation:
org.mockito:mockito-core:5.23.0is not present in the local Gradle cache, so no scheduler test task can be created offline. I’ll still run offline main compilation and static diff checks; the regression test remains included for CI, and I’m adding a concise comment documenting why the exception is intentional. - Assistant
Main compilation now passes offline. The only emitted warnings are pre-existing compiler warnings in
coreandDefaultScheduler; the modified monitor compiles cleanly. I’m doing the final diff review now, including whitespace and ensuring no unrelated files were touched.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.