fix: special handling of unmarshalling for invalid json dashboards (#108519)

* implement special dashboard fallback logic when dashboard data has invalid json behind feature flag

---------

Co-authored-by: Will Assis <william@williamassis.com>
This commit is contained in:
Mustafa Sencer Özcan
2025-07-30 10:18:38 -04:00
committed by GitHub
co-authored by Will Assis
parent 4a34a2313c
commit 98e37f2ca9
36 changed files with 218 additions and 35 deletions
+6
View File
@@ -501,6 +501,12 @@ var (
Stage: FeatureStageExperimental,
Owner: grafanaAppPlatformSquad,
},
{
Name: "scanRowInvalidDashboardParseFallbackEnabled",
Description: "Enable fallback parsing behavior when scan row encounters invalid dashboard JSON",
Stage: FeatureStageExperimental,
Owner: grafanaSearchAndStorageSquad,
},
{
Name: "datasourceQueryTypes",
Description: "Show query type endpoints in datasource API servers (currently hardcoded for testdata, expressions, and prometheus)",
+1
View File
@@ -65,6 +65,7 @@ kubernetesDashboards,experimental,@grafana/grafana-app-platform-squad,false,fals
dashboardDisableSchemaValidationV1,experimental,@grafana/grafana-app-platform-squad,false,false,false
dashboardDisableSchemaValidationV2,experimental,@grafana/grafana-app-platform-squad,false,false,false
dashboardSchemaValidationLogging,experimental,@grafana/grafana-app-platform-squad,false,false,false
scanRowInvalidDashboardParseFallbackEnabled,experimental,@grafana/search-and-storage,false,false,false
datasourceQueryTypes,experimental,@grafana/grafana-app-platform-squad,false,true,false
queryService,experimental,@grafana/grafana-datasources-core-services,false,true,false
queryServiceRewrite,experimental,@grafana/grafana-datasources-core-services,false,true,false
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
65 dashboardDisableSchemaValidationV1 experimental @grafana/grafana-app-platform-squad false false false
66 dashboardDisableSchemaValidationV2 experimental @grafana/grafana-app-platform-squad false false false
67 dashboardSchemaValidationLogging experimental @grafana/grafana-app-platform-squad false false false
68 scanRowInvalidDashboardParseFallbackEnabled experimental @grafana/search-and-storage false false false
69 datasourceQueryTypes experimental @grafana/grafana-app-platform-squad false true false
70 queryService experimental @grafana/grafana-datasources-core-services false true false
71 queryServiceRewrite experimental @grafana/grafana-datasources-core-services false true false
+4
View File
@@ -271,6 +271,10 @@ const (
// Log schema validation errors so they can be analyzed later
FlagDashboardSchemaValidationLogging = "dashboardSchemaValidationLogging"
// FlagScanRowInvalidDashboardParseFallbackEnabled
// Enable fallback parsing behavior when scan row encounters invalid dashboard JSON
FlagScanRowInvalidDashboardParseFallbackEnabled = "scanRowInvalidDashboardParseFallbackEnabled"
// FlagDatasourceQueryTypes
// Show query type endpoints in datasource API servers (currently hardcoded for testdata, expressions, and prometheus)
FlagDatasourceQueryTypes = "datasourceQueryTypes"
+12
View File
@@ -2760,6 +2760,18 @@
"codeowner": "@grafana/identity-access-team"
}
},
{
"metadata": {
"name": "scanRowInvalidDashboardParseFallbackEnabled",
"resourceVersion": "1753730899886",
"creationTimestamp": "2025-07-28T19:28:19Z"
},
"spec": {
"description": "Enable fallback parsing behavior when scan row encounters invalid dashboard JSON",
"stage": "experimental",
"codeowner": "@grafana/search-and-storage"
}
},
{
"metadata": {
"name": "scopeApi",