Open acdha opened 5 years ago
Hi @acdha,
I can't reproduce (in 4.1 and 4.0) cache.server.derivative.ttl_seconds
causing HTTP 500 errors when set with a trailing comment.
Setting that aside, a line like:
some.key = 300 # comment
is structurally valid for the properties format, so it would pass a basic check. For a more comprehensive check, the data type of each key and its legal ranges/lengths/values/etc. would need to be accounted for.
Yes, I realize that it requires validation at different stages. The main problem here is that it'll prevent any use of the service but the service doesn't exit — if it simply crashed the first time something failed to parse the config value that'd make the problem more obvious.
I'll see if I can get a simpler testcase – the example above was copied from the CloudWatch logs but I can't trivially reproduce it locally.
I deployed a container before noticing that the config file parser doesn't support inline comments (e.g.
cache.server.derivative.ttl_seconds = 2592000 # 30 days
). The health-check endpoint was returning success so it took a little longer to notice until I hit an image URL and noticed the 500 error. It'd be neat if there was a way to either have the health-check fail for broken config files.