Skip to content

Conversation

@wmak
Copy link
Member

@wmak wmak commented Nov 20, 2025

  • When the start and end of the query wasn't aligned the page would error since the bucket check wouldn't match since ms were being included. This removes ms from the start/end during this check to resolve the issue

- When the start and end of the query wasn't aligned the page would
  error since the bucket check wouldn't match since ms were being
  included. This removes ms from the start/end during this check to
  resolve the issue
@wmak wmak requested review from a team as code owners November 20, 2025 21:29
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 20, 2025
) -> list[Row]:
# remove microseconds
start = start.replace(microsecond=0)
end = end.replace(microsecond=0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Database and generated timestamps misaligned when start has microseconds

The fix removes microseconds from the local start and end variables in fill_timeseries, which affects the generated bucket timestamps. However, the database query still uses the original start (with microseconds) as the origin for date_bin, causing the database-returned timestamps to be offset by the microsecond amount. This prevents the bucket matching logic from working correctly since the comparison ts == values[index]["timestamp"] will fail due to the timestamp offset, ultimately causing an UnconsumedBuckets exception when not all buckets match.

Fix in Cursor Fix in Web

@wmak wmak merged commit dea424c into master Dec 1, 2025
68 checks passed
@wmak wmak deleted the wmak/fix/unfilled-buckets-issue-metrics branch December 1, 2025 19:14
jerryzhou196 pushed a commit that referenced this pull request Dec 1, 2025
- When the start and end of the query wasn't aligned the page would
error since the bucket check wouldn't match since ms were being
included. This removes ms from the start/end during this check to
resolve the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants