[action] [PR:345] [ci]: Install libyang3 for linkmgrd builds - #347
Merged
Conversation
## Why I did it linkmgrd CI currently assumes the common-lib artifact contains `libyang_*.deb`, but the current SONiC common-lib artifact publishes `libyang3_*.deb` and `libyang-dev_*.deb`. This causes Azure to download zero packages and then fail with `dpkg --install needs at least one package archive file argument`. CodeQL also downloads `libswsscommon` without extracting the matching SONiC `libyang3`, so the link step cannot resolve `libyang.so.3`. ## How I did it - Update Azure artifact patterns to download `libyang3_*.deb` and `libyang-dev_*.deb`. - Make Azure fail with a clear message if no libyang packages are downloaded. - Extract matching common-lib `libyang3` packages in CodeQL before building against downloaded `libswsscommon`. - Add `-Wl,-rpath-link` for the extracted library directory so CodeQL's linker can resolve `libyang.so.3`. ## How to verify it - Run the Azure `sonic-linkmgrd` pipeline. - Run the GitHub CodeQL workflow. - Confirm the libyang install step finds packages and CodeQL no longer fails with unresolved `ly_*` symbols from `libswsscommon`. Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
Collaborator
Author
|
Original PR: #345 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Why I did it
linkmgrd CI currently assumes the common-lib artifact contains
libyang_*.deb, but the current SONiC common-lib artifact publisheslibyang3_*.debandlibyang-dev_*.deb. This causes Azure to download zero packages and then fail withdpkg --install needs at least one package archive file argument.CodeQL also downloads
libswsscommonwithout extracting the matching SONiClibyang3, so the link step cannot resolvelibyang.so.3.How I did it
libyang3_*.debandlibyang-dev_*.deb.libyang3packages in CodeQL before building against downloadedlibswsscommon.-Wl,-rpath-linkfor the extracted library directory so CodeQL's linker can resolvelibyang.so.3.How to verify it
sonic-linkmgrdpipeline.ly_*symbols fromlibswsscommon.Signed-off-by: Sonic Build Admin sonicbld@microsoft.com