Repository navigation
Conversation
9 tasks
Macbet
force-pushed
the
refactor/quartz-boot-autoconfig
branch
2 times, most recently
from
November 29, 2026 12:55
5a5c698 to
8fa0929
Compare
…guration The custom SchedulerFactoryBean made Boot's Quartz auto-configuration back off, so the spring.quartz.* properties were ignored. Boot now builds the scheduler; a SchedulerFactoryBeanCustomizer keeps the scheduler name (SCHED_NAME), thread count, JDBC store, clustering and driver delegate as before. Nine fixed-schedule registration classes become JobDetail/Trigger beans with the same keys. InactiveJobsService and JobReconciliationSweepService stay programmatic because they also schedule a one-shot run per boot. Behaviour changes: - spring.quartz.* now applies, including clusterCheckinInterval=20000 (was the Quartz default 7500). - Job and trigger registration runs in one transaction on the JPA transaction manager, and the scheduler starts at the end of context startup instead of during bean creation. - A registration failure stops startup instead of being logged: an invalid io.terrakube.policy.drift.cron, io.terrakube.policy.evaluation.retentionCron or io.terrakube.logs.stream-cleanup.cron, or any SchedulerException. - A pending policy-drift follow-up trigger survives a restart. Refs #4052
Macbet
force-pushed
the
refactor/quartz-boot-autoconfig
branch
from
November 29, 2026 12:58
8fa0929 to
64032ad
Compare
Member
|
@Macbet this is a clean, solid refactor. Moving Quartz setup to Spring Boot auto-configuration fixes the silently ignored What looks great
Minor suggestions
|
…errides Addresses review feedback on #4054: - build each fixed-schedule trigger from its JobDetail bean, so the job key and description come from one place instead of repeated strings - log a WARN when QuartzSchedulerConfiguration overrides a conflicting spring.quartz.* value (scheduler name, thread count, clustering, driver delegate, job store class), so the override is not silent - set spring.quartz.overwrite-existing-jobs=true in the demo profile too
Contributor
Author
|
@alfespa17 thanks — addressed in ae9a10a:
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What changed and why?
Part 1 of #4052.
The API declared its own
SchedulerFactoryBean, so Spring Boot's Quartz auto-configuration backed off and thespring.quartz.*properties inapplication.propertieswere ignored. Boot now builds the scheduler. ASchedulerFactoryBeanCustomizerkeeps the scheduler name (SCHED_NAME), thread count, JDBC job store, clustering and driver delegate exactly as before, so existingQRTZ_*rows stay valid.Nine fixed-schedule registration classes become
JobDetail/Triggerbeans with the same keys.InactiveJobsServiceandJobReconciliationSweepServicestay programmatic because they also schedule a one-shot run on every boot.Behaviour changes:
spring.quartz.*now applies, includingclusterCheckinInterval=20000(it was the Quartz default, 7500). A dead node's jobs are picked up after about 27s instead of about 15s. Old and new pods can share the cluster during a rolling upgrade.io.terrakube.policy.drift.cron,io.terrakube.policy.evaluation.retentionCronorio.terrakube.logs.stream-cleanup.cron, or anySchedulerException.Testing