Skip to content

Debian Trixie migration for sonic-mgmt-common#211

Merged
saiarcot895 merged 5 commits into
sonic-net:masterfrom
amrutasali:trixie_migration_for_sonic_mgmt_common
Apr 15, 2026
Merged

Debian Trixie migration for sonic-mgmt-common#211
saiarcot895 merged 5 commits into
sonic-net:masterfrom
amrutasali:trixie_migration_for_sonic_mgmt_common

Conversation

@amrutasali
Copy link
Copy Markdown
Contributor

@amrutasali amrutasali commented Apr 3, 2026

Why I did it -

Required for sonic-net/SONiC#2169 , sonic-mgmt-common is a dependency for sonic-mgmt-framework

How I did it -

Updated the package build configuration to support Trixie distro. Key changes include:
Updated Azure Pipelines to use sonic-slave-trixie container
Added libpcre3 dependencies (not available in Trixie repos)
Bumped Go version to 1.24.4 to align with Trixie's provided version
Fixed Go 1.24+ vendor module requirements for ygot tool

How to verify it -

The sonic-mgmt-framework container builds successfully under BLDENV=trixie which in turn builds sonic-mgmt-common(the .deb built was correctly paced in target/debs/trixie). Installed sonic-mgmt-framework container on a recent SONiC image and verified that the docker OS distribution shows Trixie and basic curl test on REST server hosted within the docker works fine. Also executed the pipeline tests locally.

Note:
Dependent/Related PRs:
sonic-net/sonic-buildimage#26548
sonic-net/sonic-mgmt-framework#158

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Amruta Sali <amruta_sali@dell.com>
Signed-off-by: Amruta Sali <amruta_sali@dell.com>
@amrutasali amrutasali force-pushed the trixie_migration_for_sonic_mgmt_common branch from be6236e to 9aa7f8b Compare April 3, 2026 21:51
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@lihuay lihuay requested a review from Copilot April 4, 2026 14:31
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates sonic-mgmt-common build and CI configuration to support Debian Trixie, aligning with the broader SONiC Trixie migration so downstream projects (notably sonic-mgmt-framework) can build and run on the new distro.

Changes:

  • Switch Azure Pipelines build container and artifact paths from Bookworm to Trixie, including installing libpcre3 packages required by libyang.
  • Bump the module Go version to Go 1.24.4.
  • Adjust translib YGOT binding generation to account for Go 1.24+ vendoring behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
azure-pipelines.yml Migrates pipeline container/artifact paths to Trixie and installs additional Debian dependencies.
go.mod Updates declared Go version for the module.
translib/Makefile Attempts to patch vendoring metadata to allow go run of vendored ygot generator under Go 1.24+.
cvl/cvl.go Minor logging call adjustment while parsing schema files.

Comment thread translib/Makefile Outdated
Comment thread go.mod
Comment thread azure-pipelines.yml Outdated
…ding raw package paths

Signed-off-by: Amruta Sali <amruta_sali@dell.com>
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

…l using a hard-coded wheel filename (sonic_yang_models-1.0-py3-none-any.whl)

Signed-off-by: Amruta Sali <amruta_sali@dell.com>
@mssonicbld
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@amrutasali
Copy link
Copy Markdown
Contributor Author

@saiarcot895 can you please review/merge this so that the submodule can be updated since this PR for trixie migration needs it. I'm not able to add any reviewers.

saiarcot895 pushed a commit to sonic-net/sonic-mgmt-framework that referenced this pull request Apr 14, 2026
#### Why I did it - 
Required for sonic-net/SONiC#2169 

#### How I did it - 
Updated Azure Pipelines to use sonic-slave-trixie container
Added libpcre3 dependencies (not available in Trixie repos)
Bumped Go version to 1.24.4 to align with Trixie's provided version
Updated dependency paths to use Trixie-specific packages and Python wheels

#### How to verify it - 
The sonic-mgmt-framework container  builds successfully under BLDENV=trixie. Installed it on a recent SONiC image and verified that the docker os distribution shows Trixie and basic curl test on REST server hosted within the docker works fine. Also executed the pipeline tests locally.

**Note:**
Dependent/Related  PRs:
sonic-net/sonic-buildimage#26548
sonic-net/sonic-mgmt-common#211

* Debian Trixie migration for sonic-mgmt-framework

Signed-off-by: Amruta Sali <amruta_sali@dell.com>

* modified azure-pipelines.yml for pip install to use wildcard for filename (sonic_yang_models-1.0-py3-none-any.whl)

Signed-off-by: Amruta Sali <amruta_sali@dell.com>

