Skip to content

Fix controller UI crash on instance listing pages when instance names lack type prefix#18805

Merged
xiangfu0 merged 1 commit into
apache:masterfrom
tarun11Mavani:fix-instance-listing-crash
Jun 18, 2026
Merged

Fix controller UI crash on instance listing pages when instance names lack type prefix#18805
xiangfu0 merged 1 commit into
apache:masterfrom
tarun11Mavani:fix-instance-listing-crash

Conversation

@tarun11Mavani

Copy link
Copy Markdown
Contributor

Summary

The #/minions, #/servers, #/brokers, and #/controllers pages crash with TypeError: Cannot read properties of undefined (reading 'push') when the /instances API returns instance names without the expected Type_ prefix (e.g. bare UUIDs like a1b2c3d4-e5f6-7890-abcd-ef1234567890).

getAllInstances() in PinotMethodUtils.ts splits 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 returns undefined and .push() throws.

The fix skips instances whose name prefix doesn't match a known instance type.

Validation

Validated locally by:

  1. Starting a batch quickstart cluster
  2. Registering a bare-UUID instance directly in ZooKeeper via PUT /zk/put
  3. Confirming GET /instances returns the bare UUID alongside prefixed instances
  4. Confirming the UI crashes without the fix (TypeError in console, page stuck on loader)
  5. Confirming the UI renders correctly with the fix applied (bare-UUID instance silently skipped)

Test plan

  • Local quickstart with injected bare-UUID instance
  • Verified crash reproduces without fix
  • Verified page loads with fix

… 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
@tarun11Mavani tarun11Mavani marked this pull request as ready for review June 18, 2026 19:12
@codecov-commenter

codecov-commenter commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.79%. Comparing base (d469cb1) to head (afd5232).
⚠️ Report is 7 commits behind head on master.

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     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 64.79% <ø> (+0.01%) ⬆️
temurin 64.79% <ø> (+0.01%) ⬆️
unittests 64.79% <ø> (+0.01%) ⬆️
unittests1 56.96% <ø> (+<0.01%) ⬆️
unittests2 37.29% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xiangfu0 xiangfu0 merged commit 7265af3 into apache:master Jun 18, 2026
11 checks passed
@xiangfu0 xiangfu0 added bug Something is not working as expected ui UI related issue labels 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is not working as expected ui UI related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants