YunoHost-Apps / wallabag2_ynh

Wallabag v2 package for YunoHost
https://www.wallabag.org/
GNU Affero General Public License v3.0
62 stars 14 forks source link

Wallabag removed while upgrading to 2.5.1~ynh2 #153

Closed Gofannon closed 2 years ago

Gofannon commented 2 years ago

Describe the bug

  1. Cannot upgrade app to latest version (2.3.8~ynh4 => 2.5.1~ynh2)
  2. Package cannot restore the "pre-backup" wallabag2-pre-upgrade1.tar after the failed upgrade
    1. application is removed from server
    2. restore from backup is ok

Context

Steps to reproduce

Expected behavior

  1. Application should be upgraded
  2. if fails, should be restore to working state as before upgrade

Logs

2022-08-09 21:42:22,235: WARNING - 762  This backup archive can not be restored because it comes from a too-old YunoHost version.
2022-08-09 21:42:22,391: DEBUG - + [[ -d /etc/yunohost/apps/wallabag2 ]]
2022-08-09 21:42:22,392: DEBUG - + ynh_die '--message=Uhoh ... Yunohost failed to restore the app to the way it was before the failed upgrade :|'
2022-08-09 21:42:22,483: WARNING - Uhoh ... Yunohost failed to restore the app to the way it was before the failed upgrade :|

https://paste.yunohost.org/edoqiliwew.bash

from the log file, it seems that I am affected by https://github.com/YunoHost-Apps/wallabag2_ynh/pull/129 and needs to use the https://github.com/YunoHost-Apps/wallabag2_ynh/pull/133 to fix the database. Am I correct?

lapineige commented 2 years ago

I think I had this issue too, backup is not automatically restored, doing it afterwards works.

from the log file, it seems that I am affected by #129 and needs to use the #133 to fix the database. Am I correct?

You do :)

I think the best way to fix this is to execute these commands : https://github.com/wallabag/wallabag/issues/5233#issuecomment-1041863310

I can provide assistance about how to do it (in summary : connect to your Wallabag MySQL database (password found in yunohost app settings), execute the command, run the upgrade).

Gofannon commented 2 years ago

I think I had this issue too, backup is not automatically restored, doing it afterwards works.

I was afraid that other people migrating to bulleyes might get stuck with this but I was running the beta so I don't know... Time will tell with the release of YunoHost 11 :)

You do :)

I think the best way to fix this is to execute these commands : wallabag/wallabag#5233 (comment)

I can provide assistance about how to do it (in summary : connect to your Wallabag MySQL database (password found in yunohost app settings), execute the command, run the upgrade).

Well, I went the "lazy way" by using https://github.com/YunoHost-Apps/wallabag2_ynh/pull/133 as an intermediate step to fix the DB. It went smoothly

2.3.8\~ynh4 (old)=> 2.4.3\~ynh1 (fix db) => 2.5.1\~ynh2 (current)

Thanks for all the people working of the package!

@lapineige , you can close this issue if you want, it was a false alert.

If someone has to do the same steps:

  1. fix the DB yunohost app upgrade wallabag2 -u https://github.com/nicofrand/wallabag2_ynh/tree/upgrade-database-scheme

  2. then upgrade the app with normal means from YunoHost to get the last version

lapineige commented 2 years ago

I was afraid that other people migrating to bulleyes might get stuck with this but I was running the beta so I don't know... Time will tell with the release of YunoHost 11 :)

Then we should know pretty soon as it was done :D

If it restores well afterwards, that's not a so big deal.

Well, I went the "lazy way" by using #133 as an intermediate step to fix the DB. It went smoothly

Great, thank you for the feedback, this means it's working ! πŸŽ‰

you can close this issue if you want, it was a false alert.*

It was not, this is important to document too πŸ˜‰