You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configuration parsing has trouble to detect some errors or report them in a clear way.
By example:
Bad error message when some '---' line is not set
If 2 consecutives services are declared in a YAML file, but "---" is missing, the error message will be:
ERROR: Unexpected exception: 'service2_name'
With a configuration with 2 services with the same name, milkcheck uses the last one without any warning message
$ cat conf/two/example.yaml
services:
local:
desc: Simplest service declaration
actions:
status:
cmd: /sbin/service crond status
local:
desc: Simplest service declaration (double definition)
actions:
start:
cmd: /bin/true
$ milkcheck -c conf/two status
$ milkcheck -c conf/two start
local - Simplest service declaration (double definition) [ OK ]
A interesting method to fix this could be to use the advanced features from PyYAML library and see if we cannot overload/create new classes to parse the yaml stream and automatically instanciate objects.
The text was updated successfully, but these errors were encountered:
Configuration parsing has trouble to detect some errors or report them in a clear way.
By example:
Bad error message when some '---' line is not set
If 2 consecutives services are declared in a YAML file, but "---" is missing, the error message will be:
With a configuration with 2 services with the same name, milkcheck uses the last one without any warning message
A interesting method to fix this could be to use the advanced features from PyYAML library and see if we cannot overload/create new classes to parse the yaml stream and automatically instanciate objects.
The text was updated successfully, but these errors were encountered: