[v8.3.x] Plugins: Refactor Grafana and Plugin version update checkers (#44662)

* 44529

* fix test
This commit is contained in:
Will Browne
2022-01-31 16:49:29 +01:00
committed by GitHub
parent 5b37d14b7f
commit ac8f1b5b6b
15 changed files with 554 additions and 264 deletions
@@ -45,8 +45,9 @@ func ProvideBackgroundServiceRegistry(
live *live.GrafanaLive, pushGateway *pushhttp.Gateway, notifications *notifications.NotificationService,
rendering *rendering.RenderingService, tokenService models.UserTokenBackgroundService,
provisioning *provisioning.ProvisioningServiceImpl, alerting *alerting.AlertEngine, pm *manager.PluginManager,
metrics *metrics.InternalMetricsService, usageStats *uss.UsageStats, updateChecker *updatechecker.Service,
metrics *metrics.InternalMetricsService, usageStats *uss.UsageStats,
tracing *tracing.TracingService, remoteCache *remotecache.RemoteCache, secretsService *secretsManager.SecretsService,
grafanaUpdateChecker *updatechecker.GrafanaService, pluginsUpdateChecker *updatechecker.PluginsService,
// Need to make sure these are initialized, is there a better place to put them?
_ *azuremonitor.Service, _ *cloudwatch.CloudWatchService, _ *elasticsearch.Service, _ *graphite.Service,
_ *influxdb.Service, _ *loki.Service, _ *opentsdb.Service, _ *prometheus.Service, _ *tempo.Service,
@@ -66,7 +67,8 @@ func ProvideBackgroundServiceRegistry(
provisioning,
alerting,
pm,
updateChecker,
grafanaUpdateChecker,
pluginsUpdateChecker,
metrics,
usageStats,
tracing,
+2 -1
View File
@@ -96,7 +96,8 @@ var wireBasicSet = wire.NewSet(
hooks.ProvideService,
kvstore.ProvideService,
localcache.ProvideService,
updatechecker.ProvideService,
updatechecker.ProvideGrafanaService,
updatechecker.ProvidePluginsService,
uss.ProvideService,
wire.Bind(new(usagestats.Service), new(*uss.UsageStats)),
manager.ProvideService,