Fix controller UI crash on instance listing pages when instance names lack type prefix#18805
Merged
Merged
Conversation
… lack type prefix
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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18805 +/- ##
============================================
+ Coverage 64.78% 64.79% +0.01%
Complexity 1309 1309
============================================
Files 3381 3386 +5
Lines 209967 210110 +143
Branches 32891 32912 +21
============================================
+ Hits 136020 136144 +124
- Misses 62979 63000 +21
+ Partials 10968 10966 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xiangfu0
approved these changes
Jun 18, 2026
cypherean
pushed a commit
to cypherean/pinot
that referenced
this pull request
Jun 24, 2026
… lack type prefix (apache#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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
#/minions,#/servers,#/brokers, and#/controllerspages crash withTypeError: Cannot read properties of undefined (reading 'push')when the/instancesAPI returns instance names without the expectedType_prefix (e.g. bare UUIDs likea1b2c3d4-e5f6-7890-abcd-ef1234567890).getAllInstances()inPinotMethodUtils.tssplits instance names 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 returnsundefinedand.push()throws.The fix skips instances whose name prefix doesn't match a known instance type.
Validation
Validated locally by:
PUT /zk/putGET /instancesreturns the bare UUID alongside prefixed instancesTest plan