Skip to content

Conversation

@teeohhem
Copy link
Contributor

Also fixes hardcoded ResourceAttributes

Fixes: HDX-2790, HDX-2792

Also fixes hardcoded ResourceAttributes

Fixes: HDX-2790, HDX-2792
@vercel
Copy link

vercel bot commented Nov 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
hyperdx-v2-oss-app Ready Ready Preview Comment Nov 11, 2025 4:22pm

@changeset-bot
Copy link

changeset-bot bot commented Nov 11, 2025

🦋 Changeset detected

Latest commit: 4612e13

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@hyperdx/app Patch
@hyperdx/api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Implement client-side sorting in KubernetedDashboardPage.
@claude
Copy link

claude bot commented Nov 11, 2025

PR Review

Overall: Good changes - fixes sorting bug and hardcoded ResourceAttributes

Key improvements:

  • Properly uses metricSource.resourceAttributesExpression instead of hardcoded 'ResourceAttributes'
  • Moves sorting to client-side, fixing server-side sort limitations
  • Comprehensive test coverage for sorting functionality

Issues to address:

  • ⚠️ Performance concern: Client-side sorting on potentially large datasets → Consider pagination or virtual scrolling optimizations if table performance degrades with many pods (packages/app/src/KubernetesDashboardPage.tsx:266-293)

  • ⚠️ Test flakiness: Multiple page.waitForTimeout(500) calls → Replace with waitFor or toPass for more reliable tests (packages/app/tests/e2e/features/kubernetes.spec.ts:211, 233, 244, etc.)

  • ⚠️ Missing return in switch: getValue function doesn't return anything for default case → Add default return or handle explicitly (packages/app/src/KubernetesDashboardPage.tsx:267-280)

Suggestions:

  • Consider adding a comment explaining why client-side sorting was chosen over server-side
  • The test at line 222 (expect(firstRestartsBefore).not.toBe(firstRestartsAfter)) could fail if data happens to be the same after sorting → Consider checking actual sort order instead

@github-actions
Copy link
Contributor

E2E Test Results

All tests passed • 45 passed • 3 skipped • 391s

Status Count
✅ Passed 45
❌ Failed 0
⚠️ Flaky 1
⏭️ Skipped 3

View full report →

}),
);

// Sort the data client-side
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we prefer to sort client-side instead of CH here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case, it's much faster than another server call with potentially hundreds of thousands of records.

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.

3 participants