Advisor: Add support for multiple orgs (#112577)

This commit is contained in:
Andres Martinez Gotor
2025-10-23 09:22:31 +02:00
committed by GitHub
parent 15c6afafb3
commit eb0824a881
14 changed files with 323 additions and 147 deletions
+2 -2
View File
@@ -794,7 +794,7 @@ func Initialize(ctx context.Context, cfg *setting.Cfg, opts Options, apiOpts api
zanzanaReconciler := dualwrite2.ProvideZanzanaReconciler(cfg, featureToggles, zanzanaClient, sqlStore, serverLockService, folderimplService)
investigationsAppProvider := investigations.RegisterApp(cfg)
checkregistryService := checkregistry.ProvideService(service15, pluginstoreService, plugincontextProvider, middlewareHandler, plugincheckerService, repoManager, preinstallImpl, managedpluginsNoop, noop, ssosettingsimplService, cfg, pluginerrsStore)
advisorAppProvider := advisor2.RegisterApp(checkregistryService, cfg)
advisorAppProvider := advisor2.RegisterApp(checkregistryService, cfg, orgService)
appregistryService, err := appregistry.ProvideBuilderRunners(apiserverService, eventualRestConfigProvider, featureToggles, investigationsAppProvider, advisorAppProvider, cfg)
if err != nil {
return nil, err
@@ -1406,7 +1406,7 @@ func InitializeForTest(ctx context.Context, t sqlutil.ITestDB, testingT interfac
zanzanaReconciler := dualwrite2.ProvideZanzanaReconciler(cfg, featureToggles, zanzanaClient, sqlStore, serverLockService, folderimplService)
investigationsAppProvider := investigations.RegisterApp(cfg)
checkregistryService := checkregistry.ProvideService(service15, pluginstoreService, plugincontextProvider, middlewareHandler, plugincheckerService, repoManager, preinstallImpl, managedpluginsNoop, noop, ssosettingsimplService, cfg, pluginerrsStore)
advisorAppProvider := advisor2.RegisterApp(checkregistryService, cfg)
advisorAppProvider := advisor2.RegisterApp(checkregistryService, cfg, orgService)
appregistryService, err := appregistry.ProvideBuilderRunners(apiserverService, eventualRestConfigProvider, featureToggles, investigationsAppProvider, advisorAppProvider, cfg)
if err != nil {
return nil, err