---------

Signed-off-by: Amruta Sali <amruta_sali@dell.com>
@saiarcot895
Copy link
Copy Markdown

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@amrutasali
Copy link
Copy Markdown
Contributor Author

@saiarcot895 the pipeline run is successful , This PR is ready to be merged

@saiarcot895 saiarcot895 merged commit ca79aaa into sonic-net:master Apr 15, 2026
3 checks passed
@yijingyan2
Copy link
Copy Markdown

yijingyan2 commented Apr 20, 2026

Hi @amrutasali, could you please help check the build failure in submodule advanced PR sonic-net/sonic-buildimage#26780, seems like the build failure is related with your changes.

make[2]: Entering directory '/sonic/src/sonic-mgmt-common'
Skipping go mod tidy (Go 1.19.8 < go.mod 1.24.4)
/usr/local/go/bin/go mod vendor
go: errors parsing go.mod:
/sonic/src/sonic-mgmt-common/go.mod:40: invalid go version '1.24.4': must match format 1.23
make[2]: *** [Makefile:41: vendor/.done] Error 1
make[2]: Leaving directory '/sonic/src/sonic-mgmt-common'
dh_auto_build: error: make -j4 returned exit code 2

maybe the go version in go.mod file needs to be 1.24 instead of 1.24.4?

submodule advanced PR for sonic-mgmt-framework is also blocked sonic-net/sonic-buildimage#26781 by sonic-net/sonic-mgmt-framework#158. Seems like a different issue. Could you help check? Thanks!

@amrutasali
Copy link
Copy Markdown
Contributor Author

Hi @amrutasali, could you please help check the build failure in submodule advanced PR sonic-net/sonic-buildimage#26780, seems like the build failure is related with your changes.

make[2]: Entering directory '/sonic/src/sonic-mgmt-common'
Skipping go mod tidy (Go 1.19.8 < go.mod 1.24.4)
/usr/local/go/bin/go mod vendor
go: errors parsing go.mod:
/sonic/src/sonic-mgmt-common/go.mod:40: invalid go version '1.24.4': must match format 1.23
make[2]: *** [Makefile:41: vendor/.done] Error 1
make[2]: Leaving directory '/sonic/src/sonic-mgmt-common'
dh_auto_build: error: make -j4 returned exit code 2

maybe the go version in go.mod file needs to be 1.24 instead of 1.24.4?

submodule advanced PR for sonic-mgmt-framework is also blocked sonic-net/sonic-buildimage#26781 by sonic-net/sonic-mgmt-framework#158. Seems like a different issue. Could you help check? Thanks!

@yijingyan2 PR #26548 needs to be merged before the submodule update PRs can succeed.

The sonic-mgmt-common/go.mod file now specifies : go 1.24.4
But the build environment is using Go 1.19.8(bookworm), which doesn't support the version format 1.24.4 (it expects format like 1.23).
PR #26548 updates the Go version in sonic-buildimage's build environment to support Go 1.24.4+
Submodule update PRs #26780 & #26781 fail because they try to build the new sonic-mgmt-common with the old Go version

From the build logs it is seen that bookworm environment is being used to build sonic-mgmt-common and sonic-mgmt-framework:

 SONIC_BUILD_JOBS=4 SONIC_VERSION_CONTROL_COMPONENTS=py2,py3,web,git,docker MIRROR_SNAPSHOT=y SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/broadcom INSTALL_DEBUG_TOOLS=y target/sonic-broadcom.bin
2026-04-20T03:22:30.4323463Z +++ --- Making target/sonic-broadcom.bin --- +++
2026-04-20T03:22:30.4326751Z ./scripts/run_with_retry make EXTRA_DOCKER_TARGETS=sonic-broadcom.bin BLDENV=bookworm -f Makefile.work bookworm
....
.....
2026-04-20T03:23:37.2539630Z [ building ] [ target/debs/bookworm/sonic-mgmt-common_1.0.0_amd64.deb ] 
2026-04-20T03:23:38.2568829Z [ finished ] [ target/debs/bookworm/sonic-mgmt-common_1.0.0_amd64.deb ] 
2026-04-20T03:23:38.2569577Z [ FAIL LOG START ] [ target/debs/bookworm/sonic-mgmt-common_1.0.0_amd64.deb
......
......
Skipping go mod tidy (Go 1.19.8 < go.mod 1.24.4)
/usr/local/go/bin/go mod vendor
go: errors parsing go.mod:
/sonic/src/sonic-mgmt-common/go.mod:40: invalid go version '1.24.4': must match format 1.23

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.

6 participants