Conversation
…nsion The "open" page of alerts and reports always requested the time range summary of the metrics view, so on a metrics view without a time dimension it failed with "no time dimension specified". Fetch the summary only when the metrics view has a time dimension, skip the time range mapping otherwise, and do not open the time dimension details page without one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NnT4jhLrWtkKvTboiVzAnj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Should the "Open in browser" link of an alert or report work on a metrics view without
timeseries?The UI only offers alerts and scheduled reports on explores with a time dimension (
CreateAlert.svelte,DimensionHeader.svelte,PivotDisplay.svelte). Buttimeseriesis optional, and alerts and reports written in YAML can target any metrics view. For those, the link never reaches the explore:mapQueryToDashboardalways requestsMetricsViewTimeRange(theTODO: handle non-timestamp dashboardsfrom #4666), and the page stops onno time dimension specified for metrics view.To reproduce: a metrics view without
timeseriesand an explore on it, an alert on that metrics view written asquery: name: MetricsViewAggregationwithannotations: explore: <explore>, then open the link in the alert email.If it should, this is the fix I'd suggest. The mapper requests the time range summary only when the metrics view has a time dimension, as the explore state managers already do, and
fillTimeRangeskips when there is none. A request without dimensions no longer opens the time dimension details page on such a metrics view, since there is nothing to chart against. If alerts and reports are meant to require a time dimension, happy to close this and follow whatever you prefer instead.Tests cover a metrics view without a time dimension for aggregation requests, in both the explore and pivot (report) states, and for comparison requests; they fail without the fix with "Failed to fetch time range summary.". They also assert that no time range summary is requested for it, and
runTestnow checks every emitted response, not just the last one. Checked on a self-hosted deployment: the link of an alert on a metrics view withouttimeseriesopens the explore with the alert's rows, with and without a session, and the link of an alert on a metrics view with a time dimension opens as before.Checklist:
🤖 Generated with Claude Code