unbridled-41 opened a new pull request, #3349:
URL: https://github.com/apache/rocketmq-dashboard/pull/3349
### Problem / Evidence
On an Aliyun instance, the consumer-group subscription table renders an
**empty 订阅模式 (filter mode) cell for every row**: the red test showed `expected:
"SQL" but was: null` (and `expected: "TAG" but was: null`). Apache instances
show `TAG`/`SQL` (`RocketMQMetadataProvider` line 691 via its `filterMode`
normalizer) and Tencent instances show the expression type
(`TencentInstanceProvider` line 984), so the same column is blank only for
Aliyun.
Trigger path: consumer group page subscriptions sub-table
(web/src/pages/instance/consumer.tsx:1038, renders `filterMode`) → `GET
/api/groups/{name}/subscriptions` → `MetadataService.getGroupSubscriptions` →
`AliyunInstanceProvider.getGroupSubscriptions` (line 413) →
`AliyunConverters.toSubscriptionEntry` (line 210) — which maps `expression` and
`type` from the SDK model but never derives `filterMode`, leaving the VO field
null.
### Root cause / Fix
Field-mapping gap: `toSubscriptionEntry` skips the `filterMode` builder
field. The data to derive it is already consumed —
`data.getFilterExpressionType()`.
Fix: derive `filterMode` with the same mapping the Apache provider uses
(`SQL92` → `SQL`, `CLASS_FILTER` → `CLASS_FILTER`, otherwise `TAG`), so the
three providers render identical values for identical subscription types.
### Priority & scoring
- Impact 28/40 — a visible column of a core diagnostics table is empty for
every Aliyun instance.
- Scope 10/20 — one column, one provider; page still usable.
- Reproducibility 20/20 — deterministic for all Aliyun subscription rows.
- Maintenance value 14/20 — cross-provider consistency with an established
normalization pattern.
- **PRIORITY = 72, FIX_CONFIDENCE = 92** (≥70/≥80 per the contribution bar).
### Tests
- New `AliyunConvertersTest` cases:
`toSubscriptionEntryShouldDeriveFilterModeFromTheExpressionType` (SQL92 → SQL)
and `toSubscriptionEntryShouldKeepTagFilterMode` (TAG → TAG). Both failed
before the fix with `null` and pass after.
- `mvn -B -ntp test
-Dtest='AliyunConvertersTest,AliyunInstanceProviderTest'` →
AliyunConvertersTest 3/3; AliyunInstanceProviderTest keeps only its
pre-existing baseline failure (`getGroupProgressShouldMapLagRowsTest`,
unrelated to subscriptions).
- Full `mvn -B -ntp test` on this branch: 2037 tests (pristine baseline 2035
+ 2 new); the only 3 failures (`AuthCorsIntegrationTest` ×2,
`AliyunInstanceProviderTest.getGroupProgressShouldMapLagRowsTest`) are
identical to the recorded pristine baseline. Zero new failures.
### Risk
Low. Adds one builder field plus a small pure mapping function; no other
converter or provider path is affected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]