Saturday, July 08, 2023
apps@conference.yunohost.org
July
Mon Tue Wed Thu Fri Sat Sun
          1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
           

[01:53:19] <Yunohost Git/Infra notifications> App django_example_ynh failed all tests in job [#16919](https://ci-apps.yunohost.org/ci/job/16919) :(
[04:35:18] *** dancat changed the title to "test"
[04:45:08] <Yunohost Git/Infra notifications> App mopidy failed all tests in job [#16926](https://ci-apps.yunohost.org/ci/job/16926) :(
[09:45:19] <Yunohost Git/Infra notifications> App tube rises from level 7 to 8 in job [#16936](https://ci-apps.yunohost.org/ci/job/16936) !
[16:30:45] <lapineige> https://github.com/YunoHost-Apps/calckey_ynh/issues/24#issuecomment-1625455311
Hello,
Do you know what's wrong with the app and/or catalog ?
[16:42:51] <Aleks (he/him/il/lui)> guessing their version of YunoHost is not up to date ...
[16:59:52] <Aleks (he/him/il/lui)> https://mastodon.tn/@nizarus/110679526373904779
[17:47:51] <lapineige> I have another question about Peertube remote runner:
Do you know if there is any way to test such an app in the CI ?
It needs to be registered : https://docs.joinpeertube.org/maintain/tools#register
I use 2 parameters for that https://github.com/YunoHost-Apps/peertube\_remote\_runner\_ynh/blob/testing/manifest.toml#L40
Like this https://github.com/YunoHost-Apps/peertube\_remote\_runner\_ynh/blob/testing/scripts/install#L66

But obviously that can't work in CI, and also there is not webpage to check in the NGINX test.

Can I bypass them ?
[17:56:21] <lapineige> I also would love some guidances on the use of the NPM module:
[18:03:07] <lapineige> Did I install NPM in a wrong way ? Or is this command not accurate ?
[18:03:18] <lapineige> (thanks in advance 🙂
[18:03:34] <Tag> You could preinstall peertube with tests.toml o/ https://github.com/YunoHost/example_ynh/blob/master/tests.toml.example#L19-L25
[18:04:20] <lapineige> I also would love some guidances on the use of the NPM module:

```
sudo -u peertube_remote_runner env PATH=/opt/node_n/n/versions/node/18/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NODE_CONFIG_DIR=/var/www/peertube_remote_runner/config NODE_ENV=production /opt/node_n/n/versions/node/18/bin/npm peertube-runner register --url runner_url --registration-token runner_token --runner-name peertube_remote_runner_domain.tld
Info: DEBUG - Unknown command: "peertube-runner"
```

That is the command : https://github.com/YunoHost-Apps/peertube\_remote\_runner\_ynh/blob/testing/scripts/install#L66
[18:05:41] <lapineige> Wow that would be so huge 😅
[18:10:18] <lapineige> And too complex. But thanks for sharing this, it's awesome to be able to do this 😲
[18:48:32] <orhtej2> this needs to be done before `popd` [here](https://github.com/YunoHost-Apps/peertube_remote_runner_ynh/blob/070cedf869ff05f38a96b6e07041fbe96b547c41/scripts/install#L31), basically working directory is wrong hence `npm` has no clue where to look for `peertube-runner`
[18:55:07] <Tag> Also I guess `runner_url` should be named `peertube_url`
[19:10:47] <Yunohost Git/Infra notifications> [apps] @ericgaspar pushed 1 commit to master: Create libremdb.png ([0ff3a481](https://github.com/YunoHost/apps/commit/0ff3a481596daecff18c8de9eb0509f7af1451ad))
[19:15:35] <lapineige> > this needs to be done before `popd` [here](https://github.com/YunoHost-Apps/peertube_remote_runner_ynh/blob/070cedf869ff05f38a96b6e07041fbe96b547c41/scripts/install#L31), basically working directory is wrong hence `npm` has no clue where to look for `peertube-runner`

what do you mean by "before" ? you mean before `pushd` ?
[19:20:14] <Tag> in between pushd and popd
[19:22:35] <lapineige> but that is where the command is, right ?
[19:23:00] <lapineige> I tried to put new pushd+popd commands around this command
[19:23:29] <Tag> > but that is where the command is, right ?

nope
[19:23:34] <Tag> > I tried to put new pushd+popd commands around this command

with ynh_use_nodejs ?
[19:23:45] <lapineige> yes
[19:23:48] <lapineige> it fails
[19:26:48] <Tag> mmh not sure why you call $ynh_npm here tho
[19:29:04] <lapineige> I'm not sure 😂
[19:37:05] <lapineige> I copy-pasted it fromm peertube package
[19:39:31] <orhtej2> > it fails

log?
[19:40:00] <lapineige> same with `Unknown command: "peertube-runner"`
[19:48:54] <orhtej2> I mean I tested on Windows so take it with grain of salt but in my case package installed in `node_modules` locate level above working directory and `peertube-runner` worked as long as invoked as mentioned in [the docs](https://github.com/Chocobozzz/PeerTube/tree/develop/packages/peertube-runner#run), that means with `node` rather than `npm` and specifying full relative path from current working directory
[19:50:19] <lapineige> > I mean I tested on Windows so take it with grain of salt but in my case package installed in `node_modules` locate level above working directory and `peertube-runner` worked as long as invoked as mentioned in [the docs](https://github.com/Chocobozzz/PeerTube/tree/develop/packages/peertube-runner#run), that means with `node` rather than `npm` and specifying full relative path from current working directory

And not with relative path ?
[19:50:42] <lapineige> I don't know the difference between npm and node ?
[19:51:00] <orhtej2> also `peertube_url` and `runner_token` are string literals, shouldn't they be `$peertube_url` and `$runner_token`?
[19:51:27] <orhtej2> > I don't know the difference between npm and node ?

me neither, I just paste commands from the docs verbatim :P
[19:52:52] <orhtej2> As explained [here](https://stackoverflow.com/questions/41675848/what-is-the-difference-between-node-js-runtime-and-npm-package-manager-options-w)

> Now, Node.js runtime is basically what will understand your javascript code and execute it to produce a result.
>
> Npm package manager is a tool which will allow you to install third party libraries (other people's code) by using the command line.
[20:36:14] <orhtej2> logs or it did not happen :P
[20:36:34] <lapineige> If I switch to node, I have a big MODULE NOT FOUND 😕
[20:36:34] <lapineige> > also `peertube_url` and `runner_token` are string literals, shouldn't they be `$peertube_url` and `$runner_token`?

Oh yeah, I forgot 😂
[20:36:45] <lapineige> > As explained [here](https://stackoverflow.com/questions/41675848/what-is-the-difference-between-node-js-runtime-and-npm-package-manager-options-w)
>
> > Now, Node.js runtime is basically what will understand your javascript code and execute it to produce a result.
> >
> > Npm package manager is a tool which will allow you to install third party libraries (other people's code) by using the command line.

If I switch to node, I have a big MODULE NOT FOUND
[20:36:49] <Tag> Soon 👀 https://ci-apps-dev.yunohost.org/ci/job/8128
[20:36:49] <Tag> Ah, it crash because there's no default values for things in the manifest.toml :(
[21:01:48] <lapineige> 🎉
[21:01:49] <lapineige> I found it ! 🎉
The app dev helped me, it works !!
[21:17:53] <orhtej2> > I found it ! 🎉
> The app dev helped me, it works !!

https://github.com/YunoHost-Apps/peertube_remote_runner_ynh/blob/50bc6d3d3395fe206cec68a6492dab55ce6079e6/conf/systemd.service#L12
[21:18:04] <orhtej2> Likely need a change here as well
[22:43:37] <orhtej2> #fame: https://lemmy.one/post/848031