Kris20030907 commented on PR #6836:
URL:
https://github.com/apache/rocketmq-dashboard/pull/6836#issuecomment-6263490688
> Thanks — the gap is real: a failed NameServer registry probe currently
renders as an empty inventory instead of a failure. Two things block it as-is:
>
> 1. The `id == null` placeholder row has an unhandled consumer.
`clients.tsx` picks `nextClusters[0].endpoint`, so an unreachable entry can
become the default and `listConnections` then fails against a placeholder.
Please filter `id == null` there — or better, drop the synthetic row and carry
an explicit `probeFailed` flag instead.
> 2. This overlaps the registry work in #6816 and #6853. Please rebase once
those land.
>
> One convention note: for admin-side queries we only throw when the RPC
itself fails; an unavailable inventory should come back as a 200 with an
explicit flag rather than as a fabricated row.
Thanks for the review — agreed on all three points. Taking the "better"
option: I'll drop the synthetic row entirely and report probe failures
explicitly.
Proposed shape for `GET /api/clusters/registry` (an unavailable inventory
still returns 200):
```json
{
"clusters": [/* real discovered clusters only */],
"probeFailures": [{ "name": "dead-ns", "endpoint": "127.0.0.1:9877",
"error": "..." }]
}
```
- No fabricated rows, so `clients.tsx` can no longer pick a failed entry as
the default endpoint — empty `clusters` again means exactly "probe OK, zero
clusters".
- The NameServer tab will read the failure from `probeFailures` (warning
status, diff disabled) instead of inferring it from a placeholder's `id ==
null`.
- Happy to reshape this into per-entry `probeFailed` flags if you prefer
that form.
Will rebase onto #6816 / #6853 once they land and push the rework on top.
--
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]