Feature: Allow Unsupported Configurations to Output Warning Instead of Error
Currently, when encountering unsupported configurations in the configuration file, the program exits with an error. This behavior causes compatibility issues between new configurations and older binaries. It would be beneficial to allow unsupported configurations to only output a warning instead of causing the program to exit. This change would improve compatibility and provide a smoother user experience.
We currently do not allow breaking changes to configs. All deprecated configurations should be retained as they are and should display a warning, similar to the example below:
https://github.com/databendlabs/databend/blob/d41e0521aa9c78a6a8bdedb847fbc6cbb12cdb01/src/query/config/src/config.rs#L502-L516
We can convert them into warnings instead.
We currently do not allow breaking changes to configs. All deprecated configurations should be retained as they are and should display a warning, similar to the example below:
Yes, that's using new binary with old configs. But we are having issues in the opposite way.
Would you like to share an error in such cases? We didn't set deny_unknown_fields for serde, this case should just be ignored.
Databend Query start failure, cause: anyhow. Code: 11002, Text = TOML parse error at line 50, column 3
50
jwks_refresh_interval = 30
^^^^^^^^^^^^^^^^^^^^^
unknown field `jwks_refresh_interval`, expected one of `teenant_id`, `cluster_id`, `num_cpus`, `mysql_handler_host`,`mysql_handler_port', `mysql_handl
source: None
Would you like to share an error in such cases? We didn't set
deny_unknown_fieldsfor serde, this case should just be ignored.
i think we've set deny_unknown_fields for these options 👀
$ git grep 'deny_unknown_fields'
src/query/config/src/config.rs:#[serde(default, deny_unknown_fields)]
src/query/config/src/config.rs:/// deny_unknown_fields to check unknown field, like the deprecated `address`.
src/query/config/src/config.rs:#[serde(default, deny_unknown_fields)]
src/query/config/src/config.rs:#[serde(default, deny_unknown_fields)]
src/query/config/src/config.rs:#[serde(default, deny_unknown_fields)]
src/query/config/src/config.rs:#[serde(default, deny_unknown_fields)]
src/query/config/src/config.rs:#[serde(default, deny_unknown_fields)]
i think we've set deny_unknown_fields for these options 👀
It does not work.