Be more tolerant to invalid JSON when parsing dashboards for indexing (#114040)

* Tags can only be string array.

* Be more lenient when parsing dashboard. Parse what we can, don't error out easily.

* Check element before parsing, log unexpected types.
This commit is contained in:
Peter Štibraný
2025-11-18 14:01:57 +01:00
committed by GitHub
parent e821578ab0
commit ec74a721ea
8 changed files with 586 additions and 100 deletions
@@ -0,0 +1,58 @@
{
"title": "adfbg6f",
"tags": null,
"datasource": [
{
"uid": "default.uid",
"type": "default.type"
}
],
"panels": [
{
"id": 1,
"title": "green pie",
"libraryPanel": "a7975b7a-fb53-4ab7-951d-15810953b54f",
"datasource": [
{
"uid": "default.uid",
"type": "default.type"
}
]
},
{
"id": 0,
"title": "",
"datasource": [
{
"uid": "default.uid",
"type": "default.type"
}
]
},
{
"id": 7,
"title": "",
"datasource": [
{
"uid": "default.uid",
"type": "default.type"
}
]
},
{
"id": 8,
"title": "",
"datasource": [
{
"uid": "default.uid",
"type": "default.type"
}
]
}
],
"schemaVersion": 0,
"linkCount": 4,
"timeFrom": "",
"timeTo": "",
"timezone": ""
}