Plugin Extensions: Read-only props for extension components (#102079)

* feat: pass read-only props to extension components

This initial commit is used to verify that things are broken in case
the datasource object is not cloned before passed in as a prop.

* chore: update tests

---------

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
This commit is contained in:
Levente Balogh
2025-05-06 06:55:23 +02:00
committed by GitHub
co-authored by Hugo Häggmark
parent 61a8495485
commit bcb2a7e36f
12 changed files with 1122 additions and 267 deletions
+9
View File
@@ -1765,6 +1765,15 @@ var (
HideFromDocs: true,
Expression: "true", // enabled by default
},
{
Name: "extensionsReadOnlyProxy",
Description: "Use proxy-based read-only objects for plugin extensions instead of deep cloning",
Stage: FeatureStageExperimental,
Owner: grafanaPluginsPlatformSquad,
HideFromAdminPage: true,
HideFromDocs: true,
FrontendOnly: true,
},
}
)
+1
View File
@@ -231,3 +231,4 @@ multiTenantFrontend,experimental,@grafana/grafana-frontend-platform,false,false,
alertingListViewV2PreviewToggle,privatePreview,@grafana/alerting-squad,false,false,true
alertRuleUseFiredAtForStartsAt,experimental,@grafana/alerting-squad,false,false,false
alertingBulkActionsInUI,GA,@grafana/alerting-squad,false,false,true
extensionsReadOnlyProxy,experimental,@grafana/plugins-platform-backend,false,false,true
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
231 alertingListViewV2PreviewToggle privatePreview @grafana/alerting-squad false false true
232 alertRuleUseFiredAtForStartsAt experimental @grafana/alerting-squad false false false
233 alertingBulkActionsInUI GA @grafana/alerting-squad false false true
234 extensionsReadOnlyProxy experimental @grafana/plugins-platform-backend false false true
+4
View File
@@ -934,4 +934,8 @@ const (
// FlagAlertingBulkActionsInUI
// Enables the alerting bulk actions in the UI
FlagAlertingBulkActionsInUI = "alertingBulkActionsInUI"
// FlagExtensionsReadOnlyProxy
// Use proxy-based read-only objects for plugin extensions instead of deep cloning
FlagExtensionsReadOnlyProxy = "extensionsReadOnlyProxy"
)
File diff suppressed because it is too large Load Diff