Tuesday, November 29, 2022
apps@conference.yunohost.org
November
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
       
             

[09:44:59] <pmorinerie> Hey! I'm trying to resume some work on the Mattermost database migration.

I'm wondering what is the state of the current PR, and what I could do to help
[09:47:18] <pmorinerie> I'm especially wondering if, instead of migrating the databse itself to Postgres, using the Matermost migration tool (mmctl) could make things easier and less error-prone
[21:00:57] <florent> I am attempting to use config_panel.toml. However, I cannot achieve to introduce an option of type string so its value can be injected in some configuration file.
[21:03:39] <florent> Here is the property in my config_panel.toml: https://github.com/YunoHost-Apps/opensearch_ynh/blob/testing/config_panel.toml#L15-L27
[21:04:09] <florent> I get this error : `Config panel question 'xms' should be initialized with a value during install or upgrade.`
[21:04:40] <florent> But I generate a default value in install script: https://github.com/YunoHost-Apps/opensearch_ynh/blob/testing/scripts/install#L48-L52
[21:05:03] <Aleks (he/him/il/lui)> ah yeah
[21:05:05] <florent> If you have any clue of what I am doing wrong, you would save me :)
[21:05:18] <Aleks (he/him/il/lui)> 🤔
[21:05:37] <Aleks (he/him/il/lui)> > I get this error : `Config panel question 'xms' should be initialized with a value during install or upgrade.`

when are you getting this exactly ? Are you sur the xms setting is defined on your install right now ?
[21:06:22] <florent> ```
root@ynh-dev-bullseye-unstable:/ynh-dev# yunohost app setting opensearch xms
20m
```
[21:06:37] <florent> Well, I think so ^^'
[21:07:36] <Aleks (he/him/il/lui)> ooooor maybe it's rather trying to read the xms value from `__FINALPATH__/config/jvm.options.d/yunohost.options` ?
[21:07:49] <Aleks (he/him/il/lui)> you sure the value is in there too ?
[21:08:10] <Aleks (he/him/il/lui)> I'm wondering if the issue could be related to the weird single quotes around 'xms' in the bind statement
[21:08:27] <florent> Oh!
[21:08:33] <florent> You mean it is bidirectional?
[21:08:52] <Aleks (he/him/il/lui)> yeah
[21:09:08] <florent> OK, got it
[21:09:09] <florent> https://github.com/YunoHost-Apps/opensearch_ynh/blob/testing/conf/jvm.options#L22
[21:09:24] <florent> I just want to overwrite this file
[21:09:30] <florent> Not read the values in there
[21:09:37] <Aleks (he/him/il/lui)> dafuq is thi format xD
[21:09:51] <florent> Yeah
[21:09:55] <Aleks (he/him/il/lui)> wat da hek
[21:10:08] <florent> Java…
[21:10:22] <florent> These are options which are passed to the Java runtime
[21:10:46] <Aleks (he/him/il/lui)> "Damn these semicolons and spaces taking too much disk space ! Just concatenate the keys and values together, that'll be great !"
[21:10:57] <Aleks (he/him/il/lui)> ah i see
[21:11:25] <florent> So, I would have to create a setter?
[21:12:03] <Aleks (he/him/il/lui)> ugh https://github.com/YunoHost-Apps/opensearch_ynh/blob/testing/scripts/config still contains the default stuff from pepettes(?) 😬
[21:12:05] <Aleks (he/him/il/lui)> yeah
[21:12:38] <florent> Oh yeah, I have stuffs to cleanup, this is not an app ready to be installed yet on production
[21:12:39] <Aleks (he/him/il/lui)> and remove the bind statement maybe ... or is it "null" or something for custom setter ? I don't remember .. this ain't really intuitive ...
[21:13:58] <Aleks (he/him/il/lui)> i mean the bind statement with the `key:/some/path/to/config` is meant for magic read/write of values inside the config file for common format e.g json, yaml, ini, ... but in your case you gotta call ynh_add_config yourself basically
[21:15:16] <florent> OK!
[21:16:12] <florent> Would it be useful if I add an instruction to edit the `change_url` and `config` in example_ynh?
[21:17:12] <florent> I submit a PR if so :)
https://github.com/YunoHost/example_ynh/
[21:17:31] <Aleks (he/him/il/lui)> eeeh not sure what kind of instruction you mean
[21:18:33] <florent> > Edit the `install`, `upgrade`, `remove`, `backup`, and `restore` scripts, and any relevant conf files in `conf/`.
[21:18:54] <florent> I think adding `change_url` and `config` might be useful ^^
[21:18:59] <Aleks (he/him/il/lui)> ah yes i guess
[21:39:31] <florent> Yay, that works!
[21:41:06] <florent> That's what I did: https://github.com/YunoHost-Apps/opensearch_ynh/blob/testing/scripts/config
[21:41:08] <florent> Thanks Aleks (he/him/il/lui) !
[21:41:42] <Aleks (he/him/il/lui)> 👌