Repository navigation
Conversation
update_cron_config() ran `docker restart` on the scheduler every time, which also starts a stopped container. The upgrade runs it as the ee-update-cron-config step after the image migration, which leaves a stopped global service on its old image, so a cron disabled with `ee service disable cron` ran again after the upgrade on the old image, and `ee service enable cron` then had nothing to do. Job changes started a disabled scheduler the same way. Restart the scheduler only when it is running or restart-looping. A stopped or missing one only gets the config file, which it reads when it is next started. `ee cron create` still starts or creates the scheduler first.
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
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.
The upgrade's
ee-update-cron-configstep and every job change randocker restart services_global-cron_1. That also starts a stopped container, so a cron disabled before an upgrade ran again afterwards on its old image, while the global compose file already had the new tag, andee service enable cronreported "already enabled".update_cron_config()now writes the config and restarts the scheduler only when its state isrunningorrestarting. For an exited, created, paused, dead or missing scheduler it only writes the file; the scheduler reads it when it is next started.ee cron createstill brings the scheduler up throughinit_global_container()before it writes the config.Behaviour change:
ee cron update,ee cron deleteandee site deleteno longer start a scheduler that was disabled.Tested with PHPUnit on PHP 7.4 and 8.5: a running or restart-looping scheduler is restarted, an exited, created, paused, dead or missing one only gets the file, and the upgrade step,
ee cron updateandee cron deleteleave a disabled scheduler stopped.Summary by CodeRabbit