Turning on enable-strict-validation fails a config that does not use the web UI, because web-password-hash and web-secret-key are reported as required.
Reproduction
[global]
enable-strict-validation = true
[job-local "hello"]
schedule = @every 30s
command = echo hi
$ ofelia validate --config=strict.ini
configuration validation failed:
config validation error for field 'web-password-hash': is required (value: )
config validation error for field 'web-secret-key': is required (value: )
No [global] enable-web is set, so there is no web UI and no reason to demand credentials for it.
Why it matters
It makes strict validation impractical to adopt: the operator most likely to turn it on — someone who wants their config checked — is met with errors about a feature they are not using. The workaround is to leave strict validation off, which is how the schedule problem in #773 stays invisible.
Note the two issues compound: strict validation is the thing that would catch an unparsable schedule, and this is a reason not to enable it.
Expected
The web-auth fields should be required only when the web UI is enabled and authentication is switched on.
Found while adding exit-code tests in #771.
Turning on
enable-strict-validationfails a config that does not use the web UI, becauseweb-password-hashandweb-secret-keyare reported as required.Reproduction
No
[global] enable-webis set, so there is no web UI and no reason to demand credentials for it.Why it matters
It makes strict validation impractical to adopt: the operator most likely to turn it on — someone who wants their config checked — is met with errors about a feature they are not using. The workaround is to leave strict validation off, which is how the schedule problem in #773 stays invisible.
Note the two issues compound: strict validation is the thing that would catch an unparsable schedule, and this is a reason not to enable it.
Expected
The web-auth fields should be required only when the web UI is enabled and authentication is switched on.
Found while adding exit-code tests in #771.