nextcloud / updater

:arrows_counterclockwise: The updater app to keep your Nextcloud up-to-date
GNU Affero General Public License v3.0
46 stars 32 forks source link

offer to run cron or inform users of it after upgrade #320

Open jospoortvliet opened 3 years ago

jospoortvliet commented 3 years ago

After an upgrade, cron has to run at least once to finish some things that might take longer. When you're upgrading quickly through major releases (say you go from 12 to 20) you risk problems if you don't run cron in between, but most admins won't know this.

We should warn, or better, offer to run cron after the upgrade is complete.

jospoortvliet commented 3 years ago

(pls correct if this isn't a starter issue, but I guess that just offering to run cron wouldn't be magically hard)

jospoortvliet commented 3 years ago

Related: https://github.com/nextcloud/updater/issues/321 -> execute the recommendations. Not as crucial, but certainly nice.

MorrisJobke commented 3 years ago

Yep makes sense 👍

joshtrichards commented 6 months ago

A note in the docs was recently added for this: nextcloud/documentation#10636

Triggering a cron run once is easy enough (if that's all that is indeed needed; docs currently say run 2-3 times) but...

What jobs are we concerned with specifically here? I only see these referenced by the Updater:

https://github.com/nextcloud/server/blob/a399de1b222b524a2b3ddcfd03ba34c39e00d951/lib/private/Setup.php#L450-L456

Otherwise most things are in the Repair steps that get ran at the end automatically already:

https://github.com/nextcloud/server/blob/a399de1b222b524a2b3ddcfd03ba34c39e00d951/lib/private/Updater.php#L290-L291

And the core migrations that also get ran:

https://github.com/nextcloud/server/blob/a399de1b222b524a2b3ddcfd03ba34c39e00d951/lib/private/Updater.php#L311-L313

It appears what is most important is that the jobs get installed (which they always do before the update/upgrade finishes). Is it really important that they run before the next update/upgrade? None of the jobs look all that critical (though I suppose there could be differences between major version hops that don't appear in the next major, or in some apps, or something).

Maybe I'm overlooking something because this is specific to older Server versions?

@SystemKeeper You recently looked a bit at this for the doc addition; any idea what jobs are of concern during the update/upgrade cycle?

joshtrichards commented 7 hours ago

Related:

nextcloud/server#28508 nextcloud/server#45513 nextcloud/server#24777