grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
60.72k stars 11.61k forks source link

Fix: Angular detection in plugin loader #87323

Closed jackw closed 4 days ago

jackw commented 2 weeks ago

What is this feature?

I'm not entirely happy with the solution in this PR (it would probably be better to align these two different props in the backend) but this fixes a bug in production and as far as I'm aware this code will be removed when angular is also removed.

Why do we need this feature?

So angular detection occurs during plugin loading regardless of where the plugin is loaded (dashboard, datasource config page) and which backend endpoint passed the meta information to importPluginModule.

Who is this feature for?

Everybody

Which issue(s) does this PR fix?:

Fixes #

Special notes for your reviewer:

Please check that:

jackw commented 4 days ago

This approach looks good to me! Let me know if you want me to have angular: {detected: bool} everywhere in the backend instead of angularDetected, I'm happy to help with that 🙂

Thanks for the offer @xnyo but I think we go with this for now. Like @mckn mentions it's all temporary and our time would likely be better spent elsewhere. 👍