-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Snapshots: Fix breakage of some panel types due to missing structureRev #76586
Conversation
@@ -104,6 +104,7 @@ export class PanelQueryRunner { | |||
state: LoadingState.Done, | |||
series: this.dataConfigSource.snapshotData.map((v) => toDataFrame(v)), | |||
timeRange: getDefaultTimeRange(), // Don't need real time range for snapshots | |||
structureRev, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a drive-by improvement
@@ -36,6 +36,7 @@ export function loadSnapshotData(panel: PanelModel, dashboard: DashboardModel): | |||
theme: config.theme2, | |||
timeZone: dashboard.getTimezone(), | |||
}), | |||
structureRev: 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actual fix. should be fine to hard-code a static value cause snapshots are static, iiuc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested locally and works as expected!
Fixes the panel rendering concerns in #64262
Fixes https://github.com/grafana/support-escalations/issues/7580
we rely on
structureRev
to re-configure and re-init panel options when the dataframe shape or the config struct changes. in snapshot loading this was alwaysundefined
and we did not re-init. snapshots re-render the panel 3 times (the first time with empty data), as opposed to the PanelQueryRunner, where it just renders once with data.