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

Remove sceneObject from scoped vars #697

Closed bfmatei closed 5 months ago

bfmatei commented 5 months ago

Remove __sceneObject from scopedVars. This is causing various issues with datasources that are stringifing the request object for various reasons.

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

@torkelo yeah, you are totally. right, I've missed the fact that query method can call templateSrv.replace, damn.

We are trying to solve an issue with circular JSON serialisation in Zabbix plugin (they are building a string hash from the DataQueryRequest object by using JSON.stringify). We can of course fix it in Zabbix, but it feels like some other data sources may do a similar thing.

But anyways, I am afraid in the end it's the Zabbix where we need to provide the fix for this issue. Sorry @bfmatei for confusion!

bfmatei commented 5 months ago

Closing this in favor of alternative solution