Skip to content

Conversation

@fhussonnois
Copy link
Member

  • Refactor MaintenanceService to be an interface
  • Fix VNodeController to also list schedulers in MAINTENANCE state
  • Add maintenance mode support for scheduler

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

🐋 Docker image

ghcr.io/kestra-io/kestra-pr:13542
docker run --pull=always --rm -it -p 8080:8080 --user=root -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp ghcr.io/kestra-io/kestra-pr:13542 server local

🧪 Java Unit Tests

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
Java Tests Report3288 ran3272 ✅14 ⚠️2 ❌27m 14s 283ms
TestResultTime ⏱
Java Tests Report
DefaultSchedulerTest.shouldStopAndRestartSchedulingLoopWhenEnteringAndExitingMaintenanceMode()❌ failure2s 160ms
TriggerSchedulerTest.shouldSucceedScheduleConditionalScheduleTriggerGivenValidTimeZone()❌ failure1s 171ms

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

Tests report quick summary:

failed ❌ > tests: 3288, success: 3272, skipped: 14, failed: 2

Project Status Success Skipped Failed
cli success ✅ 66 0 0
core success ✅ 1676 0 0
executor success ✅ 19 0 0
jdbc success ✅ 10 0 0
jdbc-h2 success ✅ 473 0 0
jdbc-mysql success ✅ 466 0 0
jdbc-postgres success ✅ 466 0 0
processor success ✅ 7 0 0
runner-memory success ✅ 1 0 0
scheduler failed ❌ 38 0 2
storage-local success ✅ 64 0 0

Failed tests:

scheduler > io.kestra.scheduler.DefaultSchedulerTest > shouldStopAndRestartSchedulingLoopWhenEnteringAndExitingMaintenanceMode() failed ❌ in 2.160
java.lang.AssertionError: 
Expecting all elements of:
  [io.kestra.scheduler.TriggerSchedulingLoop@6bb7ddf8,
    io.kestra.scheduler.TriggerSchedulingLoop@3eb9f22b]
to match given predicate but these elements did not:
  [io.kestra.scheduler.TriggerSchedulingLoop@6bb7ddf8,
    io.kestra.scheduler.TriggerSchedulingLoop@3eb9f22b]

java.lang.AssertionError: 
Expecting all elements of:
  [io.kestra.scheduler.TriggerSchedulingLoop@6bb7ddf8,
    io.kestra.scheduler.TriggerSchedulingLoop@3eb9f22b]
to match given predicate but these elements did not:
  [io.kestra.scheduler.TriggerSchedulingLoop@6bb7ddf8,
    io.kestra.scheduler.TriggerSchedulingLoop@3eb9f22b]
	at io.kestra.scheduler.DefaultSchedulerTest.shouldStopAndRestartSchedulingLoopWhenEnteringAndExitingMaintenanceMode(DefaultSchedulerTest.java:246)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:142)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:162)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:119)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:129)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

scheduler > io.kestra.scheduler.TriggerSchedulerTest > shouldSucceedScheduleConditionalScheduleTriggerGivenValidTimeZone() failed ❌ in 1.171
org.opentest4j.AssertionFailedError: 
expected: 1
 but was: 0

org.opentest4j.AssertionFailedError: 
expected: 1
 but was: 0
	at app//io.kestra.scheduler.TriggerSchedulerTest.shouldSucceedScheduleConditionalScheduleTriggerGivenValidTimeZone(TriggerSchedulerTest.java:302)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:580)
	at app//io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:142)
	at app//io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:162)
	at app//io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:119)
	at app//io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:129)
	at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1596)
	at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1596)


Flaky tests report quick summary:

failed ❌ > tests: 23, success: 18, skipped: 4, failed: 1

Project Status Success Skipped Failed
cli failed ❌ 1 0 1
core success ✅ 5 0 0
executor success ✅ 2 0 0
jdbc success ✅ 2 0 0
jdbc-h2 success ✅ 4 0 0
jdbc-mysql success ✅ 4 0 0
jdbc-postgres success ✅ 4 0 0

Failed tests:

cli > io.kestra.cli.services.FileChangedEventListenerTest > testWithPluginDefault() failed ❌ in 10.380
java.util.concurrent.TimeoutException: Await failed to terminate within PT10S.

java.util.concurrent.TimeoutException: Await failed to terminate within PT10S.
	at io.kestra.core.utils.Await.until(Await.java:46)
	at io.kestra.core.utils.Await.until(Await.java:35)
	at io.kestra.cli.services.FileChangedEventListenerTest.testWithPluginDefault(FileChangedEventListenerTest.java:134)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension$2.proceed(MicronautJunit5Extension.java:142)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptEach(AbstractMicronautExtension.java:162)
	at io.micronaut.test.extensions.AbstractMicronautExtension.interceptTest(AbstractMicronautExtension.java:119)
	at io.micronaut.test.extensions.junit5.MicronautJunit5Extension.interceptTestMethod(MicronautJunit5Extension.java:129)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

Copy link
Member

@loicmathieu loicmathieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// Consumers
private final List<Disposable> consumerDisposables = new ArrayList<>();

private Disposable maintenanceListener;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why didn't you add it to the list of consumerDisposables?

@fhussonnois fhussonnois force-pushed the fix/scheduler-maintenance-mode branch 2 times, most recently from 9b6bd43 to 44b37e8 Compare December 10, 2025 12:40
* Refactor MaintenanceService to be an interface
* Fix VNodeController to also list schedulers in MAINTENANCE state
* Add maintenance mode support for scheduler
@fhussonnois fhussonnois force-pushed the fix/scheduler-maintenance-mode branch from 44b37e8 to b5c867b Compare December 10, 2025 15:40
@fhussonnois fhussonnois merged commit 12a6f26 into kestra_wip Dec 10, 2025
7 of 9 checks passed
@fhussonnois fhussonnois deleted the fix/scheduler-maintenance-mode branch December 10, 2025 21:19
@github-project-automation github-project-automation bot moved this from To review to Done in Pull Requests Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants