GoogleCloudPlatform / GoogleCloudPlatform/cloud-trace-data-source-plugin

Outdated ConnectionConfig in ConfigEditor leads to mutated React props

Aperta
#44 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
16
Fork
6
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

This Grafana plugin uses an outdated version of @grafana/google-sdk and therefore the `ConnectionConfig` component used by `ConfigEditor` is [mutating the `authenticationType` React prop](https://github.com/grafana/grafana-google-sdk-react/blob/0e6397d7fc52e8740efd4f2bb02701f4157de1c4/src/ConnectionConfig.tsx#L26). Fixed in version [0.3.1](https://github.com/grafana/grafana-google-sdk-react/blob/main/CHANGELOG.md#v031).

While this currently works in Grafana, it may not be compatible with future versions and could lead to runtime errors. To ensure long-term stability, we recommend avoiding prop mutation. You can find more details in the React docs:
https://react.dev/reference/rules/components-and-hooks-must-be-pure#props

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.