-
Notifications
You must be signed in to change notification settings - Fork 327
Description
Is your feature request related to a problem? Please describe.
The router config validate command is a nice way to validate your configuration in CI. But it is stricter than router actually is in practice, because it doesn't apply the "migrations" that allow you to use older config syntax in your config file.
So you can use it to validate "is this config file ideal and up to date" but not "will this config file work".
Describe the solution you'd like
A new flag for router config validate that tries to upgrade the file before validating.
Not sure the best name for this; this seems to be the main part of the docs describing the migration/upgrader.
Once naming is figured out, the fix should be pretty straightforward: looks like you just have to change this place where the upgrade mode enum is passed in.
Describe alternatives you've considered
As a workaround you can do something like:
RUST_LOG=none router config upgrade CONFIG.YAML | router config validate /dev/stdin
(see #8474 for why RUST_LOG=none)