Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[philosophy] Should plugin update failure make kanboard upgrade fail ? #172

Open
oleole39 opened this issue Oct 23, 2023 · 0 comments
Open

Comments

@oleole39
Copy link

oleole39 commented Oct 23, 2023

Hello,

I was not able to upgrade Kanboard (from 1.2.32 to 1.2.33) due to a plugin whose update mechanism was broken. Fixing the plugin eventually let me upgrade Kanboard to 1.2.33.

Here is the interesting portion of the log:

2023-10-23 18:27:14,700: DEBUG - * Updating plugin: Auto Email Extended Actions
2023-10-23 18:27:15,206: DEBUG -
2023-10-23 18:27:15,244: WARNING - In Installer.php line 117:
2023-10-23 18:27:15,250: DEBUG -
2023-10-23 18:27:15,250: WARNING -   [Kanboard\Core\Plugin\PluginInstallerException]
2023-10-23 18:27:15,251: WARNING -   Impossible d'ouvrir l'archive du plugin.
2023-10-23 18:27:15,252: DEBUG -
2023-10-23 18:27:15,252: DEBUG -
2023-10-23 18:27:15,253: WARNING - Exception trace:
2023-10-23 18:27:15,253: WARNING -   at /var/www/kanboard/app/Core/Plugin/Installer.php:117
2023-10-23 18:27:15,254: WARNING -  Kanboard\Core\Plugin\Installer->downloadPluginArchive() at /var/www/kanboard/app/Core/Plugin/Installer.php:78
2023-10-23 18:27:15,256: WARNING -  Kanboard\Core\Plugin\Installer->update() at /var/www/kanboard/app/Console/PluginUpgradeCommand.php:38
2023-10-23 18:27:15,257: WARNING -  Kanboard\Console\PluginUpgradeCommand->execute() at /var/www/kanboard/vendor/symfony/console/Command/Command.php:298
2023-10-23 18:27:15,258: WARNING -  Symfony\Component\Console\Command\Command->run() at /var/www/kanboard/vendor/symfony/console/Application.php:1040
2023-10-23 18:27:15,259: WARNING -  Symfony\Component\Console\Application->doRunCommand() at /var/www/kanboard/vendor/symfony/console/Application.php:301
2023-10-23 18:27:15,260: WARNING -  Symfony\Component\Console\Application->doRun() at /var/www/kanboard/vendor/symfony/console/Application.php:171
2023-10-23 18:27:15,261: WARNING -  Symfony\Component\Console\Application->run() at /var/www/kanboard/cli:21
2023-10-23 18:27:15,261: DEBUG -
2023-10-23 18:27:15,262: WARNING - plugin:upgrade
2023-10-23 18:27:15,262: DEBUG -
2023-10-23 18:27:15,276: DEBUG - + ynh_exit_properly
2023-10-23 18:27:15,277: DEBUG - + local exit_code=1
2023-10-23 18:27:15,277: DEBUG - + [[ upgrade =~ ^install$|^upgrade$|^restore$ ]]
2023-10-23 18:27:15,278: DEBUG - + rm -rf /var/cache/yunohost/download/
2023-10-23 18:27:15,285: DEBUG - + '[' 1 -eq 0 ']'
2023-10-23 18:27:15,286: DEBUG - + trap '' EXIT
2023-10-23 18:27:15,287: DEBUG - + set +o errexit
2023-10-23 18:27:15,287: DEBUG - + set +o nounset
2023-10-23 18:27:15,288: DEBUG - + sleep 0.5
2023-10-23 18:27:15,788: DEBUG - + type -t ynh_clean_setup
2023-10-23 18:27:15,789: DEBUG - + exit 1
2023-10-23 18:27:16,794: ERROR - Impossible de mettre à jour kanboard : Une erreur s'est produite durant l'exécution du script de mise à niveau de l'application

Is this a wanted behavior ?
On the one hand it makes sense as failing to upgrade a plugin while upgrading Kanboard could lead to some plugin incompatibility.
On the second hand it can be confusing for YNH admins and some might rather consider that upgrading Kanboard is more important than risking losing the given plugin (and anyway, if the plugin was not maintained and had no update but was incompatible with newer version of Kanboard, the YNH script would have allowed Kanboard upgrade anyway).

In the case it is not wanted, given the upgrade script, I can only think for the moment of those 2 alternatives:

  • tell YNH to upgrade Kanboard even if the command php$phpversion cli plugin:upgrade --no-interaction --verbose fails. I have no idea how this could be done though, and I haven't checked so far. More generally, I don't know how/why YNH errors are fired.
  • remove that command from the upgrade script, considering that upgrading kanboard plugins is the app's admin's responsibility to check it manually (which i am personnally not in favour of, but well...).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant