Opennms plugin for Grafana breaks as of Grafana 11.3.0
Description
Environment
Attachments
Activity
Scott Theleman January 22, 2025 at 8:12 PM
This seems to be caused by some change in how dropdown data is saved in Grafana Segment
controls. The error occurs both when a user changes a dropdown selection, for example in an Entity Data source query builder, WHERE
clause by changing a label. Grafana also saves the dashboard data when this happens and this error is triggered. While the error seems to be ignored when changing the dropdown selection (i.e. the selection is still changed), when user attempts to save the dashboard it's an error that prevents the save.
The given error is part of Grafana code doing a jsonDiff
in getPanelChanges()
in getDashboardChanges.ts
in webpack://grafana/public/app/features/dashboard-scene/saving/getDashboardChanges.ts
.
Issue may be in:
targets[0].clauses[0].attribute.type
ortargets[0].clauses[0].attribute.value.type
of type SearchPropertyType
where some data is expected to be a string (which has the b.replace()
operations performed on it), but is actually an object with { id, label }
or { i, l }
or similar.
Not sure this is the issue, but just noting my findings.
Did not see anything specifically about this in Grafana 11.3.0.
We would have to do more work in order to make OPG compatible with Grafana 11, so we are closing this for now.
Scott Theleman January 21, 2025 at 2:52 PM
thanks - I’ll write up my findings soon, we’ll probably need to come back to it later when we have more resources to work on it.
Eric Maki January 21, 2025 at 2:49 PM
Hi , there is no customer ticket associated with this issue. We discovered it in my lab. We wanted to bring this issue up.
Best regards,
Eric
Scott Theleman January 21, 2025 at 2:44 PM
is there a customer or support ticket associated with this issue? Seems there may be a small incompatibility in data structures when trying to save, but would need to spend more time on it to see if there’s a fix or not. As noted, we don’t officially support Grafana 11 or even 10 yet, though OPG seems to generally work with at least 10.
Scott Theleman January 20, 2025 at 10:50 PM
With Grafana 11.3.0+ I’m finding this same error both when trying to save a dashboard and also when updating an Entity data source query, changing one of the dropdowns like WHERE
or ORDER BY
. Seems to have something to do with the Json stringify code ultimately called after EntityQueryEditor
, updateQuery
, possibly when passed an empty array. But it’s hard to troubleshoot since the call stack is pretty deep.
We don’t officially support Grafana 11 yet. We’ll try to look into it more, but best advice is to see if customer can use Grafana 11.2.5.
After Grafana v11.2.5 the OPG breaks when trying to save a dashboard.
We get this error in the browser:
TypeError: b.replace is not a function. (In 'b.replace(_,"\\$&")', 'b.replace' is undefined)
@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:278:11240
Jt@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:39:138779
div
X@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:194:22931
Yn@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:278:51312
Jt@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:39:138779
z0@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:39:381384
In@http://192.168.50.88:3000/public/build/8779.5dae8c32eee2bd40de3c.js:1:2523
Xo@http://192.168.50.88:3000/public/build/8779.5dae8c32eee2bd40de3c.js:51:32922
Suspense
g@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:12:133446
th@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:2378:39173
tt@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:295:25345
Re@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:295:4606
ot@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:295:12239
zt@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:286:18079
tt@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:295:27539
div
@http://192.168.50.88:3000/public/build/3719.c065b2e146c4c8347d51.js:1:135431
main
div
div
div
Pf@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:2380:4702
Af@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:2380:9995
Re@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:295:4606
ot@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:295:12239
Ke@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:295:11600
un@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:286:18367
y@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:5:188616
tt@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:295:21507
Kc@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:2380:11397
div
Xl@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:2378:18764
y@http://192.168.50.88:3000/public/build/3379.020d2edcd8eb1d9f6d9a.js:151:9173
C@http://192.168.50.88:3000/public/build/4239.c2eca2b0222ddf40980b.js:183:17540
d@http://192.168.50.88:3000/public/build/3719.c065b2e146c4c8347d51.js:24:12200
g@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:12:133446
i@
pn@http://192.168.50.88:3000/public/build/4239.c2eca2b0222ddf40980b.js:187:509
jf@http://192.168.50.88:3000/public/build/322.9e448e90c86f8dd2907e.js:2380:13061
I didn’t see any errors in the logs, but I could be overlooking them