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
The notion of ContainerPilot having a -validate command came up in a sidebar discussion between @geek and @cheapRoc and myself. Currently you can use the -template subcommand to render the template, but it only does the template rendering and doesn't even make sure the configuration is syntactically valid.
A hypothetical -validate command would have to render the template anyways, because otherwise there's no guarantee that the configuration file is syntactically valid. So it seems like the cleanest way to handle this would be to have the -template subcommand also validate that the ContainerPilot configuration is valid.
In terms of the implementation, this would make it so that RenderConfig calls LoadConfig and then renders the output. This would eliminate a bunch of duplicated code in RenderConfig too.
My major concern with this is that currently an invalid configuration will render just fine with -template, and this changes the behavior in an error condition. On the other hand, right now someone can render a bad template and the only find out when they try to reload that config, which will get them an error anyways.
The text was updated successfully, but these errors were encountered:
The notion of ContainerPilot having a
-validate
command came up in a sidebar discussion between @geek and @cheapRoc and myself. Currently you can use the-template
subcommand to render the template, but it only does the template rendering and doesn't even make sure the configuration is syntactically valid.A hypothetical
-validate
command would have to render the template anyways, because otherwise there's no guarantee that the configuration file is syntactically valid. So it seems like the cleanest way to handle this would be to have the-template
subcommand also validate that the ContainerPilot configuration is valid.In terms of the implementation, this would make it so that
RenderConfig
callsLoadConfig
and then renders the output. This would eliminate a bunch of duplicated code inRenderConfig
too.My major concern with this is that currently an invalid configuration will render just fine with
-template
, and this changes the behavior in an error condition. On the other hand, right now someone can render a bad template and the only find out when they try to reload that config, which will get them an error anyways.The text was updated successfully, but these errors were encountered: