Skip to content

ci: migrate libyang1 deb install to libyang3#113

Open
bhouse-nexthop wants to merge 1 commit into
sonic-net:masterfrom
bhouse-nexthop:bhouse.libyang3-debs
Open

ci: migrate libyang1 deb install to libyang3#113
bhouse-nexthop wants to merge 1 commit into
sonic-net:masterfrom
bhouse-nexthop:bhouse.libyang3-debs

Conversation

@bhouse-nexthop

@bhouse-nexthop bhouse-nexthop commented May 31, 2026

Copy link
Copy Markdown

Why I did it

sonic-buildimage no longer builds the legacy libyang1 debs (libyang_1.0.73, libyang-cpp, python3-yang); it now builds only libyang3 (libyang3, python3-libyang). The CI here still referenced the libyang1 debs and would break once libyang1 is gone.

Part of the libyang3 migration tracked in sonic-net/sonic-buildimage#22385.

How I did it

  • .azure-pipelines/build.yml — download the libyang3 debs from the common_libs artifact using versionless globs (libyang3_*.deb, libyang-dev_*.deb) instead of the libyang1 patterns.
  • .github/workflows/codeql-analysis.yml — install libyang-dev from the distro apt repo in the prepare step (the same approach the other SONiC repos' CodeQL workflows already use — e.g. sonic-sairedis, sonic-linkmgrd, sonic-wpa-supplicant) and drop the hardcoded sonic-build libyang1 deb downloads. This avoids pinning a libyang version in the workflow.
  • lgtm.yml — keep the apt-provided libyang-dev; drop the bare libyang entry.

How to verify it

The azure build downloads/install the libyang3 debs from current sonic-buildimage master; the CodeQL build resolves libyang headers from the distro libyang-dev, consistent with the other repos. No libyang version is hardcoded anywhere.

Description for the changelog

ci: migrate libyang1 references to libyang3 (azure build artifacts + CodeQL).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

sonic-buildimage no longer builds the libyang1 debs (libyang_1.0.73,
libyang-cpp, python3-yang); it now builds only libyang3.

- .azure-pipelines/build.yml: download the libyang3 debs from the
  common_libs artifacts using versionless globs (libyang3_*.deb,
  libyang-dev_*.deb) instead of the libyang1 patterns.
- .github/workflows/codeql-analysis.yml: install libyang-dev from the
  distro apt repo in the prepare step (matching the other SONiC repos'
  CodeQL workflows, e.g. sonic-sairedis / sonic-linkmgrd) and drop the
  hardcoded sonic-build libyang1 deb downloads.
- lgtm.yml: keep the apt-provided libyang-dev; drop the bare libyang
  entry.

Part of sonic-net/sonic-buildimage#22385.

Signed-off-by: Brad House <bhouse@nexthop.ai>
@bhouse-nexthop bhouse-nexthop force-pushed the bhouse.libyang3-debs branch from f778a44 to 14a7ff1 Compare May 31, 2026 14:38
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@rookie-who

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 113 in repo sonic-net/sonic-dhcp-relay

@rookie-who rookie-who left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Azure Pipelines changes look good — clean libyang1 → libyang3 swap.

However, the CodeQL workflow change needs a second look: the old code installed SONiC-built libyang debs (specific 1.0.73 versions), but the new code switches to system libyang-dev via apt-get install. The system package from Debian apt may provide libyang2 headers, not libyang3. If the build links against libyang3 APIs, this could cause a version mismatch or build failure in CodeQL analysis.

Consider either:

  1. Installing the SONiC-built libyang3 and libyang-dev debs in the CodeQL workflow (matching the Azure Pipelines approach), or
  2. Verifying that the system libyang-dev package provides libyang3-compatible headers.

@vaibhavhd

Copy link
Copy Markdown

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@bhouse-nexthop

Copy link
Copy Markdown
Author

/azpw run

@mssonicbld

Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

No failed(or canceled) stages or jobs found in the most recent build 1129422.

@bhouse-nexthop

Copy link
Copy Markdown
Author

/azpw run

@mssonicbld

Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld

Copy link
Copy Markdown
Collaborator

No failed(or canceled) stages or jobs found in the most recent build 1129422.

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.

4 participants