Skip to content

Plugin SID bugfixes and improvements#945

Merged
mbj4668 merged 17 commits intombj4668:masterfrom
vvilimek:master
Apr 13, 2026
Merged

Plugin SID bugfixes and improvements#945
mbj4668 merged 17 commits intombj4668:masterfrom
vvilimek:master

Conversation

@vvilimek
Copy link
Copy Markdown
Contributor

@vvilimek vvilimek commented Feb 21, 2026

Summary of changes:

  • Fixed SID item identifier paths for nodes defined in YANG submodules.
    Reported by Andy Bierman on IETF CoRE mailing list. The initial report is here.
  • Corrected behavior of generation of .sid files for YANG submodules.
    Related to previous point.
  • Added a description metadata field to generated .sid file indicating it was created by pyang including the generation timestamp in UTC.
    A nice-to-have also mentioned by Andy Bierman, see issue on CoRE fork. The issue is based on CoRE mailing list message.
  • Fixed handling of the 'dependency-revision' list during .sid file update by properly unifying entries.
    Reported by Michael Richardson, see issue on CoRE fork.

Thanks all for reporting. I hope the code has a decent quality. Tests are included.

@vvilimek
Copy link
Copy Markdown
Contributor Author

I will add a note that the 'dependency-revision' list is now sorted alphabetically to improve interoperability.

@mbj4668
Copy link
Copy Markdown
Owner

mbj4668 commented Mar 10, 2026

Does this reflect the consensus on the yang-tooling list? The PR has conflicts, can you fix them please?

@vvilimek
Copy link
Copy Markdown
Contributor Author

Does this reflect the consensus on the yang-tooling list?

Partly. There are problems with base RFC 9595 document. The problems are being (slowly) resolved on the CoRE WG mailing list, but we have not yet reached consensus. On the other hand the changes included within the PR are things that are handled wrong by PYANG and will not be changed by the WG. From this point of view, yes this PR reflect yang-tooling consensus (even the CoRE WG consensus).

@abierman Do you agree that the changes are consensus based?

The PR has conflicts, can you fix them please?

Conflicts against what branch? The GitHub is telling me that there are not conflicts found.

@abierman
Copy link
Copy Markdown

abierman commented Mar 12, 2026 via email

@vvilimek
Copy link
Copy Markdown
Contributor Author

I do not think yang-tooling is aware of this PR.

I will fix that.

@vvilimek
Copy link
Copy Markdown
Contributor Author

vvilimek commented Mar 30, 2026

Nobody objected the changes. I wrote on the yang-tooling ML on 2026-03-13. I will call it a ML consensus. The messages in threads are not closely related (mostly).

Initial ML message can be found here.

@mbj4668
Copy link
Copy Markdown
Owner

mbj4668 commented Apr 10, 2026

Conflicts against what branch? The GitHub is telling me that there are not conflicts found.

When I look at the PR in GitHub it says "This branch cannot be rebased due to conflicts".

@vvilimek
Copy link
Copy Markdown
Contributor Author

The PR has conflicts, can you fix them please?

I wil fix them.

When I look at the PR in GitHub it says "This branch cannot be rebased due to conflicts".

What is the base branch for rebasing?

@mbj4668
Copy link
Copy Markdown
Owner

mbj4668 commented Apr 13, 2026

What is the base branch for rebasing?

What do you mean with base branch? This is "merge 27 commits into
mbj4668:master
from
vvilimek:master"

@vvilimek
Copy link
Copy Markdown
Contributor Author

Sorry, when you only merge the changes, it is clean GH: "No conflicts with base branch" and "Changes can be cleanly merged.". But when you are rebasing the vvilimek:master first, there are some conflicts. I am resolving them right now.

vvilimek added 12 commits April 13, 2026 15:36
We add the mandatory 'ietf-sid-file:sid-file' toplevel JSON object.
We also implement the field 'sid-file-status'.
We reorder the 'sid-file' fields to reflect the YANG model definition
and RFC 9595 example .sid file order.

TODOs:
  - implement sid-file-version
  - implement cli option for description
  - improve the sid-file-status to reflect status of 'item' list
We want to use similar naming convention to YANG module filenames.
The previous version generated paths incorrectly because the submodules
does not have their own namespace. Submodules live in namespace of it's
parent module.

For example (for module ietf-snmp.yang and all it's submodules)
/ietf-snmp-common:snmp/ietf-snmp-engine:engine/engine-id is incorrect
/ietf-snmp:snmp/engine/engine-id is correct
Fix issue with duplicit same module with same or different revision in
the 'dependency-revision' list.
The 'dependency-revision' list is now correctly sorted.
I wrongly removed generation of items of submodules. This commit reverts
my mistake. Thanks to Andy Bierman for notice.
@mbj4668 mbj4668 merged commit 1e11d10 into mbj4668:master Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants