apache / apache/rocketmq-dashboard
[Studio][Bug] Aliyun subscription rows render an empty filter mode while Apache and Tencent show one
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 683
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 58
Description
## Problem
On Aliyun instances, the consumer-group subscription sub-table renders an empty 订阅模式 (filter mode) cell for every row. Apache instances show `TAG`/`SQL` and Tencent instances show the expression type, so the same column is blank only for Aliyun.
## Evidence / source
- Code inspection of the current `rocketmq-studio` branch (base commit 36126024): `AliyunConverters.toSubscriptionEntry` maps `expression` and `type` from the SDK model but never derives `filterMode`, leaving `SubscriptionEntryVO.filterMode` null; the Apache provider derives it via its `filterMode` normalizer (`RocketMQMetadataProvider`) and the Tencent provider passes the SDK expression type (`TencentInstanceProvider`). The Aliyun SDK model already exposes `getFilterExpressionType()`, the same getter used for `type`.
- Red-first regressions in `AliyunConvertersTest` fail on the unfixed source with `expected: "SQL" but was: null` (and the TAG variant): `toSubscriptionEntryShouldDeriveFilterModeFromTheExpressionType`, `toSubscriptionEntryShouldKeepTagFilterMode`.
## Impact
A visible column of the subscription diagnostics table is blank for every Aliyun instance; cross-provider inconsistency in a read-only table. The page remains usable otherwise.
## Expected behavior / acceptance criteria
- `filterMode` is derived from the Aliyun `FilterExpressionType` with the same normalization the Apache provider uses (`SQL92` → `SQL`, `CLASS_FILTER` → `CLASS_FILTER`, otherwise `TAG`), so the three providers render identical values for identical subscription types.
- Regression coverage for both the SQL92 and TAG mappings, failing on the unfixed code.
## Related work
- Open PR #3178 (and the other i18n PRs) localize the demo/mock data strings, not the Aliyun converter mapping.
- Open PR #3231 is a separate feature (bounded subscription expression portfolio).
## PR
PR #3349 (fix plus two regression tests, red-first).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with AliyunConverters.toSubscriptionEntry and the red-first cases in AliyunConvertersTest: toSubscriptionEntryShouldDeriveFilterModeFromTheExpressionType and toSubscriptionEntryShouldKeepTagFilterMode. Compare the Apache provider's filterMode normalization, then run those tests. Done means SQL92 renders as SQL, TAG remains TAG, and the regression tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100