azure-pipelines: migrate libyang1 deb install to libyang3 - #341
azure-pipelines: migrate libyang1 deb install to libyang3#341bhouse-nexthop wants to merge 3 commits into
Conversation
sonic-buildimage no longer builds the libyang1 debs (libyang_1.0.73, libyang-cpp, python3-yang); the common_libs pipeline now produces only libyang3. Update the common-lib artifact download patterns to fetch the libyang3 deb instead of the removed libyang_*.deb, using a versionless glob. The install step uses a generic find for *.deb and needs no change. Part of sonic-net/sonic-buildimage#22385. Signed-off-by: Brad House <bhouse@nexthop.ai>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 341 in repo sonic-net/sonic-linkmgrd |
rookie-who
left a comment
There was a problem hiding this comment.
LGTM — download patterns correctly updated across all three arch targets.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run |
|
Retrying failed(or canceled) jobs... |
|
No failed(or canceled) stages or jobs found in the most recent build 1129408. |
|
/azpw run |
|
Retrying failed(or canceled) jobs... |
|
No failed(or canceled) stages or jobs found in the most recent build 1129408. |
|
The codeql is failing for the same root cause, can you fix it as well? |
|
/azpw run |
|
Retrying failed(or canceled) jobs... |
|
No failed(or canceled) stages or jobs found in the most recent build 1129408. |
The CodeQL job runs on ubuntu-22.04 where apt 'libyang-dev' is libyang1 (1.0.225), but the libswsscommon.so it downloads is built against libyang3, so the link fails with 'libyang.so.3 ... not found' / undefined references to ly_ctx_new, lyd_value_get_canonical, etc., and CodeQL reports a configuration error (no code compiled). Drop the apt libyang-dev and stage the libyang3 debs into the same prefix as swss-common. The artifacts REST API needs an exact filename (no globs), so fetch the bookworm debs zip and extract just the libyang3 debs with a glob to stay version-independent across libyang3 bumps. Signed-off-by: Brad House <bhouse@nexthop.ai>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Staging libyang3 into the prefix was not enough: libyang.so.3 is an indirect dependency (needed by libswsscommon.so, not linkmgrd directly), and ld does not search -L paths for indirect deps -- only -rpath-link and LD_LIBRARY_PATH. Export LD_LIBRARY_PATH pointing at the staged libyang3 so the link resolves ly_ctx_new, lyd_value_get_canonical, etc. Signed-off-by: Brad House <bhouse@nexthop.ai>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Looks like #345 reinvented my PR (not sure why), closing this since that one is already merged. |
Description of PR
Summary:
sonic-buildimageno longer builds the legacy libyang1 deb (libyang_1.0.73); it now builds only libyang3. Updated the threeDownloadPipelineArtifactfilter patterns inazure-pipelines.ymlfromtarget/debs/bookworm/libyang_*.debtotarget/debs/bookworm/libyang3_*.debso CI pulls the libyang3 deb. The install steps use a genericdpkg -i $(find ./download -name *.deb), so no install-command change was needed.Part of sonic-net/sonic-buildimage#22385.
Fixes # (N/A — tracked under sonic-net/sonic-buildimage#22385)
Type of change
Approach
What is the motivation for this PR?
Once libyang1 is removed from
sonic-buildimage, the oldlibyang_*.debdownload filter matches nothing and CI fails to install libyang.Work item tracking
How did you do it?
Replaced
libyang_*.debwithlibyang3_*.debin all three artifact-download filters (amd64 / arm64 / armhf common-lib).How did you verify/test it?
Re-grepped for libyang1 references — none remain except the CodeQL/LGTM distro-apt
libyang-deventries (not sourced fromsonic-buildimageartifacts), which were intentionally left unchanged.Any platform specific information?
None.
Documentation
No documentation changes required.