GoogleCloudPlatform / GoogleCloudPlatform/cloud-trace-data-source-plugin
Outdated ConnectionConfig in ConfigEditor leads to mutated React props
- Dominant language
- Go
- Stars
- 16
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
Research direction
Locate the dependency declaration and ConfigEditor usage, then confirm the installed @grafana/google-sdk version against the linked ConnectionConfig.tsx reference. Done means updating to version 0.3.1 or newer and confirming the plugin still builds with the affected prop-mutation behavior removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100