Wednesday, August 28, 2024
dev@conference.yunohost.org
August
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
 
             

[08:47:33] <selfhoster1312> is there a reason we duplicate identical scripts in helpersvX.d? couldn't we have a symlink and only have files for whatever changed?
[08:48:20] <selfhoster1312> i'm looking to make a PR to move ynh_add_swap and ynh_smart_mktemp which both have been in experimental-helpers for >5y to a new helpers v2.2 version
[10:04:16] <selfhoster1312> ok so across all apps using ynh_add_swap i found 3 variants... the experimental_helpers one, one that explicitly checks if inside lxc, and one that does chattr +C
[10:37:14] <Aleks (he/him/il/lui)> > <selfhoster1312> is there a reason we duplicate identical scripts in helpersvX.d? couldn't we have a symlink and only have files for whatever changed?

There was a general rework of the argument parsing so i doubt any file was left untouched
[10:45:20] <selfhoster1312> ok my bad
[10:45:35] <selfhoster1312> so for a new minor version i should just use symlinks instead
[10:51:46] <Aleks (he/him/il/lui)> but do we really need a new version while 2.1 isnt even used that much x_x
[10:53:21] <selfhoster1312> so i should just PR on 2.1 and bump required yunohost version in concerned apps?
[10:54:05] <Aleks (he/him/il/lui)> i suppose, it's just about adding the swap helper and smart mktemp ?
[10:54:31] <selfhoster1312> yep
[10:54:43] <selfhoster1312> and making them LXD-proof
[10:54:55] <Aleks (he/him/il/lui)> i guess yup
[10:55:20] <selfhoster1312> 👍️
[11:04:44] <Yunohost Git/Infra notifications> [yunohost] selfhoster1312 opened [pull request #1937](https://github.com/YunoHost/yunohost/pull/1937): Add ynh_add_swap and ynh_smart_mktemp to official helpers
[11:05:39] <Yunohost Git/Infra notifications> [yunohost] selfhoster1312 [commented](https://github.com/YunoHost/yunohost/pull/1937#discussion_r1734471427) on pull request #1937 Add ynh_add_swap and ynh_smart_mktemp to official helpers: Not sure why there was a sudo here in one of the variants...
[12:14:01] <Yunohost Git/Infra notifications> [yunohost] alexAubin [commented](https://github.com/YunoHost/yunohost/pull/1937#discussion_r1734566493) on pull request #1937 Add ynh_add_swap and ynh_smart_mktemp to official helpers: suggestion echo "(mktemp --directory --tmpdir="tmpdir")"
[13:01:35] <Yunohost Git/Infra notifications> 🏗️ Starting build for yunohost/12.0.2+202408281300 for bookworm/unstable/all ...
[13:01:38] <Yunohost Git/Infra notifications> [yunohost] alexAubin pushed 1 commit to bookworm: apps/config panel: fix _compute_binds + _dump_options_types_and_binds because of the major changes in config panel workf... ([2cc1e722](https://github.com/YunoHost/yunohost/commit/2cc1e7224e7c48149e822b099c61d1301f07947a))
[13:02:17] <Yunohost Git/Infra notifications> [yunohost] 🔴 Pipeline [#1430518138](https://gitlab.com/YunoHost/yunohost/-/pipelines/1430518138) failed on branch bookworm
[13:02:34] <Aleks (he/him/il/lui)> when you're in the middle of packaging an app but suddently need a smol core feature which transforms into a refactoring over several days https://i.imgflip.com/91nubd.jpg
[13:02:51] <Yunohost Git/Infra notifications> ✔️ Completed build for yunohost/12.0.2+202408281300 for bookworm/unstable/all.
[13:03:11] <Aleks (he/him/il/lui)> https://i.imgflip.com/91nuic.jpg
[13:05:22] <Yunohost Git/Infra notifications> [yunohost] alexAubin pushed 1 commit to bookworm: ja ja typing stuff gneugneugneu ([72a13c7b](https://github.com/YunoHost/yunohost/commit/72a13c7b48dfce2cebb3798ae67b9dd68b779090))
[13:06:15] <kayou> 😅
[13:07:15] <kayou> `actionmap test: Durée: 9 secondes`
[13:07:27] <kayou> omg
[13:07:42] <kayou> faster than light
[13:07:42] <Aleks (he/him/il/lui)> iamspeed.jpg
[13:08:36] <kayou> > WARNING: Starting with version 17.0 the 'build_script' stage will be replaced with 'step_script': https://gitlab.com/groups/gitlab-org/-/epics/6112

i have no clue why there is this warning all the time
[13:08:49] <kayou> we are on 17.3 now, leave us alone
[13:09:01] <Aleks (he/him/il/lui)> ah ?
[13:09:28] <kayou> each jobs tell us this warning all the time since 15.x
[13:09:59] <Aleks (he/him/il/lui)> ah i thougt it was because we're defining the script using `build_script:` in the yaml but in fact we just have `script:` so wtf
[13:10:03] <kayou> and from what i've read, we don't use the "build_script" but the correct "step_script"
[13:10:19] <kayou> yeah
[13:10:59] <Aleks (he/him/il/lui)> thonking
[13:11:08] <kayou> probably because nobody use the CI like that, so nobody is aware of this warning but us
[13:11:34] <Aleks (he/him/il/lui)> `Remove translation from step_script to build_script in custom executor`
[13:11:44] <Aleks (he/him/il/lui)> something to do with the gitlab runner ?
[13:12:27] <kayou> gitlab-runner is ~almost~ up to date
[13:13:04] <Aleks (he/him/il/lui)> yeah i don't understand x_x
[13:13:12] <Aleks (he/him/il/lui)> anyway not a huge deal
[13:13:15] <kayou> anyway, it's just a warning
[13:13:16] <kayou> ^^
[13:13:25] <Aleks (he/him/il/lui)> but feels like something is gonna spontaneously break someday 😬
[13:13:31] <kayou> but i'm triggered each time i open a test
[13:13:39] <kayou> ¯\_(ツ)_/¯
[13:14:19] <kayou> a classic day in the computer world
[13:15:36] <Yunohost Git/Infra notifications> 🏗️ Starting build for yunohost/12.0.2+202408281315 for bookworm/unstable/all ...
[13:17:09] <Yunohost Git/Infra notifications> ✔️ Completed build for yunohost/12.0.2+202408281315 for bookworm/unstable/all.
[13:45:19] <Yunohost Git/Infra notifications> [yunohost] 🔴 Pipeline [#1430534820](https://gitlab.com/YunoHost/yunohost/-/pipelines/1430534820) failed on branch bookworm
[13:47:26] <selfhoster1312> yeah sry about the tabs thing
[13:47:41] <Aleks (he/him/il/lui)> nvm it's a mess all over the helpers
[13:47:49] <selfhoster1312> maybe we could enforce a shfmt on CI: https://github.com/mvdan/sh
[13:48:17] <selfhoster1312> or even a shellcheck oO
[13:48:22] <selfhoster1312> if we feel like fancy bashologues
[13:49:35] <Aleks (he/him/il/lui)> apparently I did `shfmt -bn -i 4 -w $file` in 93cc413f4 ~3 years ago, could redo it or automatize it yeah
[13:50:00] <kayou> Pls dont say 3 times in a row shellcheck in front of a mirror, it will invoke Sala mandar
[13:51:38] <selfhoster1312> it looks like that command is doing a great job on that utils file Aleks (he/him/il/lui)
[13:52:47] <selfhoster1312> see https://github.com/YunoHost/yunohost/pull/1937/commits/b138f283fbdbf1adc4943068276e190c1510b22f
[13:54:10] <Aleks (he/him/il/lui)> https://github.com/luizm/action-sh-checker 👀
[13:55:11] <selfhoster1312> i don't think we need an entire "github action" ? it's just a simple CLI step?
[13:55:11] <Aleks (he/him/il/lui)> dunno how shellcheck would react to the helper, but my only experiences with shellcheck ended up with "it's annoying as hell and bash is just so much crap that you can't really lint it"
[13:55:32] <Aleks (he/him/il/lui)> yeah maybe idk depends what we wanna do
[13:56:22] <selfhoster1312> Aleks (he/him/il/lui), shellcheck is not a neverending nightmare but coming from a huge backlog of bad shell design it can look horrible to deal with 1000 errors and counting
[13:56:32] <selfhoster1312> but once that's done you can have 100% better shell scripts
[13:56:42] <selfhoster1312> prevent globbing issues, quoting issues...
[13:57:30] <selfhoster1312> but my personal opinion is it's way better to rewrite the scripts in python/rust, but if we're not doing that i'll be happy to add shellcheck to CI and help squash the problems
[14:03:27] <Aleks (he/him/il/lui)> if we're doing anything, we'll transform the helpers in python, in the continuation of what's was already done in the resource system, but we're still a long way off of getting rid of bash helpers, assuming we can, that's really something "post packaging v3" and it remains to be seen how much we can cover all the use case
[14:03:27] <Yunohost Git/Infra notifications> [yunohost] 🔴 Pipeline [#1428945230](https://gitlab.com/YunoHost/yunohost/-/pipelines/1428945230) failed on branch dev, bookworm
[14:03:27] <Aleks (he/him/il/lui)> such as conditional permissions among other things ... but we should cover those in packaging v3
[14:03:27] <Aleks (he/him/il/lui)> e.g. in helpers 2.1 we still have "legacy" helpers because of boring edge case that can't be handled declaratively
[14:03:28] <Aleks (he/him/il/lui)> https://i.imgflip.com/91o2w4.jpg
[14:05:54] <selfhoster1312> yeah but even those bash helpers could help having a real programming language... the only problem is python has a very slow startup time (tens to hundreds of ms) which could slow down the overall execution
[14:06:13] <kayou> > <@yunohostinfra:matrix.org> [yunohost] 🔴 Pipeline [#1428945230](https://gitlab.com/YunoHost/yunohost/-/pipelines/1428945230) failed on branch dev, bookworm

1 day ago...
[14:07:59] <Aleks (he/him/il/lui)> > <selfhoster1312> yeah but even those bash helpers could help having a real programming language... the only problem is python has a very slow startup time (tens to hundreds of ms) which could slow down the overall execution

that's irrelevant because converting the helpers to python would mean they are inside the core directly and with stuff handled declaratively, not that we have yunohost-calling-bash-calling-python
[14:09:14] <Aleks (he/him/il/lui)> also as always, it's not like the slowest thing ever in the app scripts is calling python (which we do for ynh_app_settings_get/set for example), it's definitely calling npm build or whatever build step
[14:17:23] <selfhoster1312> ok so if #1937 gets merged i can do the shfmt on helpers/hooks and add it to CI
[14:22:05] <Yunohost Git/Infra notifications> [yunohost] Salamandar [commented](https://github.com/YunoHost/yunohost/pull/1937#issuecomment-2315479605) on [issue #1937](https://github.com/YunoHost/yunohost/pull/1937) Add ynh_add_swap and ynh_smart_mktemp to official helpers: Hmmm this PR is a bit bigger than adding the two helpers, maybe split ? :D
[14:22:35] <Salamandar> > <selfhoster1312> ok so if #1937 gets merged i can do the shfmt on helpers/hooks and add it to CI

as i commented on the pr, maybe split the PR (not run shfmt)
[14:23:07] <selfhoster1312> ok
[14:23:16] <Salamandar> just for readability
[14:23:18] <Aleks (he/him/il/lui)> ... it's not a huge deal ...
[14:23:20] <Salamandar> and then shfmt in a second pr
[14:23:37] <Salamandar> > <@Alekswag:matrix.org> ... it's not a huge deal ...

well i wanted to read the new helpers and that's a bit more difficult now :D
[14:23:50] <selfhoster1312> Salamandar, done
[14:24:06] <Salamandar> <3
[14:24:10] <selfhoster1312> Salamandar, hopefully you know those helpers your name was all over commits adding them to yunohost packages XD
[14:24:28] <Salamandar> > ynh_print_warn --message="You are inside a container/VM. swap will not be added, but that can cause troubles for the app $app. Please make sure you have enough RAM available."

TBH i'm really wondering about this ah ah
[14:24:33] <Salamandar> you can add swap in a VM
[14:24:48] <Salamandar> but eh, there's an existing behaviour, let's not change it
[14:25:13] <selfhoster1312> Salamandar, doesn't work for me ®
[14:25:17] <selfhoster1312> tried with both dir and btrfs drivers
[14:25:32] <selfhoster1312> i saw plenty of threads about people saying DON'T TRY TO DO THAT on LXD forums
[14:25:41] <selfhoster1312> and this workaround is already in 99% of yunohost apps
[14:25:43] <Aleks (he/him/il/lui)> on a VPS, you'll typically get `systemd-detect-virt` = kvm and swap works perfectly fine
[14:25:51] <selfhoster1312> ha yes kvm
[14:25:52] <Salamandar> ah I was just talking about VMs, not containers
[14:25:53] <Salamandar> ah !
[14:26:00] <selfhoster1312> ah sorry
[14:26:24] <selfhoster1312> yes the original code said `== "lxc"` but i was more cautious and changed to `!= none`...
[14:26:26] <Salamandar> By default, any type of
virtualization is detected, and the options --container and --vm
can be used to limit what types of virtualization are detected.
[14:27:15] <selfhoster1312> it may be a breaking change indeed
[14:27:33] <selfhoster1312> but i thought because LXC/LXD/Incus may have different output it would be better to just check anything
[14:27:41] <selfhoster1312> feel free to edit the PR Salamandar <3
[14:27:57] <Salamandar> `if systemd-detect-virt --container --quiet; then echo container; else echo native; fi`
[14:28:08] <Salamandar> that detects KVM as "native"
[14:28:30] <Salamandar> and lxc as container
[14:28:33] <selfhoster1312> so should i go with this?
[14:28:48] <selfhoster1312> personally i'm mad with anything that involves swap and i'd like never to use it but if people want it...
[14:29:31] <Salamandar> I added a suggestion in the pr
[14:29:37] <Salamandar> > <selfhoster1312> personally i'm mad with anything that involves swap and i'd like never to use it but if people want it...

no no no, swap is goooood
[14:29:54] <Yunohost Git/Infra notifications> [yunohost] Salamandar [commented](https://github.com/YunoHost/yunohost/pull/1937#discussion_r1734797320) on pull request #1937 Add ynh_add_swap and ynh_smart_mktemp to official helpers: suggestion if [ "(systemd-detect-virt)" = "none" ] then f systemd-detect-virt --container --quiet then Th...
[14:29:56] <Salamandar> here is my server
[14:29:57] <selfhoster1312> no swap is the most evil thing the second you have like 1MiB swap then everything stalls until eternity ^^
[14:29:59] <Salamandar> https://aria.im/_matrix/media/v1/download/matrix.org/pytqidPyifzqSDqEsVydbkJP
[14:30:17] <Salamandar> without swap my server would be down in 10 minutes of runtime
[14:30:18] <selfhoster1312> nooooooooo
[14:30:31] <selfhoster1312> can i offer you a stick of RAM? XD
[14:30:33] <Salamandar> well yeah swap is only good if you have enough ram, agreed
[14:30:43] <Salamandar> soldered ram unfortunately
[14:31:10] <Salamandar> but swap is used for processes that very rarely run
[14:31:22] <Salamandar> there's just an initial latency and then everything is in ram
[14:31:49] <selfhoster1312> to be fair SWAP is less worse on a server where latency matters less, than in a desktop environment
[14:31:58] <Salamandar> (actually I have 2G of zram before using the on-ssd swap)
[14:32:09] <Salamandar> > <selfhoster1312> to be fair SWAP is less worse on a server where latency matters less, than in a desktop environment

ah yeah that i completely agree on
[14:32:35] <Salamandar> on my desktop i prefer processes to crash than to swap
[14:33:20] <selfhoster1312> same :)
[14:33:39] <selfhoster1312> Salamandar, done
[14:34:28] <Yunohost Git/Infra notifications> [yunohost] Salamandar approved [pull request #1937](https://github.com/YunoHost/yunohost/pull/1937#pullrequestreview-2266477886) Add ynh_add_swap and ynh_smart_mktemp to official helpers
[14:48:32] <kayou> > <@Salamandar:matrix.org> sent an image.

fyi the yellow part is just cache from the kernel, it's not really "used" memory
[14:49:20] <Salamandar> > <@kayou:matrix.org> fyi the yellow part is just cache from the kernel, it's not really "used" memory

Yeah that's probably in my zram
[14:49:35] <kayou> > <@kayou:matrix.org> Pls dont say 3 times in a row shellcheck in front of a mirror, it will invoke Sala mandar

who did that? :°
[14:50:39] <selfhoster1312> 🥸️
[14:53:01] <Salamandar> > <@kayou:matrix.org> who did that? :°

wat
[14:54:16] <kayou> 👼
[14:57:28] <selfhoster1312> i hear if you can say Curry-Howard 10 times without bafouiller a djinn appears, fixes your code and writes a formal proof of it
[15:33:39] <selfhoster1312> ok i've prepared all the pull requests for apps that use swap helpers
[15:34:13] <selfhoster1312> we just need the yunohost release, i bump yunohost version in manifest.toml, run the CI and enjoy?
[15:36:45] <selfhoster1312> the only two i didn't were ecko and reel2bits because they're marked abandoned by github and still use manifest.json
[15:42:49] <Salamandar> > <selfhoster1312> the only two i didn't were ecko and reel2bits because they're marked abandoned by github and still use manifest.json

yeah please don't edit legacy apps :D
[15:44:07] <selfhoster1312> shouldn't we move them to something like yunohost-archive org?
[15:44:19] <selfhoster1312> so they don't appear with bad examples in code search on yunohost-apps? XD
[15:50:04] <Salamandar> > <selfhoster1312> shouldn't we move them to something like yunohost-archive org?

yeah having another org might be a good idea tbh
[15:51:20] <Aleks (he/him/il/lui)> (or maybe if the repo is archived it's not listed in search results ?)
[18:45:38] <selfhoster1312> (it is)
[21:04:15] <Yunohost Git/Infra notifications> [yunohost] yunohost-bot pushed 1 commit to check-patches-dir: 2.1 helpers: check if the patches directory exists before trying to get its realpath ([488f563b](https://github.com/YunoHost/yunohost/commit/488f563b458dbd6f8bc2af0d51a6131ffdbbffd3))
[21:04:15] <Yunohost Git/Infra notifications> [yunohost] yunohost-bot created new branch check-patches-dir
[21:07:18] <Yunohost Git/Infra notifications> [yunohost] OniriCorpe labeled ready to merge on [pull request #1938](https://github.com/YunoHost/yunohost/pull/1938): 2.1 helpers: check if patches dir exists before getting realpath
[21:07:18] <Yunohost Git/Infra notifications> [yunohost] OniriCorpe labeled app helpers on [pull request #1938](https://github.com/YunoHost/yunohost/pull/1938): 2.1 helpers: check if patches dir exists before getting realpath
[21:07:19] <Yunohost Git/Infra notifications> [yunohost] OniriCorpe opened [pull request #1938](https://github.com/YunoHost/yunohost/pull/1938): 2.1 helpers: check if patches dir exists before getting realpath
[21:07:40] <Yunohost Git/Infra notifications> [yunohost] OniriCorpe edited [pull request #1938](https://github.com/YunoHost/yunohost/pull/1938): 2.1 helpers: check if patches dir exists before getting realpath
[23:57:27] <Yunohost Git/Infra notifications> [yunohost] alexAubin pushed 2 commits to dev ([3d4804be6807...e3e8b903c77b](https://github.com/YunoHost/yunohost/compare/3d4804be6807...e3e8b903c77b))
[23:58:39] <Yunohost Git/Infra notifications> [yunohost] alexAubin merged [pull request #1938](https://github.com/YunoHost/yunohost/pull/1938): 2.1 helpers: check if patches dir exists before getting realpath
[23:58:52] <Yunohost Git/Infra notifications> [yunohost] alexAubin deleted branch check-patches-dir
[23:59:25] <Yunohost Git/Infra notifications> [yunohost] 🔴 Pipeline [#1431194326](https://gitlab.com/YunoHost/yunohost/-/pipelines/1431194326) failed on branch dev