From 7f065c94de62260e5da9d113329e6161e7c8b360 Mon Sep 17 00:00:00 2001 From: Will Browne Date: Tue, 22 Jul 2025 09:33:23 +0100 Subject: [PATCH] Plugins: Remove pluginsCDNSyncLoader feature toggle (#108389) * remove pluginsCDNSyncLoader feature toggle * fix lint issues * fix other linter issue --- packages/grafana-data/src/types/featureToggles.gen.ts | 4 ---- pkg/plugins/config/config.go | 7 +++---- pkg/plugins/manager/loader/loader.go | 4 +--- pkg/services/featuremgmt/registry.go | 6 ------ pkg/services/featuremgmt/toggles_gen.csv | 1 - pkg/services/featuremgmt/toggles_gen.go | 4 ---- pkg/services/featuremgmt/toggles_gen.json | 3 ++- .../pluginsintegration/pluginconfig/config.go | 11 +++++------ 8 files changed, 11 insertions(+), 29 deletions(-) diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 743e9da474e..db6b0327350 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -847,10 +847,6 @@ export interface FeatureToggles { */ grafanaconThemes?: boolean; /** - * Loads plugins from CDN synchronously - */ - pluginsCDNSyncLoader?: boolean; - /** * Enables the new Jira integration for contact points in cloud alert managers. */ alertingJiraIntegration?: boolean; diff --git a/pkg/plugins/config/config.go b/pkg/plugins/config/config.go index 769c117219e..9e345e2c26c 100644 --- a/pkg/plugins/config/config.go +++ b/pkg/plugins/config/config.go @@ -30,10 +30,9 @@ type PluginManagementCfg struct { // Features contains the feature toggles used for the plugin management system. type Features struct { - SkipHostEnvVarsEnabled bool - SriChecksEnabled bool - PluginsCDNSyncLoaderEnabled bool - LocalizationForPlugins bool + SkipHostEnvVarsEnabled bool + SriChecksEnabled bool + LocalizationForPlugins bool // Needed only until Tempo Alerting / metrics TraceQL is stable // https://github.com/grafana/grafana/issues/106888 TempoAlertingEnabled bool diff --git a/pkg/plugins/manager/loader/loader.go b/pkg/plugins/manager/loader/loader.go index f3c0d47e73b..e6bbc257f23 100644 --- a/pkg/plugins/manager/loader/loader.go +++ b/pkg/plugins/manager/loader/loader.go @@ -93,10 +93,8 @@ func (l *Loader) Load(ctx context.Context, src plugins.PluginSource) ([]*plugins } validateResults := make(chan validateResult, len(bootstrappedPlugins)) - // If the PluginsCDNSyncLoaderEnabled feature is enabled, validate plugins in parallel. - // Otherwise, validate plugins sequentially. var limitSize int - if l.cfg.Features.PluginsCDNSyncLoaderEnabled && src.PluginClass(ctx) == plugins.ClassCDN { + if src.PluginClass(ctx) == plugins.ClassCDN { limitSize = min(len(bootstrappedPlugins), concurrencyLimit) } else { limitSize = 1 diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index a34c8d9b940..b595a5bf480 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -1447,12 +1447,6 @@ var ( RequiresRestart: true, Expression: "true", }, - { - Name: "pluginsCDNSyncLoader", - Description: "Loads plugins from CDN synchronously", - Stage: FeatureStageExperimental, - Owner: grafanaPluginsPlatformSquad, - }, { Name: "alertingJiraIntegration", Description: "Enables the new Jira integration for contact points in cloud alert managers.", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 2abb60b551b..b3731aa5c3f 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -189,7 +189,6 @@ datasourceConnectionsTab,privatePreview,@grafana/plugins-platform-backend,false, fetchRulesUsingPost,experimental,@grafana/alerting-squad,false,false,false newLogsPanel,experimental,@grafana/observability-logs,false,false,true grafanaconThemes,GA,@grafana/grafana-frontend-platform,false,true,false -pluginsCDNSyncLoader,experimental,@grafana/plugins-platform-backend,false,false,false alertingJiraIntegration,experimental,@grafana/alerting-squad,false,false,true useScopesNavigationEndpoint,experimental,@grafana/grafana-frontend-platform,false,false,true scopeSearchAllLevels,experimental,@grafana/grafana-frontend-platform,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 19443a615f2..a6a36e494e9 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -767,10 +767,6 @@ const ( // Enables the temporary themes for GrafanaCon FlagGrafanaconThemes = "grafanaconThemes" - // FlagPluginsCDNSyncLoader - // Loads plugins from CDN synchronously - FlagPluginsCDNSyncLoader = "pluginsCDNSyncLoader" - // FlagAlertingJiraIntegration // Enables the new Jira integration for contact points in cloud alert managers. FlagAlertingJiraIntegration = "alertingJiraIntegration" diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 2d7f6f7b589..07d86946b21 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -2526,7 +2526,8 @@ "metadata": { "name": "pluginsCDNSyncLoader", "resourceVersion": "1750434297879", - "creationTimestamp": "2025-02-07T10:07:08Z" + "creationTimestamp": "2025-02-07T10:07:08Z", + "deletionTimestamp": "2025-07-21T10:13:07Z" }, "spec": { "description": "Loads plugins from CDN synchronously", diff --git a/pkg/services/pluginsintegration/pluginconfig/config.go b/pkg/services/pluginsintegration/pluginconfig/config.go index 58b4d1dee06..ba57d743cfe 100644 --- a/pkg/services/pluginsintegration/pluginconfig/config.go +++ b/pkg/services/pluginsintegration/pluginconfig/config.go @@ -30,12 +30,11 @@ func ProvidePluginManagementConfig(cfg *setting.Cfg, settingProvider setting.Pro cfg.PluginsCDNURLTemplate, cfg.AppURL, config.Features{ - SkipHostEnvVarsEnabled: features.IsEnabledGlobally(featuremgmt.FlagPluginsSkipHostEnvVars), - SriChecksEnabled: features.IsEnabledGlobally(featuremgmt.FlagPluginsSriChecks), - PluginsCDNSyncLoaderEnabled: features.IsEnabledGlobally(featuremgmt.FlagPluginsCDNSyncLoader), - LocalizationForPlugins: features.IsEnabledGlobally(featuremgmt.FlagLocalizationForPlugins), - TempoAlertingEnabled: features.IsEnabledGlobally(featuremgmt.FlagTempoAlerting), - PluginAssetProvider: features.IsEnabledGlobally(featuremgmt.FlagPluginAssetProvider), + SkipHostEnvVarsEnabled: features.IsEnabledGlobally(featuremgmt.FlagPluginsSkipHostEnvVars), + SriChecksEnabled: features.IsEnabledGlobally(featuremgmt.FlagPluginsSriChecks), + LocalizationForPlugins: features.IsEnabledGlobally(featuremgmt.FlagLocalizationForPlugins), + TempoAlertingEnabled: features.IsEnabledGlobally(featuremgmt.FlagTempoAlerting), + PluginAssetProvider: features.IsEnabledGlobally(featuremgmt.FlagPluginAssetProvider), }, cfg.GrafanaComAPIURL, cfg.DisablePlugins,