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 the scheduler monitor’s blocked-trigger logic and its tests first. Success means realtime triggers without an execution ID are excluded from this warning while genuine stuck schedules remain reported, with a focused regression test and relevant Gradle tests passing.
- Assistant
rgisn’t installed in this checkout, so I’m using a narrow recursive search instead and keeping the inspection scoped to the scheduler implementation and tests. - Assistant
The state model already records
TriggerType.REALTIME, and realtime workers intentionally keep those states locked as part of normal operation. The smallest safe fix is therefore to skip only realtime states inside the monitor; schedule and polling states—including legacy states with no type—retain the existing diagnostics. I’ll add a unit regression test that proves the execution lookup is not attempted for realtime state. - Assistant
The surgical guard and regression test are in place. The targeted scheduler test is compiling now; after it passes I’ll run the broader scheduler unit suite (or the module’s available equivalent) to catch integration regressions.
- Assistant
The targeted build is still active and consuming CPU rather than stalled; this monorepo has a substantial first compilation even for one test. The implementation remains limited to one type guard plus one new test file.
- Assistant
The build attempted to resolve a missing Gradle plugin remotely, which is outside the requested offline constraint. I’ve identified that from the live thread state and am stopping this run; I’ll retry with Gradle’s offline mode so validation uses only the repository’s local caches.
- Assistant
Offline validation confirms the only blocker is an uncached
mockito-core:5.23.0test dependency, not a compilation or test failure. I’m still running the production compile separately in offline mode, then I’ll inspect the final diff for formatting and unintended changes. - Assistant
Production compilation passes offline. The formatter check itself crashes inside the Spotless plugin before reporting any file violation, so I’m treating that as tooling failure and relying on
git diff --checkplus the project’s established Java layout. The targeted test remains blocked solely by the uncached Mockito agent dependency. - Assistant
The regression test now compiles successfully offline along with the scheduler test sources. The remaining gap is execution: the
testtask uniquely resolves the uncached Mockito Java agent during task creation, so it cannot start offline even though Mockito is present on the compile classpath. - Assistant
The local cache contains Mockito 5.20 while the test task’s agent is pinned to uncached 5.23. I’ll temporarily point only that agent declaration at the cached version to execute the focused test offline, then immediately restore
build.gradle; this validation-only adjustment will not remain in the final diff. - Assistant
The test task has a second uncached Java agent (AspectJ), unrelated to this unit test. I’ll make one final offline validation attempt by temporarily disabling that agent and using cached Mockito 5.20; both build-script lines will be restored before handoff.
- Assistant
The focused test reached the test task but coverage instrumentation introduced a third uncached agent. I’ll disable coverage only for this transient focused run as well; this should finally execute the test entirely from cached dependencies, after which I’ll restore and verify the build script byte-for-byte via Git.
- Assistant
The implementation and regression test both compile, and the repository’s build script has been fully restored with no diff. Actual test execution cannot proceed offline because several runtime-only artifacts are absent from the local cache (Allure, JUnit launcher, Objenesis, plus the configured agents); no network access was used to fetch them.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.