Friday, September 01, 2023
apps@conference.yunohost.org
September
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
 
             

[00:28:05] <Yunohost Git/Infra notifications> App mailman failed all tests in job [#18224](https://ci-apps.yunohost.org/ci/job/18224) :(
[06:51:44] <Yunohost Git/Infra notifications> [wordpress_ynh] @tituspijean [commented](https://github.com/YunoHost-Apps/wordpress_ynh/pull/228#discussion_r1312641291) on pull request #228 fix maintenance: Oh, I did not check files permissions with my altered command.
[10:44:33] <lapineige> > add some options to configure whatever frequent tool is used by many apps

Any insight on this would be very appreciated btw 🙂
[10:47:07] <Aleks (he/him/il/lui)> not sure what you are referring to, but sounds like something that could be worked in further iteration, already having the "basic" stuff like manifest + scripts prefilled with instructions from a webui is a huge step
[11:36:26] <lapineige> this is already done 🙂
[11:38:59] <lapineige> > not sure what you are referring to

I wonder if they are other tools like php/nodeJS (npm, …) that are commonly used across many apps and that would be worth implementing.
The first one I'm thinking about is for the apps that depends on Elixir, and almost always needs to install a custom repository / erlang version and so on
[12:05:45] <Yunohost Git/Infra notifications> App shellinabox goes down from level 8 to 6 in job [#18233](https://ci-apps.yunohost.org/ci/job/18233)
[14:39:34] <Yunohost Git/Infra notifications> App kodi failed all tests in job [#18237](https://ci-apps.yunohost.org/ci/job/18237) :(
[14:56:37] <lapineige> I have good news : I've finished the final step that was required to generate the app files and download it (creating and downloading the actual zip file).
I should be able to put a demo online during this week-end 🙂 (if I can master Yunost flask app ^^)
[15:01:51] <Aleks (he/him/il/lui)> (eeh Yunohost flask app is super old / unmainainted, take it with a grain of salt ;P)
[15:02:44] <Aleks (he/him/il/lui)> feel free to have a look a the stuff in the app-store PR though : https://github.com/YunoHost/apps/tree/app-store/store I've included the nginx snippet, systemd snippet, gunicorn etc
[15:02:48] <lapineige> (yeah, I saw this 😉)
[15:04:19] <lapineige> > <@Alekswag:matrix.org> feel free to have a look a the stuff in the app-store PR though : https://github.com/YunoHost/apps/tree/app-store/store I've included the nginx snippet, systemd snippet, gunicorn etc

I don't understand how it's related ? (appart from the flask server starting commands that might be useful)
[15:05:23] <Aleks (he/him/il/lui)> it's related in the sense that if you want to actually deploy the app, you're gonna want to have a systemd service + nginx conf to actually serve it rather than uh, just starting the development server and yolo-exposing port on the outside ;P
[15:05:34] <Aleks (he/him/il/lui)> or maybe i'm mistaking what you're aiming for
[15:06:11] <lapineige> oh yes I understand now
[15:06:38] <Aleks (he/him/il/lui)> (+ gunicorn is the equivalent of php-fpm, basically you don't want a single worker for your app otherwise a single request which requires a bunch of computing is going to freeze every other pending HTTP requests as long as the computation is not complete)
[15:06:43] <Aleks (he/him/il/lui)> ah :D
[15:06:43] <lapineige> (I'd be a pain if I had to do it myself 😅)
[15:06:50] <lapineige> I planned to count on the flask app to do that for me (I'd be a pain if I had to do it myself 😅)
[15:07:02] <Aleks (he/him/il/lui)> well yeah you can ... try to use the flask app, i have no idea how broken or working it is haha
[15:07:22] <lapineige> > <@Alekswag:matrix.org> (+ gunicorn is the equivalent of php-fpm, basically you don't want a single worker for your app otherwise a single request which requires a bunch of computing is going to freeze every other pending HTTP requests as long as the computation is not complete)

thanks, I forgot about this, it's a very useful tool indeed
[15:07:32] <lapineige> > <@Alekswag:matrix.org> well yeah you can ... try to use the flask app, i have no idea how broken or working it is haha

I have hope 😄
[15:08:20] <lapineige> And if it's not… well, I'd better fix it than make my own app just for it.
(well, that could be something funny (a Yunohost app to generate Yunohost apps, but no ^^)
[15:09:38] <lapineige> > I have hope 😄

I mean… it shouldn't be *that* complicated, should it ?
[15:12:21] <lapineige> Oh wow… I took a look at the code. I've forgotten Yunohost packaging first days… 😆
Ok so I'm gonna use the package generator to generate a new Flask\_packaging\_v2 app I think 😂
[15:13:33] <lapineige> Ok now I remember why I had hope: https://github.com/YunoHost-Apps/flask_ynh/pull/10
There is a rewrite from one contributor that seems to do the job !
[15:20:34] <Aleks (he/him/il/lui)> 😬
[16:42:11] <lapineige> > Ok now I remember why I had hope: https://github.com/YunoHost-Apps/flask_ynh/pull/10
> There is a rewrite from one contributor that seems to do the job !

Soooo… it's broken, yes 😂
[16:46:47] <Aleks (he/him/il/lui)> monthypythoniwarnedyou.mp4
[16:51:38] <Aleks (he/him/il/lui)> https://mastodon.social/@ButterflyOfFire@mstdn.fr/110989969107052154
[16:52:28] <Aleks (he/him/il/lui)> >ⵎⵉⵙⴽⵉ.todz.ynh.fr

rily
[16:52:29] <Aleks (he/him/il/lui)> my god it's a real domain name o.o
[16:58:55] <eric_G> les interactions sont tellement brutales 😱
[17:00:34] <Yunohost Git/Infra notifications> [apps] @yunohost-bot pushed 1 commit to update_app_levels: Update app levels according to CI results ([ea2171ac](https://github.com/YunoHost/apps/commit/ea2171ac650f21f6ef7708e64d225040b75ffe4a))
[17:01:07] <Yunohost Git/Infra notifications> [apps] @ericgaspar pushed 2 commits to master ([1c3ca41e6315...8be717db7325](https://github.com/YunoHost/apps/compare/1c3ca41e6315...8be717db7325))
[17:01:08] <Yunohost Git/Infra notifications> [apps] @ericgaspar merged [pull request #1722](https://github.com/YunoHost/apps/pull/1722): Update app levels according to CI results
[17:01:14] <Yunohost Git/Infra notifications> [apps/master] Update app levels according to CI results - root
[17:01:17] <Yunohost Git/Infra notifications> [apps/master] Merge pull request #1722 from YunoHost/update_app_levels Update app levels according to CI results - eric_G
[17:01:49] <lapineige> > <@Alekswag:matrix.org> my god it's a real domain name o.o

et cette personne traduit tout ce qui bouge 😄
[17:04:05] <eric_G> last week update_app_levels Update app levels were not merged. we need to restart the update app levels process
[17:16:50] <lapineige> Lapin compris ? 🤔
[17:51:31] <Aleks (he/him/il/lui)> @_@
[17:55:08] <Aleks (he/him/il/lui)> eeeh im confused, the PR was just merged so we can't "restart the update app level process", there's nothing to update 😅 not really a big deal as long as there's no false-negative tho
[17:56:37] <Aleks (he/him/il/lui)> major regressions were : weblate. wireguard_client, trilium, pihole, peertube, ntfy, bibucstriim and akkoma
[17:59:57] <lapineige> Wait what, how can I check that ? (regressions after what update ?)
It's for the akkoma package
[18:03:18] <tituspijean> There's a bug with wireguard_client's tests btw
[18:08:44] <Aleks (he/him/il/lui)> > Wait what, how can I check that ? (regressions after what update ?)
> It's for the akkoma package

regressions on ci-apps.yunohost.org tests (which may be temporary issues, CI/core issues, or actual app regressions)
[18:30:34] <lapineige> > Wait what, how can I check that ? (regressions after what update ?)
> It's for the akkoma package

ok, found it, it's a real issue
[18:56:50] <Solrac> Hello. I'm trying make an app for motionEye, however, I'm leaning towards the development version, since the Python2 version seems to be in a bit of a maintenence mode, and most of the development efforts are on the Python3 version.

They both use pip for installation, but the dev version is using the _current_ commit rather than pre-releases.

Should I stick with the dev version or should I use the knowwn-stable python2 version?
[18:57:15] <lapineige> > Soooo… it's broken, yes 😂

Installation works at least 🙂
[18:57:45] <lapineige> > since the Python2 version seems to be in a bit of a maintenence mode

Yes, don't go for any Python2 stuff, it will only mean troubles
[18:58:39] <lapineige> > Should I stick with the dev version or should I use the knowwn-stable python2 version?

Dev version. In lack of a better solution, you could try to anchor it to a working commit.
Or simply warn about it being unstable
[19:06:12] <Solrac> > > Should I stick with the dev version or should I use the knowwn-stable python2 version?
>
> Dev version. In lack of a better solution, you could try to anchor it to a working commit.
> Or simply warn about it being unstable

That's fair. 🤔
Though, considering they're downloading the current commit, how can I skip the sha256 check?
[19:06:36] <lapineige> I don't know if it's possible
[19:07:02] <lapineige> But if you can download a specific commit, then you can only update it from time to time, and adjust the sha256sum accordingly
[19:11:47] <Solrac> What about git clone? 🤔
[19:12:29] <Solrac> And considering that the install is done via pip, is it safe to assume I should make a venv to install in?
[19:14:15] <lapineige> https://aria.im/_matrix/media/v1/download/matrix.lapineige.fr/CPZvcTqAqnGYpdQjsbzoABbL
[19:14:36] <lapineige> Kudos to the contributor who updated that app to a working level 🙂
[19:14:58] <lapineige> > <@lsolrac:matrix.org> And considering that the install is done via pip, is it safe to assume I should make a venv to install in?

always make a venv, to isolate it from the rest of the system
[19:15:17] <lapineige> > <@lsolrac:matrix.org> What about git clone? 🤔

I dunno, is that a possibility for that software ?
[19:16:07] <lapineige> And if it's in a git(hub ?) repository, then use the tarball.gz or whatever archive file it provides, with corresponding sha256sum 🙂
[19:17:08] <Solrac> > I dunno, is that a possibility for that software ?

Look at Step 3 of the install. Is that not the same as Downloding as Zip?
https://github.com/motioneye-project/motioneye/tree/dev#installation

If so, I figure maybe `git clone` for install, and `git pull` for updates might not be a bad idea
[19:17:53] <lapineige> I'd argue against git clone/pull as it's not really yunohost-ish, and harder to integrate
[19:18:39] <lapineige> From your link, it's simple, use `https://github.com/motioneye-project/motioneye/archive/dev.tar.gz` as source for instance
[19:18:42] <Solrac> > I'd argue against git clone/pull as it's not really yunohost-ish, and harder to integrate

In all honesty, I'd agree 🤔
[19:19:33] <lapineige> Or any commit, like this : https://github.com/motioneye-project/motioneye/commit/ae136a4c45034839db10388dd7cd5ad7ecfe2f21 -> https://github.com/motioneye-project/motioneye/archive/ae136a4c45034839db10388dd7cd5ad7ecfe2f21.tar.gz
[19:31:14] <lapineige> > sent an image.

https://github.com/lapineige/flask_ynh/commit/870e4f9423086beab51be0c65c6e525320939ce2
Aleks (he/him/il/lui) can you help me here ?
I wonder how I could disable all sql stuff if no database is installed
[19:32:52] <Aleks (he/him/il/lui)> ogod all those ynh_replace_string should be replaced with `ynh_add_config` and the regular `__FOO_BAR__` instead of `__YNH_FOO_BAR__`
[19:33:08] <lapineige> The whole SQLAlchemy thing is failling because there is no db configured
[19:33:30] <lapineige> > <@Alekswag:matrix.org> ogod all those ynh_replace_string should be replaced with `ynh_add_config` and the regular `__FOO_BAR__` instead of `__YNH_FOO_BAR__`

Here we go 🙂
[19:35:47] <Aleks (he/him/il/lui)> eeeh i guess you gotta add a whole bunch of "if"s depending on if there's a database
[19:35:50] <Aleks (he/him/il/lui)> but hmpf that adds complexity
[19:36:16] <lapineige> yeah, clearly
[19:36:41] <lapineige> I'd admit it would be easier on the packaging side to always have a database, even if unused
[19:37:02] <Aleks (he/him/il/lui)> yup..
[19:37:30] <lapineige> > <@Alekswag:matrix.org> ogod all those ynh_replace_string should be replaced with `ynh_add_config` and the regular `__FOO_BAR__` instead of `__YNH_FOO_BAR__`

Oh no in fact we can't : this should manage several database type and setup ☹️ https://github.com/lapineige/flask_ynh/blob/rewrite/scripts/install#L278
[19:37:55] <Aleks (he/him/il/lui)> T_T
[19:38:35] <lapineige> For now, I'll remove all the common ones
[19:38:35] <Aleks (he/him/il/lui)> or we just install sqlite by default because if you need mysql/postgresql then fuck it deploy it manually
[19:40:33] <Aleks (he/him/il/lui)> also i'm not conviced that the whole deal with a separate wsgi.py and bureaucracy in `__init__.py` is necessary, i did not understand it at the time, but you can just keep your regular `app.py` stuff and just use `app:app` when calling gunicorn here : https://github.com/YunoHost/apps/blob/app-store/store/systemd.conf.example#L10
[19:41:02] <lapineige> I don't understand it, but does it matter ? ^^
[19:41:06] <Aleks (he/him/il/lui)> `app:app` meaning "In app.py, use the app object"
[19:41:46] <Aleks (he/him/il/lui)> weeell it matters to try to keep stuff simple yes 😅
[19:42:22] <Aleks (he/him/il/lui)> i guess it can work with some stuff similar to what I wrote in the first place but it's just unecessary complex ... but simplifying stuff requires refactoring 😅
[19:46:37] <lapineige> Do we agree this $YNH\_APP\_ARG\_DOMAIN should be replaced by `__DOMAIN__` (it's not packaging v2) ?
[19:46:57] <Aleks (he/him/il/lui)> you mean `__DOMAIN__` should be replaced by `$domain` ?
[19:47:39] <lapineige> I dunno, here https://github.com/lapineige/flask\_ynh/blob/rewrite/scripts/install#L27, what should be the value now in packaging v*1* ?
[19:47:45] <lapineige> I dunno, here https://github.com/lapineige/flask\_ynh/blob/rewrite/scripts/install#L27, what should be the value now in packaging v__1__ ?
[19:47:53] <lapineige> I dunno, here https://github.com/lapineige/flask\_ynh/blob/rewrite/scripts/install#L27, what should be the value now in packaging v**1** ?
[19:48:57] <Aleks (he/him/il/lui)> eeh not sure what you mean haha ... that line 27 is correct, you have to have this for being able to use `$domain` and `__DOMAIN__`, yes ? 😅
[19:49:26] <Aleks (he/him/il/lui)> (i mean in the context of packaging v1)
[19:49:40] <lapineige> I don't remember 😂
[19:57:51] <Yunohost Git/Infra notifications> [apps] @alexAubin pushed 1 commit to app-store: appstore: display unusual ram requirement, arch limitation, pre-install notes, emojis ([352aeac1](https://github.com/YunoHost/apps/commit/352aeac1464eb12729c779bc93a10862162deed3))
[20:04:01] <Solrac> Sorry to bother again, but are there any exammples for python apps? Its been forever since I last made a venv and would like to see how other apps do it 😅
[20:06:43] <lapineige> I forgot what were my examples, but what I saw allowed me to do that : https://github.com/YunoHost-Apps/13ft_ynh/tree/testing
(warning : not sure if 100% right)
[20:10:41] <Solrac> ty c:
[20:15:02] <Aleks (he/him/il/lui)> venv is usually something like `python3 -m venv venv`, `source venv/bin/activate`, and `pip install -r requirements.txt`
[20:18:08] <lapineige> Aleks (he/him/il/lui): if you want to have a look https://github.com/h3ndrik/flask_ynh/pull/1#issuecomment-1703276416
[20:24:04] <Solrac> is the systemd.service file going to be used for starting or stopping the service? Cause MotionEye has their own 🤔
[20:24:36] <Solrac> I thought about using the unit to start their service
[20:24:51] <Aleks (he/him/il/lui)> not sure what you mean by "has their own"
[20:25:45] <lapineige> Yes. "Simply" adapt their file to Yunohost context (paths, user…)
[20:26:47] <Solrac> > <@Alekswag:matrix.org> not sure what you mean by "has their own"

https://github.com/motioneye-project/motioneye/tree/dev/motioneye/extra
[20:27:11] <Solrac> > Yes. "Simply" adapt their file to Yunohost context (paths, user…)

neat, so I can just edit theirs and add it to my /conf folder and install those instead?
[20:28:06] <Aleks (he/him/il/lui)> i would rather start from Yunohost's recommended systemd conf in example_ynh and replace the ExecStart statement
[20:28:28] <Solrac> oh, sure
[20:29:50] <lapineige> most of the time, you can copy paste their content into Yunohost default, and adapt 3-5 lines
[20:30:07] <lapineige> (mostly app/group owner, execStart command, working directory)
[20:44:31] <Yunohost Git/Infra notifications> App trilium rises from level 1 to 8 in job [#18205](https://ci-apps.yunohost.org/ci/job/18205) !
[21:04:19] <lapineige> Well, I don't understand at all how I'm supposed to deploy my app in this setup.
I can't just drop my files and load the page… 😕
[21:05:11] <lapineige> I suppose it's gunicorn which determines which python file is launched first… but I don't see any setting
[21:05:44] <Aleks (he/him/il/lui)> yes it was never really finished in that regard 😅
[21:06:00] <lapineige> The rest mainly import stuff from `app/`, and I would simply want to replace everything with my files
[21:06:32] <Aleks (he/him/il/lui)> i guess it should somewhat work like my_webapp where it initializes stuff with some `app.py` with a very basic hello world, and then people should somehow git clone their actual app idk
[21:06:39] <Aleks (he/him/il/lui)> yeah
[21:07:28] <lapineige> yeah, I expected that actually, but I don't see anything to simply drop the files
[21:08:09] <lapineige> I understand that these wsgi.py/manage.py are loading the rest… but I don't see how
[21:08:42] <lapineige> I'm _that_ close to remake the whole package with just a simple "load my main.py file and stay quiet" 😂
[21:16:02] <Aleks (he/him/il/lui)> if you want i can have a look at the draft package you have a try to simplify stuff
[21:16:02] <Aleks (he/him/il/lui)> 😬 yeah that might be what i was suggesting before, not sure about the exact detail
[21:16:03] <lapineige> > for now I'm trying to figure out how to deploy my stuff, by finding the simplest working scenario (*spoiler: it's painful*)

And then maybe I can adapt the package… not sure, have seen the complexity, as a newbie
[21:16:03] <lapineige> well if you've got some time and energy… it's always appreciated
[21:16:03] <lapineige> for now I'm trying to figure out how to deploy my stuff, by finding the simplest working scenario (*spoiler: it's painful*)
[21:32:46] <lapineige> Here: https://flask.palletsprojects.com/en/2.1.x/tutorial/deploy/
I also see that I might have to manage the dependencies… (ok, found a way to generate requirements.txt and manage it)
[22:25:43] <lapineige> Ok, I found my way to actually run gunicorn and some script… but now I have a `The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.` on the index page 😅
[23:01:46] <lapineige> So… the app generator is online 👀
[23:02:03] <lapineige> Ok I understood… For the record, if you install a flask wep app on a subfolder, in flask you can't just deploy it to /, as in `@app.route("/", methods=['GET', 'POST'])`, but you need to serve it in the final folder `@app.route("/folder/", methods=['GET', 'POST'])`.
I believe this should be documented in the package admin documentation.
[23:03:23] <Aleks (he/him/il/lui)> > Ok I understood… For the record, if you install a flask wep app on a subfolder, in flask you can't just deploy it to /, as in `@app.route("/", methods=['GET', 'POST'])`, but you need to serve it in the final folder `@app.route("/folder/", methods=['GET', 'POST'])`.
> I believe this should be documented in the package admin documentation.

that's supposed to be what the url_prefix here is for : https://github.com/YunoHost-Apps/flask_ynh/blob/master/sources/app/app.py#L5
[23:03:41] <lapineige> oooooh 💡
[23:03:46] <Aleks (he/him/il/lui)> (but anyway I also see `from .settings import *` which is kinda bad practice aaaaaaa)
[23:04:15] <lapineige> So I now have a better setting to document 😄
[23:04:18] <Aleks (he/him/il/lui)> refactorallthethings.jpg
[23:05:39] <lapineige> Do you know if adapting`main = Blueprint('main', __name__, url_prefix=SITE_ROOT)` to `app = Blueprint('main', __name__, url_prefix=SITE_ROOT)` where in my case I'm using `@app.route` is valid ?
[23:06:24] <Aleks (he/him/il/lui)> sure
[23:20:17] <lapineige> Oh, it doesn't work with app.config\['SECRET\_KEY\] and so on… Then I need to readapt everything in the code 🤔
This definitly should be documented in the app doc, as it has big implications.
(for now, I will simply add that prefix variable myself on each page 😅 #Quick&Dirty)
[23:20:32] <lapineige> Oh, it doesn't work with app.config\['SECRET\_KEY\] and so on… Then I need to readapt everything in the code 🤔


This definitly should be documented in the app doc, as it has big implications.


(for now, I will simply add that prefix variable myself on each page 😅 #Quick&Dirty)