[test] Build with ComponentStats-based SwssStats (PR sonic-swss#4516 + sonic-swss-common#1180)#26924
Closed
yutongzhang-microsoft wants to merge 5 commits into
Closed
Conversation
Update sonic-swss submodule to yutongzhang-microsoft/sonic-swss@bbe820f (swss-stats-implementation branch) which adds SwssStats for orchagent profiling (PR sonic-net/sonic-swss#4434). Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Points src/sonic-swss to yutongzhang-microsoft/sonic-swss@e7be681 (swss-stats-implementation branch). Changes since bbe820f: - Add missing includes (<cstdint>, <tuple>, <unordered_map>, <utility>) - Fix printf format specifier %d -> %u for uint32_t - Only bump version counter when SET/DEL actually fires (not unknown ops) - Fix lambda captures in concurrent unit tests - Consumer::drain() calls recordError() on exception, recordComplete() on success only - Update stats() helper comment in unit tests Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Temporarily repoint src/sonic-swss and src/sonic-swss-common to the forks that carry the ComponentStats refactor so CI can build an end-to-end image and exercise the new SwssStats thin wrapper. - sonic-swss-common -> yutongzhang-microsoft/sonic-swss-common@bc9b47c (feature/component-stats, PR sonic-net/sonic-swss-common#1180) - sonic-swss -> yutongzhang-microsoft/sonic-swss@f77ef29 (swss-stats-use-componentstats, PR sonic-net/sonic-swss#4516) This commit will be revised once both PRs merge into their respective upstream repos. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…nition p4orch_tests link failed because gSwssStatsRecord was defined in both orch.cpp and swssstats.cpp. Updated sonic-swss to d63a28f which removes the duplicate from orch.cpp; the variable is now defined exactly once in swssstats.cpp. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
- sonic-swss-common: bc9b47c -> 5567352 Adds writer-thread coverage tests (PR sonic-net#1180 review sonic-net#1) and applies review fixes: warn on conflicting create() params, drop unused unique_ptr<Counter> indirection, clarify header docs (lock-free scope, ASCII-only names, interval=0 clamp, first-call-wins, ref-stability invariant), document setEnabled retention behavior. - sonic-swss: d63a28f -> 3710025 Applies PR sonic-net#4516 review fixes: replace bare gSwssStatsRecord with SwssStats::setEnabled/isEnabled (with internal defense-in-depth checks), use SET_COMMAND/DEL_COMMAND for op comparison, document recordTask no-retry and recordError per-throw semantics, fix brace style, drop redundant size_before>0 check, replace the misleading DestructorExitsQuicklyWithLargeInterval test with a real DisabledFlagSilencesRecording test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: yutongzhang-microsoft <yutongzhang@microsoft.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/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. |
Contributor
Author
|
@copilot resolve the merge conflicts in this pull request |
yutongzhang-microsoft
added a commit
to yutongzhang-microsoft/sonic-buildimage
that referenced
this pull request
May 20, 2026
…+ sonic-swss-common#1180) Recreated on top of current master to resolve conflicts in sonic-net#26924. Repoints submodules to forks carrying the ComponentStats refactor: - src/sonic-swss-common -> yutongzhang-microsoft @ feature/component-stats (55673525d58) - src/sonic-swss -> yutongzhang-microsoft @ swss-stats-use-componentstats (37100258229) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
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.
Do not merge — this PR is for CI/VS testing of the ComponentStats refactor while the two source PRs are still open.
Repoints both submodules to forks carrying the refactored library + thin-wrapper:
c95e7f0bc9b47c(eature/component-stats)e7be681f77ef29(swss-stats-use-componentstats).gitmodules URLs are also temporarily switched to
https://github.com/yutongzhang-microsoft/...so CI can resolve the non-upstream SHAs.Why
sonic-swss#4434 introduced
SwssStatspurely inside orchagent. Per review, the generic mechanism (atomic counters, version-based dirty tracking, deferred-Redis-connect writer thread, cv-based shutdown) has been lifted into sonic-swss-common asswss::ComponentStatsso other containers (gnmi, bmp, telemetry…) can reuse the same plumbing by just picking their own metric names.In sonic-swss,
SwssStatsis now a ~130-line facade that delegates everything toswss::ComponentStats::create(""SWSS"")and only owns the SET/DEL/COMPLETE/ERROR vocabulary.orch.cpphooks and the globalgSwssStatsRecordflag are unchanged.How to verify
SET / DEL / COMPLETE / ERRORcounters incrementing as orchagent processes tasks.Follow-up
Once both source PRs are merged into
sonic-net/sonic-swss-commonandsonic-net/sonic-swssmaster, this PR will be rewritten to:.gitmodulesURLs tosonic-net/...