You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "123123213weqw (via GitHub)" <gi...@apache.org> on 2026/10/08 12:33:10 UTC
[PR] fix(web): render a placeholder for an unknown instance protocol [rocketmq-dashboard]
123123213weqw opened a new pull request, #5729:
URL: https://github.com/apache/rocketmq-dashboard/pull/5729
## What is the purpose of the change
The consumer group detail's online-instance table renders the protocol column through `PROTOCOL_MAP[protocol]`, which falls back to `{ labelKey: protocol }` when the protocol is unknown. The Apache provider builds the instance list from a broker connection set (`ConsumerConnections.toInstances`) that carries no protocol marker, so the API returns the field absent for every real deployment — `t(undefined)` then resolves to `undefined` and the column renders an empty tag on every row. The mock data always supplies `gRPC`/`Remoting`, which is why the page looked right in mock mode. The rmq.group.detail tool contract already models this case (its `instances[].protocol` enum includes `UNKNOWN`); the page should degrade the same way instead of showing an empty chip.
## Brief changelog
- Render a muted `-` placeholder when `instances[].protocol` is absent.
- Mark `protocol`, `subscribedTopics`, `lastHeartbeat` and `topicLag` optional on the `ConsumerInstance` API type to match what the backend actually returns; the mock-mode clone helper keeps deep-copying them when present.
## Verifying
Red-first: `ConsumerPage.test.tsx` 'renders a placeholder for an online instance whose protocol is unknown' fails on `rocketmq-studio` (no `-` cell, empty `.ant-tag` rendered) and passes with the change. `vitest run src/services/consumerService.test.ts src/pages/instance/__tests__/ConsumerPage.test.tsx` green (57 tests), `tsc -b` 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
Re: [PR] fix(web): render a placeholder for an unknown instance protocol [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #5729:
URL: https://github.com/apache/rocketmq-dashboard/pull/5729
--
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(web): render a placeholder for an unknown instance protocol [rocketmq-dashboard]
Posted by "123123213weqw (via GitHub)" <gi...@apache.org>.
123123213weqw commented on PR #5729:
URL: https://github.com/apache/rocketmq-dashboard/pull/5729#issuecomment-6123351583
@lizhimins Refreshed this branch onto the current `rocketmq-studio` — no conflicts, and this PR's own tests pass: lint, `ConsumerPage.test.tsx` + `consumerService.test.ts`, and `npm run build` green.
One CI note that is not this PR's doing: **Backend Build** is red for every open PR right now — the `binary-license-gate` (`server/pom.xml` → `scripts/legal.py`) fails on the current `rocketmq-studio` HEAD as well, because the spring-ai/swagger-ui/tencentcloud jars carry no embedded LICENSE/COPYING text for the gate to collect. Not something this PR can fix from its own branch.
--
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