messere1 opened a new pull request, #6729:
URL: https://github.com/apache/rocketmq-dashboard/pull/6729

   ### Brief Description
   
   The direct-consume footer selectors added in #6692 pick their target from 
the live consumer connection inventory, and only Apache instances have one:
   
   - Cloud vendor group rows never report online instances — 
`TencentInstanceProvider#toConsumerGroup` and 
`AliyunConverters#toConsumerGroupVO` leave `onlineInstances` at 0 and 
`instances` empty — so the `onlineInstances > 0` filter drops every group and 
the selector answers "no online consumer groups" for a healthy cloud deployment.
   - The client selector's data source, `GET /api/groups/{name}`, answers **501 
"Consumer group detail is not supported for cloud instances"** for every cloud 
vendor.
   
   Both cloud providers nevertheless advertise `DIRECT_MESSAGE_CONSUME` (the 
server-side consume API exists — Tencent's `VerifyMessageConsumption` is 
implemented, and #5119 is about auditing cloud-accepted direct consumes). The 
result on a cloud instance: the panel is enabled, the selector claims no online 
groups exist, and the send button waits for a target that can never be picked — 
an enabled-but-unreachable state. The free-text dialog that used to serve this 
case was removed in #6692.
   
   This change keeps the #6692 selector design and makes the cloud state honest 
instead: when the capability response names a non-Apache vendor, both selectors 
and the send button disable with a reason naming the real constraint, and the 
group list is not fetched at all — the same reject-with-reason convention the 
server already applies to cloud group detail. (If a cloud-targetable flow is 
wanted later, the selectors would need a manual-entry fallback; that is a 
product decision this PR deliberately does not make.)
   
   ### How Did You Test This Change?
   
   - New test 
`disablesDirectConsumeWithReasonWhenCloudVendorsCannotEnumerateTargetsTest` in 
`MessagePageAsyncState.test.tsx`: a TENCENT instance advertising 
`DIRECT_MESSAGE_CONSUME` with cloud-shaped group rows. **Red on unpatched tip** 
— the group selector was enabled (`toBeDisabled` failed on it). **Green after** 
— both selectors and the button are disabled, the tooltip names the constraint, 
and `listAllConsumerGroups` is never called.
   - Full `MessagePageAsyncState.test.tsx` 24/24 and `MessagePage.test.tsx` 
29/29 green; eslint clean; Prettier clean; `tsc -b` reports no error in the 
files this PR touches (the two pre-existing errors on the tip are in 
`auditRiskInsights.test.ts`, untouched here — being fixed separately).


-- 
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]

Reply via email to