Repository navigation
[ISSUE #11630] fix(tools): report each broker's version in exportMetrics - #11631
Tang-Kin-Long wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #11631 +/- ##
=============================================
+ Coverage 50.86% 50.91% +0.04%
- Complexity 14881 14889 +8
=============================================
Files 1391 1391
Lines 103773 103773
Branches 13614 13614
=============================================
+ Hits 52789 52832 +43
+ Misses 44724 44684 -40
+ Partials 6260 6257 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
JiangSOBD
left a comment
There was a problem hiding this comment.
Reading brokerVersionDesc from the existing per-broker runtime stats fixes the local-tool-version mix-up without another RPC. The regression test usefully checks the generated metrics.json for two distinct broker versions. One small follow-up: could you add a case where brokerVersionDesc is absent and define the expected JSON output (for example, an explicit unknown value)? This would keep missing version metadata distinguishable from a real broker version. Review based on the diff; I have not run the tests locally.
|
Thanks for your review! Addressed in |
Which Issue(s) This PR Fixes
Brief Description
mqadmin exportMetricspreviously wrote the local mqadmin version to every broker'sruntimeVersion.rocketmqVersionfield inmetrics.json. This could make brokers running different versions appear to be on the same release.The command now reads
brokerVersionDescfrom each broker's existing runtime stats response. The report format stays the same, and no additional RPC is needed.How Did You Test This Change?
Ran
ExportMetricsCommandTestwith two mocked brokers reportingV5_3_2andV5_4_0. The test executes the export command and reads the generatedmetrics.json.Before the fix, the first assertion failed because
broker-awas reported asV5_5_1, the local mqadmin version. After the fix, the same test passed and verified the correct version for both brokers.