You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "messere1 (via GitHub)" <gi...@apache.org> on 2026/10/15 11:35:27 UTC
[PR] fix(message): disable direct-consume targets cloud instances cannot enumerate [rocketmq-dashboard]
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(message): disable direct-consume targets cloud instances cannot enumerate [rocketmq-dashboard]
Posted by "messere1 (via GitHub)" <gi...@apache.org>.
messere1 commented on PR #6729:
URL: https://github.com/apache/rocketmq-dashboard/pull/6729#issuecomment-6191150537
Same note as on #6727: a Frontend Build failure here would come from the pre-existing tip breakage (`tsc -b` fails on rocketmq-studio 816dcb64 in `auditRiskInsights.test.ts`, untouched by this PR — the files this PR changes type-check clean locally). Repair is up in #6730.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(message): disable direct-consume targets cloud instances cannot enumerate [rocketmq-dashboard]
Posted by "messere1 (via GitHub)" <gi...@apache.org>.
messere1 commented on PR #6729:
URL: https://github.com/apache/rocketmq-dashboard/pull/6729#issuecomment-6272773974
Heads-up on the red **Frontend Build (Node 20)** on 9595e94b: the failure is in `ConsumerPage.test.tsx > highlights inconsistent subscriptions and refreshes the check result`, a file this PR does not touch (the change is confined to `message.tsx`, its own test file, and `translations.ts`).
What I could reproduce locally:
- On this PR merged with the current `rocketmq-studio` tip (127c47b0), the full `ConsumerPage.test.tsx` suite drops 1–2 timing-sensitive tests per run — the CI-failing one in one run, `keeps the latest client stack when an older request resolves last` in another; the failing subset differs run to run.
- On a clean checkout of the tip itself (no PR code) the same suite also drops a test under full-suite load, while the CI-failing test passes in isolation (6.0s) — a load/timing flake on the tip, not a deterministic failure, and not reachable from this change.
- On the PR's own base (a92c2314): `ConsumerPage.test.tsx` 56/56, `MessagePageAsyncState.test.tsx` 24/24, `MessagePage.test.tsx` 29/29, `tsc -b`/eslint/Prettier all clean.
I don't have permission to re-run the failed job from this side (it needs repo admin rights). The suites this PR actually touches are green on this head, so a re-run of the failed job is all that stands between this and a fully green check run — but if the flake persists it originates on the tip, not here. Happy to help chase the tip-side flake separately if useful.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(message): disable direct-consume targets cloud instances cannot enumerate [rocketmq-dashboard]
Posted by "messere1 (via GitHub)" <gi...@apache.org>.
messere1 commented on PR #6729:
URL: https://github.com/apache/rocketmq-dashboard/pull/6729#issuecomment-6269120397
Both changes are in 9595e94b — thank you:
1. **Single-source runtime check** — the inline `vendor !== 'APACHE'` is gone; the guard now reads `!supportsApacheRuntime({ vendor: directConsumeCapability.vendor })`. The capability state stores the raw `InstanceVendor | undefined` (the local `?? null` normalization is dropped), so the undefined case flows through the helper's own undefined-means-Apache convention instead of a second one.
2. **Comment reworded** — the 501 claim is gone from the `message.tsx` comment and the test comment; both now state the actual constraint: cloud group rows carry no online instances, so the footer selectors can never fill. The description's 501 bullet is corrected the same way.
Verified on the amended head: `tsc -b` clean; `MessagePageAsyncState.test.tsx` 24/24 — including `disablesDirectConsumeWithReasonWhenCloudVendorsCannotEnumerateTargetsTest`, which still drives a TENCENT instance through the disabled-with-reason path via the helper — and `MessagePage.test.tsx` 29/29; eslint and Prettier clean.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org