grafana / timestream-datasource

Amazon Timestream in Grafana
https://grafana.com/grafana/plugins/grafana-timestream-datasource
Apache License 2.0
23 stars 19 forks source link

timestream connection throws an error on grafana.com 11.1.0, plugin 2.9.1 #279

Open wz2b opened 3 months ago

wz2b commented 3 months ago

My grafana.com instance won't load the configuration page for adding a new timestream datasource. From what I can tell, it's using plugin version 2.9.1 and the grafana version is Grafana v11.1.0-69051 (9d44c8e8cf) ... it works fine on my self-hosted grafana but I'm not on version 11.1.0.

An unexpected error happened
Error: Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

    at m (https://gis.grafana.net/public/plugins/grafana-timestream-datasource/module.js?_cache=1.5.0:2:4046)
    at t.ConfigSelect (https://gis.grafana.net/public/plugins/grafana-timestream-datasource/module.js?_cache=1.5.0:2:6349)
    at div
    at eval (https://gis.grafana.net/public/plugins/grafana-timestream-datasource/module.js?_cache=1.5.0:2:38702)
    at div
    at vt (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/Connections.5ec3a2949b5ef0cf667d.js:48:2348)
    at o (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:1:172)
    at form
    at Pt (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/Connections.5ec3a2949b5ef0cf667d.js:56:1914)
    at At (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/Connections.5ec3a2949b5ef0cf667d.js:56:1464)
    at d (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:370:18096)
    at div
    at div
    at div
    at div
    at X (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:903:4471)
    at c (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:194:29695)
    at u
    at div
    at V (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:370:21842)
    at wt (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/Connections.5ec3a2949b5ef0cf667d.js:56:4940)
    at Bt (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/Connections.5ec3a2949b5ef0cf667d.js:56:5352)
    at K (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1048:29155)
    at K (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1048:31332)
    at Gt (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/Connections.5ec3a2949b5ef0cf667d.js:64:2099)
    at Suspense
    at l (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:194:124022)
    at mo (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:315:10982)
    at K (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1048:29155)
    at or (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1039:4448)
    at ls (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1039:11997)
    at kt (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1048:17387)
    at K (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1048:31332)
    at main
    at div
    at div
    at div
    at Ts (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:315:2441)
    at div
    at Kr (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:315:6888)
    at or (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1039:4448)
    at ls (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1039:11997)
    at as (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1039:11333)
    at pr (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1048:17686)
    at K (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1048:25372)
    at g (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:112:8958)
    at v (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1383:97074)
    at u (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:610:21186)
    at l (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:194:124022)
    at f (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:194:124531)
    at ot (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/885.0dcda3e8870234b9d9f5.js:1020:530)
    at $i (https://grafana-assets.grafana.net/grafana/11.1.0-69051/public/build/9602.ccb8f3676ec5906e3096.js:326:127)
wz2b commented 3 months ago

Following this error message, the expanded version of the error is this:

Maximum update depth exceeded. This can happen when a component repeatedly calls setState
inside componentWillUpdate or componentDidUpdate. React limits the number of nested
updates to prevent infinite loops.
sarahzinger commented 3 months ago

hi @wz2b I'm sorry you're running into this issue! Unfortunately, we haven't been able to reproduce it yet. A few follow up questions for you, our hope is that the answers could help us to narrow down the issue:

Thanks for reporting and for trying to test on a self hosted instance as well! If you want to try running that version of grafana locally you can by pulling down the latest of https://github.com/grafana/grafana and running git checkout 9d44c8e8cf That said when I've done that I haven't been able to recreate the bug so I'm not sure what is not working.

That said I do see ConfigSelect mentioned in the error message which I think is pointing to one of these components, although I don't spot the bug: https://github.com/grafana/timestream-datasource/blob/main/src/components/ConfigEditor.tsx#L80-L108 It definitely feels like an issue rendering those components, where something is causing an infinite loop of react state updates but I haven't seen yet what that is. I think if we can figure out how to easily recreate the bug it should be easier to work on.