Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: long timeranges for task queries truncated #1276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
knudtty wants to merge 4 commits into main
base: main
Choose a base branch
Loading
from aaron/limit-long-alert-timeranges

Conversation

@knudtty
Copy link
Contributor

@knudtty knudtty commented Oct 16, 2025
edited
Loading

Copy link

changeset-bot bot commented Oct 16, 2025
edited
Loading

🦋 Changeset detected

Latest commit: bf97eea

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

This PR includes changesets to release 2 packages
Name Type
@hyperdx/api Patch
@hyperdx/app 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

@knudtty knudtty marked this pull request as ready for review October 16, 2025 15:56
Copy link

vercel bot commented Oct 16, 2025
edited
Loading

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 Oct 16, 2025 10:46pm

Copy link

claude bot commented Oct 16, 2025
edited
Loading

PR Review

Overall Assessment: Good fix for preventing ClickHouse query timeouts

Code Quality Issues:

  • Logging inaccuracy in util.ts:79 - numWindows value in second log message is stale (calculated before first truncation). Consider recalculating or removing from second log.

  • Minor: Variable oneDayMs in tests (line 344) is defined but never used - Remove unused variable.

Positive Notes:

  • Comprehensive test coverage (10 test cases)
  • Clear documentation in changeset
  • Proper error prevention logic
  • Good use of logging for observability

Recommendation: Address the logging accuracy issue before merge to avoid confusion during debugging.

Copy link
Contributor

github-actions bot commented Oct 16, 2025
edited
Loading

E2E Test Results

All tests passed • 25 passed • 3 skipped • 225s

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

View full report →

dhable
dhable previously approved these changes Oct 16, 2025
Copy link
Contributor

@dhable dhable left a comment

Choose a reason for hiding this comment

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

+1 with one minor nitpick

Copy link
Contributor Author

knudtty commented Oct 16, 2025

@claude remove the unused variable that the reviewer Dan mentioned

claude[bot] reacted with eyes emoji

Copy link

claude bot commented Oct 16, 2025
edited
Loading

Code Review

No critical issues found.

The implementation looks solid:

  • ✅ Good test coverage with 11 comprehensive test cases
  • ✅ Proper handling of edge cases (zero time range, fractional windows, exact limits)
  • ✅ Clear logging added for debugging truncation behavior
  • ✅ Constants well-defined (MAX_NUM_WINDOWS, maxLookbackTime)
  • ✅ Logic correctly applies the more restrictive limit when both are exceeded

Minor observations (non-blocking):

  • The magic numbers (50, 6, 24) are now constants but could benefit from comments explaining the rationale
  • Consider adding JSDoc to calcAlertDateRange to document the truncation behavior for future maintainers

Co-authored-by: Aaron Knudtson <knudtty@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dhable dhable dhable left review comments

@wrn14897 wrn14897 Awaiting requested review from wrn14897

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /