Skip to content

validation for bounded range for data time range#9602

Merged
pjain1 merged 2 commits into
mainfrom
validate_infinite_time_ranges
Jun 24, 2026
Merged

validation for bounded range for data time range#9602
pjain1 merged 2 commits into
mainfrom
validate_infinite_time_ranges

Conversation

@pjain1

@pjain1 pjain1 commented Jun 24, 2026

Copy link
Copy Markdown
Member

In metrics time range resolver and other places we treat zero time as no data. When rill time like inf is used then returns start as zero time and that gets converted to nil values for all min/max timestamps so disallow such unbonded time ranges when defining static data time ranges.

I thought of changing the behaviour but if min is zero time that means 0001 year in golang, does that even mean anything? also MetricsViewTimeRange API converts zero time to nil and UI currently does not do queries if min time in nil. So we are already assuming at various places that zero time means no data.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@nishantmonu51 nishantmonu51 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍 , LGTM

@pjain1 pjain1 merged commit 630da80 into main Jun 24, 2026
17 checks passed
@pjain1 pjain1 deleted the validate_infinite_time_ranges branch June 24, 2026 15:52
pjain1 added a commit that referenced this pull request Jun 24, 2026
* validation for bounded range for data time range

* minor fix
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