This is an automated email from the ASF dual-hosted git repository.
xiangfu0 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 7265af3574a Fix controller UI crash on instance listing pages when
instance names lack type prefix (#18805)
7265af3574a is described below
commit 7265af3574a8546c8d2ab70d3882f43c8405b339
Author: tarun11Mavani <[email protected]>
AuthorDate: Fri Jun 19 03:55:42 2026 +0530
Fix controller UI crash on instance listing pages when instance names lack
type prefix (#18805)
The `#/minions`, `#/servers`, `#/brokers`, and `#/controllers` pages
crash with "TypeError: Cannot read properties of undefined (reading
'push')" when `/instances` returns instance names without the expected
`Type_` prefix (e.g. bare UUIDs like `a1b2c3d4-e5f6-...`).
`getAllInstances()` splits on `_` and uses the first segment as a key
into a fixed map of {CONTROLLER, BROKER, SERVER, MINION}. When the
instance name has no recognized prefix, the lookup returns undefined
and the subsequent `.push()` throws.
The fix skips instances whose name prefix doesn't match a known
instance type.
Validated locally by:
1. Starting a batch quickstart cluster
2. Registering a bare-UUID instance directly in ZooKeeper
3. Confirming `GET /instances` returns the bare UUID alongside
prefixed instances
4. Confirming the UI crashes without the fix
5. Confirming the UI renders correctly with the fix applied
---
pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
b/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
index b4b8ed8c7b2..6910045feb5 100644
--- a/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
+++ b/pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
@@ -191,7 +191,9 @@ const getAllInstances = () => {
data.instances.forEach((instance) => {
const instanceType = instance.split('_')[0].toUpperCase();
- instanceTypeToInstancesMap[instanceType].push(instance);
+ if (instanceTypeToInstancesMap[instanceType]) {
+ instanceTypeToInstancesMap[instanceType].push(instance);
+ }
});
return instanceTypeToInstancesMap;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]