Skip to content

Fix non-deterministic fleet names in recent activity#25601

Open
kroepke wants to merge 2 commits intomasterfrom
fix_25384
Open

Fix non-deterministic fleet names in recent activity#25601
kroepke wants to merge 2 commits intomasterfrom
fix_25384

Conversation

@kroepke
Copy link
Copy Markdown
Member

@kroepke kroepke commented Apr 10, 2026

Summary

Fixes #25384
/nocl unreleased feature

  • Activity entries targeting multiple fleets (e.g. INGEST_CONFIG_CHANGED which targets all fleets) displayed only targets[0], whose position depends on Java Set iteration order — non-deterministic across JVM instances/restarts
  • Sort targets alphabetically on the frontend using toSorted() so the displayed fleet name is always deterministic
  • Show "and N other fleet(s)" text for multi-target entries, which were previously silently showing a single arbitrary fleet
  • Narrow useRecentActivity return type to match the useCollectorsConfig pattern

Test plan

  • Verify fleet names in recent activity are stable when toggling between Overview and Fleets pages
  • Verify INGEST_CONFIG_CHANGED entries show "and N other fleets" when multiple fleets exist
  • Verify single-fleet entries display without additional text
  • npx jest --no-coverage src/components/collectors/overview/RecentActivity.test.tsx passes (5 tests)

When activity entries target multiple fleets (e.g. INGEST_CONFIG_CHANGED),
the backend returns targets in Set iteration order which varies across JVM
instances. The frontend displayed only targets[0], causing fleet names to
appear to swap when requests hit different nodes or after restarts.

Sort targets alphabetically on the frontend and show "and N other fleet(s)"
for multi-target entries. Narrow useRecentActivity return type to match the
useCollectorsConfig pattern for type-safe test mocks.
@kroepke kroepke requested a review from a team April 10, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collectors recent activity sometimes doesn't resolve fleet names

1 participant