Skip to content

[test] Build with ComponentStats-based SwssStats (PR sonic-swss#4516 + sonic-swss-common#1180)#27554

Open
yutongzhang-microsoft wants to merge 2 commits into
sonic-net:masterfrom
yutongzhang-microsoft:swss-stats-implementation-v3
Open

[test] Build with ComponentStats-based SwssStats (PR sonic-swss#4516 + sonic-swss-common#1180)#27554
yutongzhang-microsoft wants to merge 2 commits into
sonic-net:masterfrom
yutongzhang-microsoft:swss-stats-implementation-v3

Conversation

@yutongzhang-microsoft
Copy link
Copy Markdown
Contributor

What I did

Recreated #27456 on top of fresh upstream master to drop the conflicts that accumulated on the old branch.

Repoints two submodules to forks carrying the ComponentStats-based SwssStats refactor:

submodule now source PR
src/sonic-swss-common b21b74e (feature/component-stats) sonic-net/sonic-swss-common#1180
src/sonic-swss 3710025 (swss-stats-use-componentstats) sonic-net/sonic-swss#4516

.gitmodules URLs are temporarily switched to https://github.com/yutongzhang-microsoft/... so CI can resolve the non-upstream SHAs.

The swss-common SHA already includes banidoru's review fixes (lock-free hot path via shared_mutex + merged lookupOrCreate, final flush on shutdown, registry pruning, setValue exclusive lock + documented gauge/counter mixing caveat).

Why I did it

The two source PRs need a sonic-buildimage CI run to validate that the refactored library + facade build cleanly inside the swss container and produce the expected SWSS_STATS:* keys at runtime. The previous staging PR (#27456) had too many conflicts to be a useful CI signal.

This PR is not for merge — once both source PRs land upstream, it will be rewritten to point .gitmodules URLs back at sonic-net/... and the submodule SHAs back to upstream master.

How to verify

NOSTRETCH=1 NOBULLSEYE=1 make target/docker-orchagent.gz make target/sonic-vs.img.gz

Boot sonic-vs, then:

redis-cli -n 2 KEYS "SWSS_STATS:*" redis-cli -n 2 HGETALL "SWSS_STATS:PORT_TABLE"

Should show SET / DEL / COMPLETE / ERROR counters incrementing as orchagent processes tasks.

Follow-up

Once both source PRs are merged upstream:

  • revert .gitmodules URLs to sonic-net/...
  • bump submodule SHAs to the merged upstream commits

Supersedes #27456.

Copilot AI review requested due to automatic review settings May 27, 2026 08:34
@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).

Copy link
Copy Markdown
Contributor

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 stages a SONiC buildimage CI run for the ComponentStats-based SwssStats refactor by repointing the sonic-swss and sonic-swss-common submodules to non-upstream forks/branches that contain the in-flight changes.

Changes:

  • Switch src/sonic-swss-common submodule URL to yutongzhang-microsoft/sonic-swss-common and set branch = feature/component-stats.
  • Switch src/sonic-swss submodule URL to yutongzhang-microsoft/sonic-swss and set branch = swss-stats-use-componentstats.

Comment thread .gitmodules
Comment on lines 1 to +4
[submodule "sonic-swss-common"]
path = src/sonic-swss-common
url = https://github.com/sonic-net/sonic-swss-common
url = https://github.com/yutongzhang-microsoft/sonic-swss-common
branch = feature/component-stats
Comment thread .gitmodules
Comment on lines 11 to +14
[submodule "sonic-swss"]
path = src/sonic-swss
url = https://github.com/sonic-net/sonic-swss
url = https://github.com/yutongzhang-microsoft/sonic-swss
branch = swss-stats-use-componentstats
@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).

Copilot AI review requested due to automatic review settings May 27, 2026 08:43
@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).

Copy link
Copy Markdown
Contributor

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

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

Comment thread .gitmodules
Comment on lines 2 to +4
path = src/sonic-swss-common
url = https://github.com/sonic-net/sonic-swss-common
url = https://github.com/yutongzhang-microsoft/sonic-swss-common
branch = feature/component-stats
Comment thread .gitmodules
Comment on lines +13 to +14
url = https://github.com/yutongzhang-microsoft/sonic-swss
branch = swss-stats-use-componentstats
@yutongzhang-microsoft yutongzhang-microsoft force-pushed the swss-stats-implementation-v3 branch from 626592a to b9c1669 Compare May 29, 2026 06:35
@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).

Copilot AI review requested due to automatic review settings May 29, 2026 07:19
@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).

Copy link
Copy Markdown
Contributor

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

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

@yxieca
Copy link
Copy Markdown
Contributor

yxieca commented May 29, 2026

/azpw ms_conflict

…+ sonic-swss-common#1180)

Rebased onto fresh upstream master to drop conflicts.

Submodule pins:
* src/sonic-swss-common -> faccc77 (feature/component-stats, includes r12f/banidoru review fixes)
* src/sonic-swss        -> dd8ef32 (swss-stats-use-componentstats, includes r12f shared_ptr const fix and master merge)

.gitmodules URLs are temporarily switched to fork mirrors so CI can resolve the non-upstream SHAs.

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@yutongzhang-microsoft yutongzhang-microsoft force-pushed the swss-stats-implementation-v3 branch from 60351ae to dab2567 Compare June 1, 2026 06:36
@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).

Rebase feature/component-stats onto upstream/master to pick up
ZmqProducerBatchedSet/ZmqProducerBatchedDel SWIG bindings (PR sonic-net#1188)
required by sonic-gnmi master, fixing the build failure:

  sonic_data_client/mixed_db_client.go:315:13:
    undefined: swsscommon.ZmqProducerBatchedSet
  sonic_data_client/mixed_db_client.go:321:13:
    undefined: swsscommon.ZmqProducerBatchedDel

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
Copilot AI review requested due to automatic review settings June 2, 2026 01:50
@yutongzhang-microsoft yutongzhang-microsoft force-pushed the swss-stats-implementation-v3 branch from dab2567 to 899588f Compare June 2, 2026 01:50
@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).

Copy link
Copy Markdown
Contributor

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

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

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.

4 participants