Tuesday, May 21, 2024
dev@conference.yunohost.org
May
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
   
             

[00:04:48] <Yunohost Git/Infra notifications> [issues] CodeShakingSheep opened [issue #2398](https://github.com/YunoHost/issues/issues/2398): Custom app permissions are overridden after every app update
[00:04:48] <Yunohost Git/Infra notifications> [issues] CodeShakingSheep labeled :birthday: feature on [issue #2398](https://github.com/YunoHost/issues/issues/2398): Custom app permissions are overridden after every app update
[00:19:58] <Yunohost Git/Infra notifications> [yunohost] 🔴 Pipeline [#1298240272](https://gitlab.com/YunoHost/yunohost/-/pipelines/1298240272) failed on branch dev
[00:20:50] <Yunohost Git/Infra notifications> [issues] OniriCorpe labeled :space_invader: bug on [issue #2398](https://github.com/YunoHost/issues/issues/2398): Custom app permissions are overridden after every app update
[00:20:51] <Yunohost Git/Infra notifications> [issues] OniriCorpe labeled :wrench: Configuration on [issue #2398](https://github.com/YunoHost/issues/issues/2398): Custom app permissions are overridden after every app update
[00:20:51] <Yunohost Git/Infra notifications> [issues] OniriCorpe unlabeled :birthday: feature on [issue #2398](https://github.com/YunoHost/issues/issues/2398): Custom app permissions are overridden after every app update
[00:20:52] <Yunohost Git/Infra notifications> [issues] OniriCorpe labeled :package: App management on [issue #2398](https://github.com/YunoHost/issues/issues/2398): Custom app permissions are overridden after every app update
[07:56:44] <Yunohost Git/Infra notifications> [yunorunner] dependabot[bot] pushed 1 commit to dependabot/pip/requests-2.32.0: --- updated-dependencies: - dependency-name: requests dependency-type: direct:production ... Signed-off-by: dependabo... ([ec3950b1](https://github.com/YunoHost/yunorunner/commit/ec3950b1924f61304a769066fb54d7aa676cc93b))
[07:56:44] <Yunohost Git/Infra notifications> [yunorunner] dependabot[bot] created new branch dependabot/pip/requests-2.32.0
[07:56:44] <Yunohost Git/Infra notifications> [yunorunner] dependabot[bot] labeled dependencies on [pull request #62](https://github.com/YunoHost/yunorunner/pull/62): Bump requests from 2.31.0 to 2.32.0
[07:56:44] <Yunohost Git/Infra notifications> [yunorunner] dependabot[bot] opened [pull request #62](https://github.com/YunoHost/yunorunner/pull/62): Bump requests from 2.31.0 to 2.32.0
[08:15:52] <Yunohost Git/Infra notifications> [yunohost] chri2 opened [pull request #1847](https://github.com/YunoHost/yunohost/pull/1847): Update getopts to accept arguments that are valid arguments to echo
[08:16:12] <Yunohost Git/Infra notifications> [yunohost] chri2 edited [pull request #1847](https://github.com/YunoHost/yunohost/pull/1847): Update getopts to accept arguments that are valid arguments to echo
[08:16:45] <ChriChri> > <@chrichri:librem.one> I know why: I tried to make it recognize the argument `-n`:
> https://github.com/YunoHost/yunohost/blob/d5e054fe80002862bd5966d61b20e9fafcf0578e/helpers/getopts#L80

https://github.com/YunoHost/yunohost/pull/1847
[08:18:51] <Yunohost Git/Infra notifications> [yunohost] Salamandar approved [pull request #1847](https://github.com/YunoHost/yunohost/pull/1847#pullrequestreview-2067892770) Update getopts to accept arguments that are valid arguments to echo
[08:39:30] <selfhoster1312> 🤷‍♀️️ bash 🤯️
[11:38:45] <Aleks (he/him/il/lui)> The highway to (s)hell
[17:02:10] <selfhoster1312> Aleks (he/him/il/lui), something like serde really makes it easier to manipulate data structures and validate them https://pypi.org/project/serde/
[17:02:37] <selfhoster1312> because once it's parsed into the struct (for example a Panel / Section / Option) then you can be sure the data is correct
[17:02:45] <selfhoster1312> and have associated methods, etc..
[17:03:39] <selfhoster1312> because right now there's like 4 steps to parse/validate/manipulate the "format description" "levels" and that's really error prone if you'd like to change something
[17:04:06] <Aleks (he/him/il/lui)> are you looking at dev or bookworm branch
[17:04:13] <selfhoster1312> dev
[17:04:21] <Aleks (he/him/il/lui)> well
[17:04:22] <Aleks (he/him/il/lui)> 😬
[17:04:22] <selfhoster1312> should i look at bookworm branch for major changes to the configpanel helpers?
[17:04:25] <Aleks (he/him/il/lui)> what if i told you
[17:04:32] <selfhoster1312> oooh :D
[17:04:38] <Aleks (he/him/il/lui)> the confpanels were refactored in bookworm using pydantic
[17:05:17] <selfhoster1312> ```

class ConfigPanel:
entity_type = "config"
save_path_tpl: Union[str, None] = None
config_path_tpl = "/usr/share/yunohost/config_{entity_type}.toml"
save_mode = "full"
settings_must_be_defined: bool = False
filter_key: "FilterKey" = (None, None, None)
config: Union[ConfigPanelModel, None] = None
form: Union["FormModel", None] = None
raw_settings: "RawSettings" = {}
hooks: "Hooks" = {}
```
[17:05:20] <selfhoster1312> that looks much better
[17:05:50] <selfhoster1312> is it fully backwards compatible?
[17:06:04] <selfhoster1312> and is it that branch you said was really slow?
[17:06:34] <Aleks (he/him/il/lui)> i don't know / i don't think it's slower or faster than the current code in dev
[17:06:59] <Aleks (he/him/il/lui)> what's slow is loading the python interpreter + the libs + argparse and uuuuh idk it's been a while since i've done profiling
[17:07:01] <selfhoster1312> idk you were the one who mentioned the settings system was slow
[17:07:05] <selfhoster1312> ah yes
[17:07:55] <Aleks (he/him/il/lui)> more precisely, what's slow is the regenconf, because it calls `yunohost settings get` many time, but it's not the "settings get" per se which is slow, it's yunohost commands calls adding up
[17:08:16] <selfhoster1312> yeah because starting up python is slow + loading everything every time...
[17:08:19] <Aleks (he/him/il/lui)> but this got improved by some commit i pointed to the time we discussed it
[17:08:24] <selfhoster1312> yes :) :)
[17:08:27] <Aleks (he/him/il/lui)> so idk i didn't redo any real profiling since then
[17:09:24] <selfhoster1312> well anyway i don't know if it will be any use but i'll continue my implementation and add tests/documentation where i can
[17:09:55] <selfhoster1312> what are the major changes on bookworm that i should look out for ?
[17:10:33] <selfhoster1312> in general, not juts configpanel
[17:10:39] <Aleks (he/him/il/lui)> in the config panel ? uuuh idk, everything i suppose, i'm not the one who refactored this so i can't really tell exactly
[17:10:41] <selfhoster1312> i mean apart from portal-api obviously
[17:10:43] <Aleks (he/him/il/lui)> hmmm
[17:11:01] <Aleks (he/him/il/lui)> https://forum.yunohost.org/t/alpha-stage-testing-for-yunohost-12-0-on-debian-bookworm-but-not-yet-for-the-bullseye-bookworm-migration/28188 i guess
[17:11:54] <selfhoster1312> ok so nothing major except for apps/helpers then
[17:12:10] <selfhoster1312> (and the portal-api :P)
[17:35:17] <selfhoster1312> sorry to ask again, is the new config panel system compatible with the old one? or was there a migration?
[17:35:56] <Aleks (he/him/il/lui)> it's compatible, yes
[17:36:03] <selfhoster1312> ok thx :)
[17:36:06] <selfhoster1312> so i'll rather look at it
[17:36:26] <Aleks (he/him/il/lui)> just a had to patch a few things here and there for config panels in the wild because ofc the old code was too permissive
[17:36:58] <selfhoster1312> yes... it was... very permissive and full of frankencode :P
[18:07:45] <selfhoster1312> btw i don't know where that should be documented but i found this snippet useful: https://github.com/selfhoster1312/yunohost-rs?tab=readme-ov-file#test-something-about-the-python-version
[18:08:01] <selfhoster1312> i think it would be useful written somewhere
[18:11:27] <Aleks (he/him/il/lui)> did you read the bash part before callign it frankencode ? ;P
[18:11:43] <selfhoster1312> bash part????
[18:11:52] <selfhoster1312> no i read a javascript interpreter and my eyes bled :P
[18:11:55] <Aleks (he/him/il/lui)> axaxaxa
[18:12:21] <Aleks (he/him/il/lui)> behold https://github.com/YunoHost/yunohost/blob/dev/helpers/config
[18:12:25] <selfhoster1312> is the bash part a leftover myth from an old version of yunohost? or is it still there and i somehow missed it??
[18:12:35] <selfhoster1312> oh that
[18:12:38] *selfhoster1312 runs away hiding
[18:13:42] <Aleks (he/him/il/lui)> ah actually there's also https://github.com/YunoHost/yunohost/blob/dev/helpers/utils#L726
[18:14:01] <ljf> my favorite part :p
[18:14:11] <selfhoster1312> those helpers is typically what i would like to rewrite in python/rust/go/whateverelse
[18:14:13] <selfhoster1312> ^^
[18:14:14] <Aleks (he/him/il/lui)> :D
[18:14:35] <Aleks (he/him/il/lui)> javascript ?
[18:14:43] <selfhoster1312> ok maybe not "whatever" else :P
[18:14:55] <selfhoster1312> Aleks (he/him/il/lui), are you familiar with the Wat?
[18:15:17] <Aleks (he/him/il/lui)> i am very familiar with the wat
[18:15:39] <selfhoster1312> https://www.destroyallsoftware.com/talks/wat <-- that wat in particular ^^
[18:15:56] <selfhoster1312> best 5 minutes to regain mental health point after writing bash or javascript :D
[18:17:08] <Aleks (he/him/il/lui)> `{} + {}` is actually not a number
[18:17:22] <selfhoster1312> ^^"
[18:18:12] <selfhoster1312> but dict += list == list in python
[18:18:36] <selfhoster1312> btw if that code has been totally rewritten you can probably close https://github.com/YunoHost/yunohost/pull/1845
[18:19:10] <Bram> > <selfhoster1312> but dict += list == list in python

no?
[18:19:18] <selfhoster1312> Bram, unfortunately yes
[18:19:24] <Bram> https://aria.im/_matrix/media/v1/download/matrix.org/TqcIHyyfIXZEygXWYZtodtET
[18:19:55] <selfhoster1312> Bram, that's where your mind is weak compared to python awakening! =)
+= is not the same as +
[18:20:09] <Aleks (he/him/il/lui)> ```
>>> D = {}
>>> D += []
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +=: 'dict' and 'list'
```
[18:20:37] <selfhoster1312> https://xmpp-upload.kl.netlib.re/upload/10IHakaJyTOp5636/ece53eba-1296-40fd-834c-3d12907a009f.png
[18:20:47] <Bram> > <selfhoster1312> Bram, that's where your mind is weak compared to python awakening! =)
> += is not the same as +

I've tested both but iirc the underlying call to the dundersocres methods go by the same method calls
[18:20:50] <ljf> If you want to rewrite `ynh_write_var_in_file`, note that this one conserve others changes made manually in the file (even comments...) and is able to adapt to a lot of sort of config file with key value mode... I guess we could rewrite it by running a known interpreter for each format, however, it's pretty difficult to keep comments, newline, orders, etc.

However, having the equivalent in python could be nice, in order to be able to use it from yunohost core code (and not just app config panel...). But, config file in yunohost core are manage in another way, so...
[18:20:53] <Salamandar> > <@Alekswag:matrix.org> `{} + {}` is actually not a number

and that is true !
[18:21:31] <Aleks (he/him/il/lui)> ```
>>> D = {"foo": "bar"}
>>> L = [1,2,3,4]
>>> D += L
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for +=: 'dict' and 'list'
```
[18:21:31] <Bram> > <selfhoster1312> sent an image.

you've swapped dict and list, those aren't the same
[18:21:36] <Aleks (he/him/il/lui)> i ain't reproducing your stuff
[18:21:47] <Bram> the list will call the iterator protocol on the object and thus it totally make sens
[18:21:49] <Aleks (he/him/il/lui)> ah
[18:22:01] <Bram> and the iterator protocol on dict is the keys
[18:22:04] <selfhoster1312> Bram, well it took me a while to understand this single line because of that python weirdness
https://github.com/YunoHost/yunohost/pull/1845/files#diff-5e01fe3313064e3147b9fbde1ad38648caa5677bc926f91b9a740fce038ebde8L483
^^
[18:22:06] <Aleks (he/him/il/lui)> checkmate, rust
[18:22:39] <selfhoster1312> ah well maybe the order matters, that still doens't make sense to me ^^
[18:22:48] <selfhoster1312> but my mind is limited :D
[18:23:14] <Bram> it totally make sens, it's the OOP principal of somehow message passing
[18:23:24] <Bram> a.method(b) != b.method(a)
[18:25:15] <Bram> also this line looks buggy tbh
[18:25:36] <Bram> anyway, here you have `list.__radd__(dict)`, which is not `dict.__radd__(list)` since this is not the same code that is called
[18:25:42] <Bram> https://docs.python.org/3/reference/datamodel.html#object.__radd__
[18:26:06] <Bram> ah no, not `__radd__`
[18:26:30] <Bram> it's `__iadd__` here for "in place add"
[18:26:40] <Bram> `__radd__` is reverse add
[18:27:18] <Bram> also the remove line looks buggy or weird, I would have written `forbidden_keywords += list(format_description["sections"].keys())` to make it more readable
[18:27:38] <selfhoster1312> https://xmpp-upload.kl.netlib.re/upload/EVyj0gEa0vHI6058/Untitled.png
[18:28:09] <selfhoster1312> > `forbidden_keywords += list(format_description["sections"].keys())`
that's way more reasonable :)
[18:28:32] <Aleks (he/him/il/lui)> https://aria.im/_matrix/media/v1/download/matrix.org/XZmgCsKwYmlvgeZbiEreUJyp
[18:28:35] <Bram> > <selfhoster1312> sent an image.

binary operators aren't always swappable ^^'
[18:29:29] <selfhoster1312> yeah i guess sorry i'm just ranting too loud about this :D
[18:30:25] <selfhoster1312> https://xmpp-upload.kl.netlib.re/upload/pFeXDcQGm5I6225/9gwghrz9rcs11-3619578230.jpg
[18:30:30] <selfhoster1312> i'll get back to my code :)
[18:32:43] <selfhoster1312> i still have to reimplement Moulinette18n to achieve similar output in yunohost settings get ^^
[18:34:22] <ljf> Le correctif sur ce commit n'est pas le bon en fait...
[18:35:03] <selfhoster1312> ljf, sur "properties"/"defaults"?
[18:39:09] <ljf> yes i doubt i wrote that to forbid `properties` and `defaults` word... I guess `name` `services` `optional` `help` `visible` and `bind` are better candidate to the list of forbidden words...
[18:39:40] <selfhoster1312> well what did the code evaluate to?
[18:44:35] <ljf> i don't say this code part was not buggy, just that i am not sure this commit fix anything...
[18:45:33] <selfhoster1312> the idea was not to "fix" anything but just make it more clear for the next person reading it... but since it was rewritten there is no reason for that :)
[18:51:04] <Yunohost Git/Infra notifications> [yunohost] selfhoster1312 closed [pull request #1845](https://github.com/YunoHost/yunohost/pull/1845): Remove useless dict lookup, as the keys are always the same two
[18:51:04] <Yunohost Git/Infra notifications> [yunohost] selfhoster1312 [commented](https://github.com/YunoHost/yunohost/pull/1845#issuecomment-2123245241) on [issue #1845](https://github.com/YunoHost/yunohost/pull/1845) Remove useless dict lookup, as the keys are always the same two: This code was rewritten for bookworm so this clarification is useless
[19:43:25] <Yunohost Git/Infra notifications> [issues] alexAubin edited [issue #2136](https://github.com/YunoHost/issues/issues/2136): Packaging v3 wishlist
[20:03:28] <Yunohost Git/Infra notifications> [issues] OniriCorpe closed [issue #2351](https://github.com/YunoHost/issues/issues/2351): store: bypass_ratelimit if staff is bugged
[20:03:45] <Yunohost Git/Infra notifications> [issues] alexAubin closed [issue #2375](https://github.com/YunoHost/issues/issues/2375): Improvements on Tartiflette / dash.yunohost.org
[20:40:35] <Yunohost Git/Infra notifications> [issues] Salamandar labeled :space_invader: bug on [issue #2399](https://github.com/YunoHost/issues/issues/2399): Splitter dépôt apps avec yunodevtools
[20:45:54] <Yunohost Git/Infra notifications> [yunohost] Salamandar approved [pull request #1846](https://github.com/YunoHost/yunohost/pull/1846#pullrequestreview-2069593403) provision: reload the firewall only once
[20:51:25] <Yunohost Git/Infra notifications> [yunohost] OniriCorpe pushed 1 commit to provision-reload-firewall-once: remove now unused reload_only_if_change stuff ([d354c75d](https://github.com/YunoHost/yunohost/commit/d354c75dbf9f667960caa97d19f46aaebd18950a))
[21:02:30] <Yunohost Git/Infra notifications> [yunohost] alexAubin [comment](https://github.com/YunoHost/yunohost/commit/d354c75dbf9f667960caa97d19f46aaebd18950a#r142255645) on commit d354c75: I think the "changed" variable should be removed too because it was introduced only for reload_only_if_change
[21:05:02] <Yunohost Git/Infra notifications> [yunohost] OniriCorpe pushed 1 commit to provision-reload-firewall-once: remove now unused changed stuff ([33cb8991](https://github.com/YunoHost/yunohost/commit/33cb89918f835f2b1a4cccd69fbf14a596452ad6))
[21:07:58] <Yunohost Git/Infra notifications> [yunohost] 🔴 Pipeline [#1299815181](https://gitlab.com/YunoHost/yunohost/-/pipelines/1299815181) failed on branch provision-reload-firewall-once
[21:12:15] <orhtej2> seriously when did this pipeline pass last time?
[21:13:02] <Aleks (he/him/il/lui)> ah it's not that bad, only mypy and invalidcode
[21:13:06] <orhtej2> (all I'm saying is it's valuable to have passing CI, just in case of an actual regression)
[21:13:16] <Aleks (he/him/il/lui)> i thought the main "full test" was still failing
[21:13:33] <orhtej2> > <@Alekswag:matrix.org> i thought the main "full test" was still failing

ah I assumed timeout
[21:14:12] <orhtej2> `invalid escape sequence '\.`

Your face is invalid
[21:17:09] <Yunohost Git/Infra notifications> [yunohost] alexAubin pushed 1 commit to dev: Fix invalid escape sequence? ([259c596e](https://github.com/YunoHost/yunohost/commit/259c596e12ec273e552b41ee506f708e21c35895))
[21:21:33] <Yunohost Git/Infra notifications> [yunohost] alexAubin pushed 1 commit to dev: Attempt to fix mypy ? ([84d1a6bc](https://github.com/YunoHost/yunohost/commit/84d1a6bcca05d0ae17a616402980f5b355377b3e))
[21:25:56] <Yunohost Git/Infra notifications> [yunohost] ✖️ Pipeline [#1299839670](https://gitlab.com/YunoHost/yunohost/-/pipelines/1299839670) canceled on branch dev
[21:30:46] <Yunohost Git/Infra notifications> 🏗️ Starting build for yunohost/11.2.12+202405212130 for bullseye/unstable/all ...
[21:32:00] <Yunohost Git/Infra notifications> ✔️ Completed build for yunohost/11.2.12+202405212130 for bullseye/unstable/all.
[21:32:09] <orhtej2> I stand corrected
[21:38:06] <Yunohost Git/Infra notifications> [yunohost] OniriCorpe pushed 5 commits to provision-reload-firewall-once ([33cb89918f83...4d5baa19a10c](https://github.com/YunoHost/yunohost/compare/33cb89918f83...4d5baa19a10c))
[21:38:11] <Yunohost Git/Infra notifications> [yunohost/provision-reload-firewall-once] Fix invalid escape sequence? - Alexandre Aubin
[21:38:16] <Yunohost Git/Infra notifications> [yunohost/provision-reload-firewall-once] Attempt to fix mypy ? - Alexandre Aubin
[21:38:22] <Yunohost Git/Infra notifications> [yunohost] 🔴 Pipeline [#1299831476](https://gitlab.com/YunoHost/yunohost/-/pipelines/1299831476) failed on branch provision-reload-firewall-once
[22:03:01] <Yunohost Git/Infra notifications> [yunohost] zamentur created new branch fix-forbidden-keywords-configpanel
[22:03:02] <Yunohost Git/Infra notifications> [yunohost] zamentur pushed 1 commit to fix-forbidden-keywords-configpanel: [fix] Forbidden keywords config panel ([419d2266](https://github.com/YunoHost/yunohost/commit/419d226604fd5e00f352051672e06d8576d4d8df))
[22:04:39] <Yunohost Git/Infra notifications> [yunohost] zamentur opened [pull request #1848](https://github.com/YunoHost/yunohost/pull/1848): [fix] Forbidden keywords config panel
[22:05:10] <Yunohost Git/Infra notifications> [yunohost] zamentur labeled micro on [pull request #1848](https://github.com/YunoHost/yunohost/pull/1848): [fix] Forbidden keywords config panel
[22:06:39] <ljf> > <selfhoster1312> the idea was not to "fix" anything but just make it more clear for the next person reading it... but since it was rewritten there is no reason for that :)

I have searched and the bug was copied in the refactoring :/
https://github.com/YunoHost/yunohost/pull/1848
[22:06:48] <Yunohost Git/Infra notifications> [yunohost] 🔴 Pipeline [#1299873876](https://gitlab.com/YunoHost/yunohost/-/pipelines/1299873876) failed on branch fix-forbidden-keywords-configpanel
[23:51:18] <Yunohost Git/Infra notifications> [pepettes] OniriCorpe pushed 2 commits to main ([f3b271ca3b24...4a8291c871d2](https://github.com/YunoHost/pepettes/compare/f3b271ca3b24...4a8291c871d2))
[23:51:22] <Yunohost Git/Infra notifications> [pepettes/main] ci: add autoblacks actions - OniriCorpe
[23:51:27] <Yunohost Git/Infra notifications> [pepettes/main] Merge branch main of https://github.com/YunoHost/pepettes - OniriCorpe
[23:52:08] <Yunohost Git/Infra notifications> [pepettes] OniriCorpe pushed 1 commit to main: specify codeblocks language ([549a9f24](https://github.com/YunoHost/pepettes/commit/549a9f24e2bff76471c7f39ccd4ce5a9b9f17837))
[23:53:43] <Yunohost Git/Infra notifications> [pepettes] OniriCorpe pushed 1 commit to main: use python3 -m pip" instead of pip3 ([c2b4a310](https://github.com/YunoHost/pepettes/commit/c2b4a310504768df3cf246ad1a919e52af4fed49))
[23:54:33] <Yunohost Git/Infra notifications> [pepettes] OniriCorpe pushed 1 commit to main: fix the repo url in the git clone command ([a3124222](https://github.com/YunoHost/pepettes/commit/a312422230f3f683a4cf46f53232a22eefbf34a7))
[23:55:05] <Yunohost Git/Infra notifications> [pepettes] OniriCorpe pushed 1 commit to main: fix the repo url in the git clone command ([da4808bd](https://github.com/YunoHost/pepettes/commit/da4808bd4093593b9bf583af2f629beeb089f105))
[23:59:38] <Yunohost Git/Infra notifications> [pepettes] OniriCorpe pushed 1 commit to main: add settings.py to the gitignore ([31640b15](https://github.com/YunoHost/pepettes/commit/31640b1523e5872f645afcee4331e75eb0410989))