feat(yang-push): make anydata_strict validation configurable - #42
Open
rodonile wants to merge 1 commit into
Open
feat(yang-push): make anydata_strict validation configurable#42rodonile wants to merge 1 commit into
rodonile wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a configuration knob in the collector to control whether YANG-Push validation enforces libyang’s ANYDATA_STRICT parsing behavior for anydata nodes (defaulting to enabled), and threads that setting through to the yang-push validation actor.
Changes:
- Introduces
UdpNotifConfig::anydata_strict_validation(serde-defaults totrue) and documents it in the example YAML. - Extends
ValidationActorHandle::new/ValidationActorto carry ananydata_strictboolean and uses it to conditionally applyDataParserFlags::ANYDATA_STRICT. - Updates collector initialization to pass the new config value into the validation actor.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| crates/yang-push/src/validation/mod.rs | Stores an anydata_strict flag on the validation actor and conditionally applies ANYDATA_STRICT during payload parsing; updates actor handle constructor and tests call sites. |
| crates/collector/src/lib.rs | Wires the new collector config flag into ValidationActorHandle::new calls. |
| crates/collector/src/config.rs | Adds UdpNotifConfig::anydata_strict_validation with a true default. |
| crates/collector/config_udpnotif_telemetry.yaml | Documents/configures anydata_strict_validation in the sample config. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Add anydata_strict parameter to ValidationActorHandle::new to toggle DataParserFlags::ANYDATA_STRICT during YANG validation. Wire it into UdpNotifConfig as anydata_strict_validation (default: true) so it can be set per-collector without a code change.
rodonile
force-pushed
the
anydata-strict-flag
branch
from
August 20, 2026 12:46
3204f5a to
a225177
Compare
rodonile
enabled auto-merge (rebase)
August 20, 2026 12:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a config knob to toggle strict validation of
anydatanodes (libyang'sANYDATA_STRICTflag) when validating YANG-Push notifications, by default enabled.Changes
ValidationActorHandle::newnow takes ananydata_strict: boolparameter, stored on the actor and used invalidate_messageto conditionally ORDataParserFlags::ANYDATA_STRICTinto the parser flagsUdpNotifConfig::anydata_strict_validation(defaults totruevia serde when omitted)