Migrate CI pipeline from bookworm to trixie#372
Conversation
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
libyang_1.0.73 (SONiC custom build) depends on libpcre3 which is not installed by default on trixie. Install it alongside libhiredis. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
libpcre3 is not available in trixie repos. SONiC builds it from source (src/libpcre3), so install it from the pipeline 142 trixie debs before installing libyang which depends on it. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Replace assertEquals with assertEqual in test_lldp.py and namespace/test_lldp.py. Replace failIf with assertFalse in test_PDUHeader.py. These aliases were deprecated since Python 3.1 and removed in Python 3.12. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
Add load_database_config() call in TestQueueCounters.setUpClass(). When running with pytest instead of 'python3 setup.py test', test discovery order differs and the global DB config may not be loaded by a previously-run test module. This caused RuntimeError: 'Load the global DB config first using API load_sonic_global_db_config'. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
On pytest 8 (trixie/Python 3.13), test collection order changed to fully alphabetical paths, causing tests/namespace/ to run before tests/. The namespace tests call load_namespace_config() which sets multi-namespace SonicDBConfig state, but tests/test_lldp.py never reset this, causing its updaters to load from global_db/ mock data instead of the root mock data. Add load_database_config() and importlib.reload(ieee802_1ab) to test_lldp.py's setUpClass to explicitly initialize single-namespace DB config, matching the pattern used by namespace/test_lldp.py. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
pytest 8 (trixie) does not guarantee test file ordering. When namespace tests run before test_queues_stat.py, the Namespace class retains db_config_loaded=True from the multi-namespace setup. This causes ciscoSwitchQosMIB to attempt namespace validation for asic0 against a single-namespace config, triggering RuntimeError. Fix by resetting Namespace.db_config_loaded and reloading the ciscoSwitchQosMIB module in setUpClass, matching the pattern used in the test_lldp.py fix. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
apt-key was removed in Debian trixie. Use the modern gpg keyring approach instead. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Microsoft's Debian 13 apt repo is not signed/available yet. Use the official dotnet-install.sh script which works on any distro. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh | ||
| chmod +x dotnet-install.sh | ||
| ./dotnet-install.sh --channel 8.0 | ||
| export PATH="$HOME/.dotnet:$PATH" |
There was a problem hiding this comment.
Use https://packages.microsoft.com/keys/microsoft-2025.asc for downloading the public key and try using that for the Trixie repo.
There was a problem hiding this comment.
Done — switched to microsoft-2025.asc in commit 88f0b68. Thanks for the pointer!
Per reviewer suggestion, use the new 2025 signing key for Microsoft's Debian 13 apt repository. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| sudo apt-get -y purge libhiredis-dev libnl-3-dev libnl-route-3-dev | ||
| sudo apt-get -y install libhiredis0.14 | ||
| sudo dpkg -i ../target/debs/bookworm/{libyang_1.0.73_amd64.deb,libswsscommon_1.0.0_amd64.deb,python3-swsscommon_1.0.0_amd64.deb,libnl-3-200_*.deb,libnl-genl-3-200_*.deb,libnl-nf-3-200_*.deb,libnl-route-3-200_*.deb} | ||
| sudo python3 -m pip install ../target/python-wheels/bookworm/swsssdk*-py3-*.whl | ||
| sudo python3 -m pip install ../target/python-wheels/bookworm/sonic_py_common-1.0-py3-none-any.whl | ||
| sudo apt-get -y install libhiredis1.1.0 |
There was a problem hiding this comment.
In these two lines, try removing the libhiredis-dev from the sudo apt-get -y purge command, and remove the sudo apt-get -y install libhiredis1.1.0 line.
There was a problem hiding this comment.
Good call — verified the trixie slave already has libhiredis-dev (1.2.0-6+b3) and libhiredis1.1.0 pre-installed. Removed both lines in commit 68d1618.
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…ments conflict Verified locally in trixie slave container: - diff-cover not available via apt on trixie - pip install fails due to Pygments RECORD file missing (debian-managed) - pip install --break-system-packages --ignore-installed works - /usr/bin/python already exists in trixie slave (no symlink needed) - Removed debug step Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Trixie slave already has libhiredis-dev and libhiredis1.1.0 installed. No need to purge and reinstall. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| # Install .NET CORE | ||
| curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | ||
| sudo apt-add-repository https://packages.microsoft.com/debian/12/prod | ||
| curl -sSL https://packages.microsoft.com/keys/microsoft-2025.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg |
There was a problem hiding this comment.
Do not install this key into /usr/share/keyrings. Use either /etc/apt/keyrings or /etc/apt/trusted.gpg.d.
There was a problem hiding this comment.
Done — moved to /etc/apt/keyrings in commit 23aa88d. Verified locally in trixie slave.
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
- What I did
Migrated the Azure Pipelines CI from the bookworm slave container to trixie.
- How I did it
sonic-slave-bookworm:latest→sonic-slave-trixie:latestdebs/bookworm/→debs/trixie/,python-wheels/bookworm/→python-wheels/trixie/libhiredis0.14→libhiredis1.1.0(trixie ships hiredis 1.1.0)python3 setup.py test→python3 -m pytest(setup.py test is deprecated)packages.microsoft.com/debian/12/prod→debian/13/prod- How to verify it
CI pipeline should pass with trixie slave and trixie artifacts.
- Description for the changelog
Migrate CI pipeline from bookworm to trixie slave container and artifacts.