Skip to content

Bazel orchagent port test#27884

Draft
lunyue-ms wants to merge 11 commits into
sonic-net:masterfrom
lunyue-ms:bazel-orchagent-port
Draft

Bazel orchagent port test#27884
lunyue-ms wants to merge 11 commits into
sonic-net:masterfrom
lunyue-ms:bazel-orchagent-port

Conversation

@lunyue-ms

Copy link
Copy Markdown

Why I did it

Work item tracking
  • Microsoft ADO (number only):

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202605

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

lunyue-ms and others added 7 commits June 11, 2026 14:01
Snapshot of all main-repo + submodule Bazel changes from
thesayyn/sonic-buildimage fork, retargeted onto upstream
sonic-net commit d2e316d (last pre-trixie bookworm point).

Architecture:
- Main repo .gitmodules still points at sonic-net official URLs
- Submodules use local 'bazel-port-overlay' branches with
  Bazel files cherry-picked from fork on top of upstream SHAs
- tools/bazel/build_infra/ vendors sonic-build-infra (no upstream)
- 'BAZEL_ORCHAGENT=y' is opt-in: when unset, all build paths
  behave identically to vanilla upstream

This is a local development snapshot for combo-mode experiments
(Bazel-built orchagent docker + make-built VS image).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>
- MODULE.bazel: pin tar.bzl 0.8.1 + git_override; pin rules_m4 to blorente fork (gcc-12/bookworm compat); use aspect_rules_py 1.8.4
- Submodules rsynced from fork (sonic-swss, sonic-swss-common, sonic-sairedis, SAI, sonic-dash-api, sonic-py-swsssdk) on local bazel-port-overlay branch
- All vendored lib*, sonic-build-infra, registry, and platform/broadcom Bazel files in place
- Verified: bazel build + bazel run :load -> docker-orchagent:latest (994MB) loaded in local docker

Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>
- slave.mk: robust wheel pkg-name capture (tail -1) + tolerant self-uninstall (mockredis stdout pollution / empty name under setuptools 75)
- dockers/docker-{platform-monitor,dhcp-relay,dhcp-server}: pip3 install --ignore-installed psutil (trixie ships python3-psutil w/o RECORD)
- src/sonic-{config-engine,py-common,supervisord-utilities}/pyproject.toml: add license={text=...} for setuptools 75 (py3.13) PEP639
- Remove src/sonic-swss.patch/series (fork swss has no Cargo.toml; cargo patches N/A)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>
The vendored-for-Bazel pyproject.toml hardcoded lxml==4.9.1, which pip (PEP 621)
prefers over setup.py's >=4.9.1. lxml 4.9.1 fails to build on trixie (libxml2 2.12).
Relaxing to >=4.9.1 lets the SONiC per-env version constraint pick 5.4.0 (trixie) /
4.9.2 (bookworm). Combo builds config-engine via make, not Bazel, so the Bazel
orchagent build is unaffected (it uses uv.lock).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>
Lock in the overlay submodule commits that make the combo full VS image build on
trixie: sairedis 5e1d643d, swss 6eaa69a4, swss-common f33fdf8. Local-only (matches
the existing port's overlay pinning); the Bazel orchagent build is unaffected.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>
Point the 5 Bazel-port overlay submodules (sonic-swss, sonic-swss-common,
sonic-sairedis, sonic-dash-api, sonic-py-swsssdk) at the lunyue-ms forks
(branch bazel-port-overlay) and record their pointers, so CI can fetch the
trixie/combo build fixes. sonic-sairedis in turn points SAI at lunyue-ms/SAI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 14, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@lunyue-ms lunyue-ms force-pushed the bazel-orchagent-port branch from d76cfd4 to 684db79 Compare June 14, 2026 09:57
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

lunyue-ms and others added 2 commits June 14, 2026 10:17
Sync the Bazel orchagent combo branch up to current upstream master to resolve
PR merge conflicts and let CI run. Submodule overlay pointers (sonic-swss,
sonic-swss-common, sonic-sairedis, sonic-dash-api, sonic-py-swsssdk, SAI) are
kept at the lunyue-ms forks; Bazel infra files are kept as added.

Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>

# Conflicts:
#	.gitmodules
#	slave.mk
#	src/libyang/.gitignore
#	src/libyang/patch/series
#	src/sonic-dash-api
#	src/sonic-sairedis
#	src/sonic-swss
#	src/sonic-swss-common
Record sonic-sairedis at the fork commit that bumps SAI to declare
version 0.0.0 (required for the Bazel orchagent repo-mapping to resolve).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

Re-sync to current upstream master tip to keep PR mergeable. Overlay submodule
pointers kept at lunyue-ms forks; Bazel infra kept.

Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>

# Conflicts:
#	src/sonic-swss-common
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

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

Azure CI checkout has no SSH key for the forks, so SSH URLs
(git@github.com:lunyue-ms/...) made 'git submodule update' fail. Switch the
5 overlay submodule URLs to public HTTPS so recursive submodule checkout works;
bump sonic-sairedis pointer for the matching SAI HTTPS URL fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Lun Yue <17232861+lunyue-ms@users.noreply.github.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

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

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.

2 participants