Repository navigation
Conversation
rodonile
force-pushed
the
augmentedby-strip
branch
from
December 1, 2026 16:58
9e4e352 to
c0838c5
Compare
mxyns
requested changes
Dec 2, 2026
rodonile
force-pushed
the
augmentedby-strip
branch
from
December 2, 2026 09:41
c0838c5 to
9795543
Compare
mxyns
approved these changes
Dec 2, 2026
rodonile
enabled auto-merge (rebase)
December 3, 2026 16:23
libyang >= 6.4.13 implements ietf-yang-library-augmentedby as a built-in module. When a device lists a different revision of it in its yang-library (e.g. 2026-08-26), libyang refuses to load the library, and removing the module instead breaks the augmented-by leafrefs. augmented-by is only needed to discover augmenting modules while walking the device's yang library; libyang applies augments from the implemented modules, not from this leaf-list. Keep using it for discovery but strip it from the library we build, and stop pulling in ietf-yang-library-augmentedby itself. The resulting library loads regardless of the libyang built-in revision and matches what yang-consumer already builds.
rodonile
force-pushed
the
augmentedby-strip
branch
from
December 3, 2026 16:23
9795543 to
361e467
Compare
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.
Strip
augmented-byand theietf-yang-library-augmentedbymodule from the YANG library thatload_from_modulesbuilds. They are anyway only needed to discover augmenting modules on the device.Reason
Since libyang 6.4.13 (CESNET/libyang 9fbed2d83),
ietf-yang-library-augmentedby@2025-05-28is built in and implemented in every context. Devices listing another revision (e.g.@2026-08-26) makeContext::new_from_yang_library_filefail.augmented-byonly lists which modules augment a module, it's only metadata. libyang anyway applies augments because the augmenting modules are implemented in the module-set, not because of this leaf-list. So it is only needed while walking the device's YANG library, and can be dropped from the library used for validation and caching. yang-consumer already builds its library withoutaugmented-by.Raised upstream as well (option 1: let the listed revision take precedence); this change keeps us independent of the outcome.
Notes
/yang-librarywould still create conflicts: revisit if we ever need to subscribe to those