YunoHost-Apps / synapse_ynh

Matrix server (synapse) package for YunoHost
https://matrix.org/
GNU General Public License v3.0
79 stars 42 forks source link

Testing #361

Closed Josue-T closed 1 year ago

Josue-T commented 1 year ago

Problem

Solution

PR Status

Automatic tests

Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)

Josue-T commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Alrighty! Test Badge

Gredin67 commented 1 year ago

upgade failed on Yunohost 4

/home/admin# yunohost app upgrade synapse -b -u https://github.com/YunoHost-Apps/synapse_ynh/tree/testing
Info : Mise à jour de synapse...
Info : [....................] > Loading installation settings...
Info : [+...................] > Ensuring downward compatibility...
Info : [#++++++++...........] > Backing up the app before upgrading (may take a while)...
Attention : $NO_BACKUP_UPGRADE is set, backup will be avoided. Be careful, this upgrade is going to be operated without a security backup
Attention : L'utilisateur 'synapse' existe déjà
Attention : [Error] Upgrade failed.
Attention : $NO_BACKUP_UPGRADE is set, that means there's no backup to restore. You have to fix this upgrade by yourself !
Erreur : Impossible de mettre à jour synapse : Une erreur s'est produite durant l'exécution du script de mise à niveau de l'application
Info : L'opération 'Mettre à jour l'application 'synapse'' a échoué ! Pour obtenir de l'aide, merci de partager le journal de l'opération en utilisant la commande 'yunohost log share 20230112-071312-app_upgrade-synapse'
Attention : Here's an extract of the logs before the crash. It might help debugging the error:
Info : DEBUG - + ynh_app_setting set synapse is_free_registration 0
Info : DEBUG - + '[' -z ']'
Info : DEBUG - ++ ynh_string_random --length=30
Info : DEBUG - ++ length=30
Info : DEBUG - ++ dd if=/dev/urandom bs=1 count=1000
Info : DEBUG - ++ sed --quiet 's/\(.\{30\}\).*/\1/p'
Info : DEBUG - ++ tr --complement --delete A-Za-z0-9
Info : DEBUG - + synapse_user_app_pwd=**********
Info : DEBUG - + ynh_app_setting_set --app=synapse --key=synapse_user_app_pwd --value=**********
Info : DEBUG - + local _globalapp=synapse
Info : DEBUG - + app=synapse
Info : DEBUG - + [[ synapse_user_app_pwd =~ (unprotected|protected|skipped)_ ]]
Info : DEBUG - + ynh_app_setting set synapse synapse_user_app_pwd **********
Info : DEBUG - ++ dpkg-query '--showformat=${Version}' --show yunohost
Info : DEBUG - + ynh_current_version=4.4.3
Info : DEBUG - ++ dpkg --compare-versions 4.4.3 ge 11.1
Info : DEBUG - + yunohost user create synapse -f Synapse -l Application -d matrix.sans-nuage.fr -p **********
Info : WARNING - L'utilisateur 'synapse' existe déjà
Info : DEBUG - Vous êtes sur le point de définir un nouveau mot de passe utilisateur. Le mot de passe doit comporter au moins 8 caractères, bien qu'il soit recommandé d'utiliser un mot de passe plus long (c'est-à-dire une phrase secrète) et/ou une combinaison de caractères (majuscules, minuscules, chiffres et caractères spéciaux).
Info : DEBUG - + ynh_exit_properly
Gredin67 commented 1 year ago

Also it seems that fail2ban does not restart after upgrade or restore (both on Yunohost 4 and 11)

Josue-T commented 1 year ago

Did you create manually a yunohost user named synapse ? It yes it's the reason of your issue. The app need to create a user synapse.

Gredin67 commented 1 year ago

nope, didn't tweak anything manually

Gredin67 commented 1 year ago

also, I plan to upgrade from yunohost 4 to 11 this evening. Should I upgrade synapse (this branch) before or after the yunohost upgrade?

Gredin67 commented 1 year ago

and maybe we should also do something like that at install and upgrade. At least:

python3 -m venv $final_path
export HOME=$final_path
$final_path/bin/pip3 install --upgrade pip setuptools wheel

https://github.com/YunoHost-Apps/mautrix_signal_ynh/blob/master/scripts/upgrade#L142-L145

Josue-T commented 1 year ago

and maybe we should also do something like that at install and upgrade. At least:

python3 -m venv $final_path
export HOME=$final_path
$final_path/bin/pip3 install --upgrade pip setuptools wheel

https://github.com/YunoHost-Apps/mautrix_signal_ynh/blob/master/scripts/upgrade#L142-L145

It's already done on the code above.

Josue-T commented 1 year ago

!testme

Josue-T commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Meow :cat2: Test Badge