Chore: Fix flaky test by removing the extsvcauth background service (#79044)

This commit is contained in:
Gabriel MABILLE 2023-12-04 22:26:55 +01:00 committed by GitHub
parent 38bc41651a
commit 99580d60f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -14,7 +14,6 @@ import (
"github.com/grafana/grafana/pkg/services/auth"
"github.com/grafana/grafana/pkg/services/cleanup"
"github.com/grafana/grafana/pkg/services/dashboardsnapshots"
extsvcreg "github.com/grafana/grafana/pkg/services/extsvcauth/registry"
grafanaapiserver "github.com/grafana/grafana/pkg/services/grafana-apiserver"
"github.com/grafana/grafana/pkg/services/grpcserver"
"github.com/grafana/grafana/pkg/services/guardian"
@ -58,7 +57,7 @@ func ProvideBackgroundServiceRegistry(
bundleService *supportbundlesimpl.Service, publicDashboardsMetric *publicdashboardsmetric.Service,
keyRetriever *dynamic.KeyRetriever, dynamicAngularDetectorsProvider *angulardetectorsprovider.Dynamic,
grafanaAPIServer grafanaapiserver.Service,
anon *anonimpl.AnonDeviceService, reg *extsvcreg.Registry,
anon *anonimpl.AnonDeviceService,
// Need to make sure these are initialized, is there a better place to put them?
_ dashboardsnapshots.Service, _ *alerting.AlertNotificationService,
_ serviceaccounts.Service, _ *guardian.Provider,
@ -99,7 +98,6 @@ func ProvideBackgroundServiceRegistry(
dynamicAngularDetectorsProvider,
grafanaAPIServer,
anon,
reg,
)
}

View File

@ -200,8 +200,8 @@ func (r *Registry) retrieveExtSvcProviders(ctx context.Context) (map[string]exts
return extsvcs, nil
}
func (r *Registry) Run(ctx context.Context) error {
// This is a one-time background job.
// Cleans up external services that have not been registered this time.
return r.CleanUpOrphanedExternalServices(ctx)
}
// func (r *Registry) Run(ctx context.Context) error {
// // This is a one-time background job.
// // Cleans up external services that have not been registered this time.
// return r.CleanUpOrphanedExternalServices(ctx)
// }