POCS
POCS copied to clipboard
Config server startup doesn't give warning for bad yaml
Describe the bug
If the conf_files/pocs.yaml
file is invalid the server will start without giving a proper warning.
To Reproduce Steps to reproduce the behavior:
- Create an invalid entry in
conf_files/pocs.yaml
. - Restart the config server:
sudo supervisorctl restart pocs-config-server
. - Try to get an entry
pocs config get name
, will returnNone
.
Expected behavior The server startup should somehow warn the user that the yaml hasn't parsed. This server starts on boot of the computer so the warning would have to make itself know.
A better solution would be to create a wrapper around the edit process, something like pocs config edit
, which will parse the yaml file on exit.
Edit (04/20/2024) If an invalid entry is created in conf_files/pocs_local.yaml
, it appears that restarting the server ignores this file, so then when the config server saves, it clobbers whatever customizations were there.