pageserver config: ignore unknown fields (instead of deny_unknown_fields
)
#11275
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refs
pageserver_api::models::TenantConfig
andpageserver::tenant::config::TenantConfOpt
#11298Problem
Rejecting
pageserver.toml
s with unknown fields adds friction, especially when usingpageserver.toml
fields as feature flags that need to be decommissioned.See the added paragraphs on
pageserver_api::models::ConfigToml
for details on what kind of friction it causes.Also reed the corresponding internal docs update linked above to see a more imperative guide for using
pageserver.toml
flags as feature flags.Solution
Remove
serde(deny_unknown_fields)
from all structs inpageserver_api::config::ConfigToml
pageserver_api::config::TenantConfigToml
.I went through all the child fields and verified they don't use
deny_unknown_fields
either, including those shared withpageserver_api::models
.TODO
Future Work
Tooling to detect usage of unknown fields: