GoogleCloudPlatform / GoogleCloudPlatform/cloud-logging-data-source-plugin
Outdated ConnectionConfig in ConfigEditor leads to mutated React props
- Vorherrschende Sprache
- TypeScript
- Sterne
- 24
- Forks
- 17
- Ø Merge
- 13 Std. 11 Min.
- Gemergte PRs (30 T.)
- 11
Beschreibung
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
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Abhängigkeitsdeklaration für @grafana/google-sdk zu finden, und prüfe die verknüpfte Änderung an ConnectionConfig.tsx sowie den Changelog-Eintrag v0.3.1. Aktualisiere die Abhängigkeit, sodass ConfigEditor nicht mehr auf Prop-Mutation angewiesen ist, und führe die vorhandenen Prüfungen des Repositorys aus, um zu bestätigen, dass das Plugin weiterhin erstellt wird und die Tests erfolgreich sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- google-cloud, react, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100