Storage: Customise setting dual writing modes (#87668)

* Add feature toggles for mode 2 and 3 playlist dual writing
* Make current mode customised based on kind
* Check feature flags when initialising dual writer
* Fix linting
* Refactor NewDualWriter
This commit is contained in:
Arati R
2024-05-14 14:11:56 +02:00
committed by GitHub
parent d8904f3ca4
commit 6836bfe1ea
13 changed files with 92 additions and 41 deletions
+12
View File
@@ -228,6 +228,18 @@ var (
RequiresRestart: true, // new SQL tables created
Owner: grafanaAppPlatformSquad,
},
{
Name: "dualWritePlaylistsMode2",
Description: "Enables dual writing of playlists to both legacy and k8s storage in mode 2",
Stage: FeatureStageExperimental,
Owner: grafanaSearchAndStorageSquad,
},
{
Name: "dualWritePlaylistsMode3",
Description: "Enables dual writing of playlists to both legacy and k8s storage in mode 3",
Stage: FeatureStageExperimental,
Owner: grafanaSearchAndStorageSquad,
},
{
Name: "cloudWatchCrossAccountQuerying",
Description: "Enables cross-account querying in CloudWatch datasources",
+2
View File
@@ -28,6 +28,8 @@ topnav,deprecated,@grafana/grafana-frontend-platform,false,false,false
returnToPrevious,GA,@grafana/grafana-frontend-platform,false,false,true
grpcServer,preview,@grafana/grafana-app-platform-squad,false,false,false
unifiedStorage,experimental,@grafana/grafana-app-platform-squad,false,true,false
dualWritePlaylistsMode2,experimental,@grafana/search-and-storage,false,false,false
dualWritePlaylistsMode3,experimental,@grafana/search-and-storage,false,false,false
cloudWatchCrossAccountQuerying,GA,@grafana/aws-datasources,false,false,false
showDashboardValidationWarnings,experimental,@grafana/dashboards-squad,false,false,false
mysqlAnsiQuotes,experimental,@grafana/search-and-storage,false,false,false
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
28 returnToPrevious GA @grafana/grafana-frontend-platform false false true
29 grpcServer preview @grafana/grafana-app-platform-squad false false false
30 unifiedStorage experimental @grafana/grafana-app-platform-squad false true false
31 dualWritePlaylistsMode2 experimental @grafana/search-and-storage false false false
32 dualWritePlaylistsMode3 experimental @grafana/search-and-storage false false false
33 cloudWatchCrossAccountQuerying GA @grafana/aws-datasources false false false
34 showDashboardValidationWarnings experimental @grafana/dashboards-squad false false false
35 mysqlAnsiQuotes experimental @grafana/search-and-storage false false false
+8
View File
@@ -123,6 +123,14 @@ const (
// SQL-based k8s storage
FlagUnifiedStorage = "unifiedStorage"
// FlagDualWritePlaylistsMode2
// Enables dual writing of playlists to both legacy and k8s storage in mode 2
FlagDualWritePlaylistsMode2 = "dualWritePlaylistsMode2"
// FlagDualWritePlaylistsMode3
// Enables dual writing of playlists to both legacy and k8s storage in mode 3
FlagDualWritePlaylistsMode3 = "dualWritePlaylistsMode3"
// FlagCloudWatchCrossAccountQuerying
// Enables cross-account querying in CloudWatch datasources
FlagCloudWatchCrossAccountQuerying = "cloudWatchCrossAccountQuerying"
+24
View File
@@ -2179,6 +2179,30 @@
"stage": "experimental",
"codeowner": "@grafana/grafana-frontend-platform"
}
},
{
"metadata": {
"name": "dualWritePlaylistsMode2",
"resourceVersion": "1715369873132",
"creationTimestamp": "2024-05-10T19:37:53Z"
},
"spec": {
"description": "Enables dual writing of playlists to both legacy and k8s storage in mode 2",
"stage": "experimental",
"codeowner": "@grafana/search-and-storage"
}
},
{
"metadata": {
"name": "dualWritePlaylistsMode3",
"resourceVersion": "1715369873132",
"creationTimestamp": "2024-05-10T19:37:53Z"
},
"spec": {
"description": "Enables dual writing of playlists to both legacy and k8s storage in mode 3",
"stage": "experimental",
"codeowner": "@grafana/search-and-storage"
}
}
]
}