fix(filter): reject unknown config fields#3572
Conversation
Make filter processor startup validation fail fast on unrecognized top-level keys and cover the diagnostic with a typed-config regression test. Add the required Rust pipeline changelog entry for issue open-telemetry#3568. Assisted-by: OpenAI Codex Signed-off-by: Gnani Rahul Nutakki <gnani.nutakki@gmail.com>
|
Pull request dashboard statusStatus last refreshed: 2026-07-26 19:03:32 UTC.
This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected. If you believe this pull request is incorrectly routed as waiting on the author, comment |
|
@gnanirahulnutakki could you sign the CLA and mark the PR ready for review. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3572 +/- ##
==========================================
- Coverage 86.91% 86.91% -0.01%
==========================================
Files 782 782
Lines 319143 319150 +7
==========================================
- Hits 277389 277386 -3
- Misses 41230 41240 +10
Partials 524 524
🚀 New features to boost your workflow:
|
|
Marked the PR ready for review. EasyCLA is now the only remaining gate; it is still blocked because the commit email needs to be linked and verified on my GitHub account before I can complete the contributor agreement. |
Change Summary
Reject unknown top-level fields in
processor:filterconfiguration so--validate-and-exitcatches typos instead of silently discarding them.The filter processor already registers
validate_typed_config::<Config>, but its typed config was the exception among strict engine and component schemas because it did not use Serde'sdeny_unknown_fields. This adds that schema contract and a focused regression test that verifies the offending field is named in the diagnostic.What issue does this PR close?
How are these changes tested?
cargo +1.96.1 check -p otap-df-core-nodescargo +1.96.1 test -p otap-df-core-nodes rejects_unknown_top_level_field -- --nocapturedf_engine --validate-and-exitreproduction using the issue configurationpython3 tools/sanitycheck.pychloggenv0.30.0cargo +1.96.1 xtask checkAre there any user-facing changes?
Yes. Invalid filter processor configuration now fails validation with an explicit unknown-field error instead of being accepted.
Changelog
.chloggen/*.yamlentrychore(indicated in title)AI tooling assisted with code navigation and drafting; the behavior was reproduced and the full repository-required validation suite was run by the contributor.