YunoHost-Apps / calckey_ynh

Calcket package for YunoHost
https://i.calckey.cloud/
GNU Affero General Public License v3.0
9 stars 7 forks source link

Upgrade to Calckey 13.1.1 #12

Closed lapineige closed 1 year ago

lapineige commented 1 year ago

v13.0.6 will be released soon. It introduces some changes in the install process : #10

~Codeberg is not working right know so I can't download the source archive and sha256sum it, hence this is still a draft.~ Downloading the archive is working again.

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)

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:carousel_horse: Test Badge

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:carousel_horse: Test Badge

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:stuck_out_tongue_winking_eye: Test Badge

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:carousel_horse: Test Badge

lapineige commented 1 year ago

On this line: https://github.com/lapineige/calckey_ynh/blob/master/scripts/install#L137

sudo -u calckey env PATH=/opt/node_n/n/versions/node/19/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin pnpm i
Usage Error: This project is configured to use yarn

I'm lost with this one… The script does not even refers to yarn… @ThatOneCalculator : I think I need your help it, to do the conversion to pnpm… #10

Also I don't think we use yarn workspace, am I mistaken ? Should we use it ?

lapineige commented 1 year ago

Ok, I understood something (source): pnpm i is an alias for pnpm install. I hate those very inexplicit naming :(

So I probably messed up the command order.

edit : I didn't have a better luck…

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Meow :cat2: Test Badge

lapineige commented 1 year ago

Reading this documentation, I'm wondering… @YunoHost-Apps/apps-group, is it possible that yunohost helpers are not made to work with pnpm as a replacement of npm ? 🤔

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Alrighty! Test Badge

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:sunflower: Test Badge

lapineige commented 1 year ago

Trying without Yunohost helpers

oufmilo commented 1 year ago

pnpm is for the next update.. that's why it doesn't work

lapineige commented 1 year ago

Oh it's not for 13.0.6 (release candidate) ? Planned for v14 ?

ThatOneCalculator commented 1 year ago

v14 won't be releasing for 6+ months...

The next update with pnpm will either be v13.0.7 or v13.1.0

yalh76 commented 1 year ago

Reading this documentation, I'm wondering… @YunoHost-Apps/apps-group, is it possible that yunohost helpers are not made to work with pnpm as a replacement of npm ? 🤔

nope, it's only made to work with npm, you should look at the code behind the helper : https://github.com/YunoHost/yunohost/blob/394907ff0df218ec926f43c2e2ba006c68cc3f8a/helpers/nodejs#L74

lapineige commented 1 year ago

Ok thanks. Any change it gets adapted in the future ?

Or should we manage pnpm ourselves for this package ?

yalh76 commented 1 year ago

Ok thanks. Any change it gets adapted in the future ?

Or should we manage pnpm ourselves for this package ?

I don't know pnpm, but as far i can see, yunohost nodejs helper use https://github.com/tj/n, , and n doesn't manage pnpm

lapineige commented 1 year ago

@oufmilo found a way in Misskey app, I'm replicating it here.

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Alrighty! Test Badge

oufmilo commented 1 year ago

@oufmilo found a way in Misskey app, I'm replicating it here.

Yes, I think it's a good way but for the moment calckey doesn't have release the version for pnpm, we should be patient.

lapineige commented 1 year ago

Yeah I forgot that before launching the CI 😅

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Meow :cat2: Test Badge

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Fingers crossed! Test Badge

lapineige commented 1 year ago

@oufmilo please merge master to testing :) https://github.com/YunoHost-Apps/calckey_ynh/pull/13

ping @oufmilo :)

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Fingers crossed! Test Badge

lapineige commented 1 year ago

Install works ! :tada:

oufmilo commented 1 year ago

Test Badge

lapineige commented 1 year ago

Wow that's way faster on your side :-o

(CI still running, there were a lock file issue)

lapineige commented 1 year ago

Restore fails when starting systemd service :

npm[14220]: > calckey@13.1.0 start npm[14220]: > pnpm --filter backend run start npm[14237]: sh: 1: pnpm: not found

Should it run corepack enable after restoration ? :thinking:

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

:stuck_out_tongue_winking_eye: Test Badge

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Fingers crossed! Test Badge

lapineige commented 1 year ago

Hey @ThatOneCalculator the sha256sum of the archive changed, do you know why ?

lapineige commented 1 year ago

!testme

yunohost-bot commented 1 year ago

Meow :cat2: Test Badge

ThatOneCalculator commented 1 year ago

Hey @ThatOneCalculator the sha256sum of the archive changed, do you know why ?

Of which archive? We did reupload our docker image due to an issue.

lapineige commented 1 year ago
779179 ERROR Could not restore calckey: An error occured inside the app restore script
779180 INFO The operation 'Restore 'calckey' from a backup archive' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20230202-231805-backup_restore_app-calckey' to get help
779288 WARNING Here's an extract of the logs before the crash. It might help debugging the error:
779289 INFO DEBUG -   hint: undefined,
779290 INFO DEBUG -   position: undefined,
779290 INFO DEBUG -   internalPosition: undefined,
779291 INFO DEBUG -   internalQuery: undefined,
779291 INFO DEBUG -   where: undefined,
779291 INFO DEBUG -   schema: undefined,
779292 INFO DEBUG -   table: undefined,
779292 INFO DEBUG -   column: undefined,
779293 INFO DEBUG -   dataType: undefined,
779293 INFO DEBUG -   constraint: undefined,
779293 INFO DEBUG -   file: 'auth.c',
779294 INFO DEBUG -   line: '331',
779294 INFO DEBUG -   routine: 'auth_failed'
779294 INFO DEBUG - }
779295 INFO DEBUG - undefined
779295 INFO DEBUG - /var/www/calckey/packages/backend:
779295 INFO DEBUG -  ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  backend@ migrate: `typeorm migration:run -d ormconfig.js`
779296 INFO DEBUG - Exit status 1
779296 INFO DEBUG -  ELIFECYCLE  Command failed with exit code 1.
779297 INFO DEBUG - + ynh_exit_properly

I don't understand what we are supposed to do during the restore process :( https://github.com/lapineige/calckey_ynh/blob/master/scripts/restore#L84

lapineige commented 1 year ago

Hey @ThatOneCalculator the sha256sum of the archive changed, do you know why ?

Of which archive? We did reupload our docker image due to an issue.

The tar.gz.