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

Outdated ConnectionConfig in ConfigEditor leads to mutated React props

Đang mở
#44 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
16
Fork
6
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Xác định khai báo dependency và cách sử dụng ConfigEditor, sau đó đối chiếu phiên bản @grafana/google-sdk đã cài đặt với tham chiếu ConnectionConfig.tsx được liên kết. Được xem là hoàn tất khi cập nhật lên phiên bản 0.3.1 hoặc mới hơn và xác nhận rằng plugin vẫn build được sau khi loại bỏ hành vi prop-mutation bị ảnh hưởng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
react, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.