grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
133 stars 20 forks source link

Clone SceneQueryRunner together with _results #681

Closed mdvictor closed 5 months ago

mdvictor commented 5 months ago

Fixes https://github.com/grafana/grafana/issues/84575

Fixes an issue where the DashboardDS would not get the correct data from the source panels SceneQueryRunner._results because the source panel _results buffer would be empty. This affected the dashboard DS in various scenarios but was observed consistently when creating a new dashboard.

In a new dashboard, if you would create a new panel, it's _results buffer in the query runner would be empty. As soon as you saved the dashboard and refreshed the page the buffer would populate and thus the DashboardDS would also work.

The problem was in SceneQueryRunner cloning where we now emit the data in the clone so it can be picked up by the DashboardDS.

📦 Published PR as canary version: 4.5.4--canary.681.8570869587.0
:sparkles: Test out this PR locally via: ```bash npm install @grafana/scenes@4.5.4--canary.681.8570869587.0 # or yarn add @grafana/scenes@4.5.4--canary.681.8570869587.0 ```
dprokop commented 5 months ago

This should also fix https://github.com/grafana/grafana/issues/84573 right?

UPDATE: ah of course not, it's completely different thing :)

grafanabot commented 5 months ago

:rocket: PR was released in v4.5.4 :rocket: