Skip to content

chore: Update libyang to 6.4.13 - #11949

Merged
jennifer-richards merged 2 commits into
ietf-tools:mainfrom
xorrkaz:jclarke-update-libyang
Nov 16, 2026
Merged

jennifer-richards merged 2 commits into
ietf-tools:mainfrom
xorrkaz:jclarke-update-libyang

Conversation

@xorrkaz

@xorrkaz xorrkaz commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Among other things, this includes the YANG versioning and schema comparison work.

Among other things, this includes the YANG versioning and schema
comparison work.
@xorrkaz

xorrkaz commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author
⇒  docker buildx build --platform linux/amd64 -t datatracker-base -f base.Dockerfile .
[+] Building 776.3s (38/38) FINISHED                                                                                                                   docker:desktop-linux
 => [internal] load build definition from base.Dockerfile                                                                                                              0.0s
 => => transferring dockerfile: 6.66kB                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/python:3.12-trixie                                                                                                  3.6s
 => [internal] load metadata for docker.io/library/debian:trixie                                                                                                       2.3s
 => [internal] load .dockerignore                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                        0.0s
 => CACHED [builder 1/6] FROM docker.io/library/debian:trixie@sha256:4c25275446ca371766b8b093c696782eabce06263fccacb8d5d813b3dc44b308                                  0.0s
 => => resolve docker.io/library/debian:trixie@sha256:4c25275446ca371766b8b093c696782eabce06263fccacb8d5d813b3dc44b308                                                 0.0s
 => CACHED [stage-1 20/25] ADD https://raw.githubusercontent.com/eficode/wait-for/v2.1.3/wait-for /usr/local/bin/                                                      1.3s
 => CACHED [stage-1 14/25] ADD https://raw.githubusercontent.com/ietf-tools/idnits-mirror/main/idnits /usr/local/bin/                                                  1.3s
 => [stage-1  1/25] FROM docker.io/library/python:3.12-trixie@sha256:0d0db5b17f11b1b7d1aafa74ceadaa64ba0944b267ff6fc22008a197acd6b9ad                                 80.6s
 => => resolve docker.io/library/python:3.12-trixie@sha256:0d0db5b17f11b1b7d1aafa74ceadaa64ba0944b267ff6fc22008a197acd6b9ad                                            0.0s
 => => sha256:81c01e4d7d1c7eb7024b9278d2d38ee29083e758339c754b739df7f69db5a56b 0B / 249B                                                                             772.7s
 => => sha256:57c559fa51a119abf4092d0fdd515a9c2ecbdb55d47ba33c6c6b6ae7e3aebe56 6.09MB / 6.09MB                                                                         9.1s
 => => sha256:b23402e9b82f4228aa5725af5a918e303c15e562333e77c986e8cc7190ffd805 25.75MB / 25.75MB                                                                      26.5s
 => => sha256:992d9e06c2e85b99901bc1e8b27e557e9537e4d0eee8d4cdff13bc0f9bdee2e4 237.00MB / 237.00MB                                                                    77.9s
 => => extracting sha256:992d9e06c2e85b99901bc1e8b27e557e9537e4d0eee8d4cdff13bc0f9bdee2e4                                                                              2.1s
 => => extracting sha256:57c559fa51a119abf4092d0fdd515a9c2ecbdb55d47ba33c6c6b6ae7e3aebe56                                                                              0.1s
 => => extracting sha256:b23402e9b82f4228aa5725af5a918e303c15e562333e77c986e8cc7190ffd805                                                                              0.5s
 => => extracting sha256:81c01e4d7d1c7eb7024b9278d2d38ee29083e758339c754b739df7f69db5a56b                                                                              0.0s
 => [builder 2/6] RUN apt-get update && apt-get install -y --no-install-recommends         git         cmake         build-essential         pkg-config         ca-  181.0s
 => [stage-1  2/25] RUN apt-get update     && apt-get -qy upgrade     && apt-get -y install --no-install-recommends dialog 2>&1                                       33.2s
 => [builder 3/6] WORKDIR /src                                                                                                                                         0.1s
 => [builder 4/6] RUN git clone --branch v6.4.13 --depth 1     https://github.com/CESNET/libyang.git libyang                                                           5.3s
 => [builder 5/6] WORKDIR /src/libyang/build                                                                                                                           0.0s
 => [builder 6/6] RUN cmake         -DCMAKE_BUILD_TYPE=Release         -DCMAKE_INSTALL_PREFIX=/opt/libyang         -DBUILD_SHARED_LIBS=ON         ..     && make -j"  29.1s
 => [stage-1  3/25] COPY --from=builder /opt/libyang /opt/libyang                                                                                                      0.0s
 => [stage-1  4/25] RUN echo /opt/libyang/lib > /etc/ld.so.conf.d/libyang.conf     && ldconfig     && ln -s /opt/libyang/bin/yanglint  /usr/bin/yanglint     && ln -s  0.1s
 => [stage-1  5/25] RUN apt-get install -y --no-install-recommends ca-certificates curl gnupg     && mkdir -p /etc/apt/keyrings     && curl -fsSL https://deb.nodesou  1.4s
 => [stage-1  6/25] RUN echo "Package: nodejs" >> /etc/apt/preferences.d/preferences     && echo "Pin: origin deb.nodesource.com" >> /etc/apt/preferences.d/preferenc  0.1s
 => [stage-1  7/25] RUN mkdir -p /etc/apt/keyrings     && curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker-archive  0.8s
 => [stage-1  8/25] RUN mkdir -p /etc/apt/keyrings     && curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/keyrings/apt.post  1.5s
 => [stage-1  9/25] RUN apt-get update --fix-missing && apt-get install -qy --no-install-recommends  apache2-utils  apt-file  bash  build-essential  curl  default-  212.1s
 => [stage-1 10/25] RUN gem install kramdown-rfc2629                                                                                                                  10.7s
 => [stage-1 11/25] RUN GK_VERSION=$(if [ latest = "latest" ]; then echo "0.34.0"; else echo latest; fi)   && echo "Using GeckoDriver version: "$GK_VERSION   && wge  10.2s
 => [stage-1 12/25] RUN apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /var/cache/apt/*                                                      0.9s
 => [stage-1 13/25] RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment &&     echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen &&     echo "LANG=en_US.UTF-8" > /etc/local  10.7s
 => [stage-1 14/25] ADD https://raw.githubusercontent.com/ietf-tools/idnits-mirror/main/idnits /usr/local/bin/                                                         0.0s
 => [stage-1 15/25] RUN chmod +rx /usr/local/bin/idnits                                                                                                                0.1s
 => [stage-1 16/25] RUN mkdir -p /tmp/fonts &&     wget -q -O /tmp/fonts.tar.gz https://github.com/ietf-tools/xml2rfc-fonts/archive/refs/tags/3.22.0.tar.gz &&       270.6s
 => [stage-1 17/25] RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf                                                                                                      0.1s
 => [stage-1 18/25] RUN sed -i 's/#force_color_prompt=/force_color_prompt=/' /root/.bashrc                                                                             0.1s
 => [stage-1 19/25] RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf                                                                                                      0.1s
 => [stage-1 20/25] ADD https://raw.githubusercontent.com/eficode/wait-for/v2.1.3/wait-for /usr/local/bin/                                                             0.0s
 => [stage-1 21/25] RUN chmod +rx /usr/local/bin/wait-for                                                                                                              0.1s
 => [stage-1 22/25] RUN python3 -m pip install --root-user-action=ignore "pip @ https://files.pythonhosted.org/packages/3f/06/3e4420302363fbb71be3c7f35ce042f54bfca33  7.2s
 => [stage-1 23/25] RUN mkdir -p /assets                                                                                                                               0.1s
 => [stage-1 24/25] RUN mkdir -p /workspace                                                                                                                            0.1s
 => [stage-1 25/25] WORKDIR /workspace                                                                                                                                 0.0s
 => exporting to image                                                                                                                                                29.8s
 => => exporting layers                                                                                                                                               29.8s
 => => exporting manifest sha256:47a6f51486df0ba2c04c0f69c955a7111675b9aa948c0697d8088dbdb2c2897b                                                                      0.0s
 => => exporting config sha256:33745edd2b3d712aaebbdca7944487097f3d61d955363337ad5a90feb632d977                                                                        0.0s
 => => exporting attestation manifest sha256:682b9d9826aca06323019546ff99b4e41677ea7996da2a4028799790c3d11f40                                                          0.0s
 => => exporting manifest list sha256:2a3d1bf60c2f43f7285c31a0cdc7bee190dc82533752bf5b3060353bdfeec253                                                                 0.0s
 => => naming to docker.io/library/datatracker-base:latest
⇒  docker run --rm -it datatracker-base:latest /bin/bash
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
root@10330cf2c0c0:/workspace# yanglint --version
yanglint 6.4.13
root@10330cf2c0c0:/workspace#
exit

@jennifer-richards

Copy link
Copy Markdown
Member

Thanks! Are there known breaking changes to watch out for? Holding off on merging until we test datatracker working with it.

@xorrkaz

xorrkaz commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Nothing Michal has said, and the release notes look pretty harmless. Just more goodness:

https://github.com/CESNET/libyang/releases/tag/v6.4.13

@jennifer-richards

Copy link
Copy Markdown
Member

I gave this a try locally it did not work cleanly. Part of the trouble is that the datatracker's dev environment is not installing xym in a way that works. Not sure when that started, but I worked around it for now. After doing that, I'm finding that the yanglint call never terminates.

The command line is

yanglint --verbose -p /tmp/tmppjk107wd -p /assets/ietf-ftp/yang/rfcmod/ -p /assets/ietf-ftp/yang/draftmod/ -p /assets/ietf-ftp/yang/ianamod/ -p /assets/ietf-ftp/yang/catalogmod/ /tmp/tmppjk107wd/ietf-if-flexible-encapsulation@2026-11-02.yang -i

where /tmp/tmp... is the path where we've extracted the modules from the incoming submission and I grabbed the most recent submission with a YANG module to test with. Running that through the submission tool leaves an apparently never-terminating process behind in the celery worker pod. (It is still there after a couple hours.)

If I run the command manually, it takes off searching the working directory for definitions - I haven't let that run for hours but it's a very long list.

Running with 5.8.6 (the previous version) works using the same xym fix for dev. Running the command manually does not run away into the working directory either.

@xorrkaz

xorrkaz commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

I've looked into this. I can't reproduce the never ending process issue. But I do note that yanglint, even when you specify -p will use the CWD and all its children when resolving modules. If this is run from root or some other deep directory tree, that could run a long time. This isn't a new behavior, though. Maybe Data Tracker is using a new CWD? Can DT be changed so that it picks an empty directory from which to run yanglint?

@jennifer-richards

Copy link
Copy Markdown
Member

This isn't a new behavior, though. Maybe Data Tracker is using a new CWD? Can DT be changed so that it picks an empty directory from which to run yanglint?

This was using the same datatracker code, just swapping between base images so same working directory, etc. I'd noticed that the old version also looks in the CWD, so wondered if it was caused by the new version looking harder for something. Will look at putting it in a constrained working directory. Thanks.

@xorrkaz

xorrkaz commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

In parallel, let me ask Michal if he can add an argument to ignore the CWD.

@xorrkaz

xorrkaz commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Michal pointed out that you can pass -D to yanglint to ignore searching in the current directory. I missed this one. That may also help you out. That broad search is the only thing I can think of that could cause yanglint to run "forever". Testing in an empty directory or with -D and the module you pointed out had it running quickly.

@jennifer-richards

Copy link
Copy Markdown
Member

The -D option does the trick. Thanks!

Removes the working directory from the module search path.
@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.26%. Comparing base (0ee9354) to head (9256972).
⚠️ Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11949      +/-   ##
==========================================
+ Coverage   89.04%   89.26%   +0.21%     
==========================================
  Files         342      343       +1     
  Lines       46590    46803     +213     
==========================================
+ Hits        41488    41780     +292     
+ Misses       5102     5023      -79     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jennifer-richards
jennifer-richards merged commit 127e0b9 into ietf-tools:main Nov 16, 2026
9 checks passed
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