nextcloud_ynh icon indicating copy to clipboard operation
nextcloud_ynh copied to clipboard

Specific incompatibility of a NC app (e.g. Mail) blocks overall NC upgrade without explicit warning

Open oleole39 opened this issue 11 months ago • 3 comments

Describe the bug

Nextcloud upgrade fails when activated Nextcloud Mail app (or any other app?) is not compatible with the new Nextcloud version, without providing an explicit warning to the YNH admin.

Context

I had the case detailed on that topic of YNH forum, using a VPS hosting YNH 11.2.3, updating from Nextcloud 26.0.2~ynh3 to Nextcloud 27.0.1~ynh1. Reading the relatively old issue #372, I wonder whether this is I wonder whether this is only specific to Mail app.

Steps to reproduce

  • Install Nextcloud 26.0.2~ynh3.
  • Install Nextcloud app Mail v.2.2.7 (not compatible with Nextcloud 27)
  • Try updating Nextcloud via YNH updater (either SSH or webadmin):
    • It will fail unless you disable Mail app or update it, but you will not get notified explicitely about the reason.
    • The only clue will be a line in the log (coming at the end of the process when the update script tries to enable all Nextcloud apps again) saying DEBUG - App "Mail" cannot be installed because it is not compatible with this version of the server.

Expected behavior

I can think of 4 main approaches:

  1. Always leave Mail app disabled after update (thus removing the detection fix implemented at the event of the migration from NC 19 to NC 20 - maybe NC 27 changed in a way that this fix would not be working anymore). But that will break access to mail for users while the admin does not update/re-enable the Mail app.
  2. Always (as per the scope of this issue) mark upgrade as successful and do not revert the process but leave Mail app disabled, and add a specific warning (ynh_print_warn()) about the issue in the log.
  3. Check for app compatibility before upgrading NC and warn or cancel if Mail is not compatible.
  4. Check for app compatibility and auto update Mail app if required before upgrading NC.

I guess having a configuration option to allow choosing between 3 or 4 would be the ideal way, but I assume that would be more work than 1 or 2.

Regarding the app compatiblity check, below are a few resources:

Logs

https://paste.yunohost.org/raw/uvaziwofij

oleole39 avatar Jul 24 '23 14:07 oleole39