Bazel orchagent port test#27884
Draft
lunyue-ms wants to merge 11 commits into
Draft
Conversation
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>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
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. |
d76cfd4 to
684db79
Compare
Collaborator
|
/azp run Azure.sonic-buildimage |
|
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. |
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>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
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
Collaborator
|
/azp run Azure.sonic-buildimage |
|
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>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
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
Work item tracking
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
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)