Skip to content

fix: nil TimeRange panic in MetricsViewAggregation.Export#9715

Merged
begelundmuller merged 1 commit into
mainfrom
nishantmonu51/fix-aggregation-export-nil-timerange
Jul 20, 2026
Merged

fix: nil TimeRange panic in MetricsViewAggregation.Export#9715
begelundmuller merged 1 commit into
mainfrom
nishantmonu51/fix-aggregation-export-nil-timerange

Conversation

@nishantmonu51

Copy link
Copy Markdown
Collaborator
  • Export dereferenced q.TimeRange.TimeDimension guarded only by mv.ValidSpec.TimeDimension != "", so an export request with no TimeRange/TimeStart/TimeEnd panicked on any time-dimensioned metrics view. Now mirrors the nil-safe qryTimeDim pattern already used in Resolve.
  • generateExportHeaders read qry.TimeRange.Start/.End without a nil check; RewriteQueryTimeRanges leaves qry.TimeRange unallocated for metrics views without a time dimension, so header-including exports panicked there. The date-range header is now skipped when TimeRange is nil.

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!

@begelundmuller
begelundmuller merged commit 101dce8 into main Jul 20, 2026
15 of 16 checks passed
@begelundmuller
begelundmuller deleted the nishantmonu51/fix-aggregation-export-nil-timerange branch July 20, 2026 13:11
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.

2 participants