Skip to content

Conversation

@flaneur2020
Copy link
Member

@flaneur2020 flaneur2020 commented Feb 21, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

currently databend-query will fail loudly with any unknown field in the config file.

however, this behaviour is not very good in the sense of forward compatibiltity. sometimes we may add new config fields, but when we rollback databend-query into earlier version, it will fail for unknown field in the config file.

we can simply allow these unknown fields by simply removing the #[serde(deny_unknown_field)] attribute. however, it also has a risk that users might have typo in there config file. it's still better to have some warning about this.

this pr introduced sered_ignored while parsing the toml config file, and print a warning log for any unknown field is found.

Tests

  • Unit Test

Type of change

  • New Feature (non-breaking change which adds functionality)

This change is Reviewable

@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Feb 21, 2025
@flaneur2020 flaneur2020 requested a review from Xuanwo February 21, 2025 12:50
@flaneur2020 flaneur2020 marked this pull request as ready for review February 21, 2025 12:50
@BohuTANG
Copy link
Member

BohuTANG commented Feb 22, 2025

The configuration issue was caused by our actions, not the user's. Therefore, removing deny_unknown_field is not advisable, as it could negatively impact the user experience.

@BohuTANG BohuTANG added the incompat incompatible changes label Feb 22, 2025
Copy link
Member

@zhang2014 zhang2014 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is helpful for clean unused configurations.

@BohuTANG BohuTANG merged commit dd86b4e into main Mar 29, 2025
149 of 151 checks passed
@BohuTANG BohuTANG deleted the add-serde-ignored branch March 29, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

incompat incompatible changes pr-feature this PR introduces a new feature to the codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants