diff --git a/pkg/eventProcessor/in/DeployedApplicationEventProcessorService.go b/pkg/eventProcessor/in/DeployedApplicationEventProcessorService.go index acdf437f537..b967262a7dd 100644 --- a/pkg/eventProcessor/in/DeployedApplicationEventProcessorService.go +++ b/pkg/eventProcessor/in/DeployedApplicationEventProcessorService.go @@ -42,7 +42,9 @@ type DeployedApplicationEventProcessorImpl struct { installedAppRepository repository.InstalledAppRepository } -func NewDeployedApplicationEventProcessorImpl(logger *zap.SugaredLogger, pubSubClient *pubsub.PubSubClientServiceImpl, +func NewDeployedApplicationEventProcessorImpl(logger *zap.SugaredLogger, + pubSubClient *pubsub.PubSubClientServiceImpl, + appService app.AppService, gitOpsConfigReadService config.GitOpsConfigReadService, installedAppService FullMode.InstalledAppDBExtendedService, workflowDagExecutor dag.WorkflowDagExecutor, @@ -54,6 +56,7 @@ func NewDeployedApplicationEventProcessorImpl(logger *zap.SugaredLogger, pubSubC deployedApplicationEventProcessorImpl := &DeployedApplicationEventProcessorImpl{ logger: logger, pubSubClient: pubSubClient, + appService: appService, gitOpsConfigReadService: gitOpsConfigReadService, installedAppService: installedAppService, workflowDagExecutor: workflowDagExecutor, @@ -86,10 +89,10 @@ func (impl *DeployedApplicationEventProcessorImpl) SubscribeArgoAppUpdate() erro _, err = impl.pipelineRepository.GetArgoPipelineByArgoAppName(app.ObjectMeta.Name) if err != nil && err == pg.ErrNoRows { impl.logger.Infow("this app not found in pipeline table looking in installed_apps table", "appName", app.ObjectMeta.Name) - //if not found in pipeline table then search in installed_apps table + // if not found in pipeline table then search in installed_apps table installedAppModel, err := impl.installedAppRepository.GetInstalledAppByGitOpsAppName(app.ObjectMeta.Name) if err == pg.ErrNoRows { - //no installed_apps found + // no installed_apps found impl.logger.Errorw("no installed apps found", "err", err) return } @@ -98,7 +101,7 @@ func (impl *DeployedApplicationEventProcessorImpl) SubscribeArgoAppUpdate() erro return } if installedAppModel.Id > 0 { - //app found in installed_apps table hence setting flag to true + // app found in installed_apps table hence setting flag to true isAppStoreApplication = true } else { // app neither found in installed_apps nor in pipeline table hence returning diff --git a/wire_gen.go b/wire_gen.go index 14280cc724f..0ab4d0301d0 100644 --- a/wire_gen.go +++ b/wire_gen.go @@ -889,7 +889,7 @@ func InitializeApp() (*App, error) { } ciPipelineEventProcessorImpl := in.NewCIPipelineEventProcessorImpl(sugaredLogger, pubSubClientServiceImpl, gitWebhookServiceImpl) cdPipelineEventProcessorImpl := in.NewCDPipelineEventProcessorImpl(sugaredLogger, pubSubClientServiceImpl, cdWorkflowCommonServiceImpl, workflowStatusServiceImpl, triggerServiceImpl, argoUserServiceImpl, pipelineRepositoryImpl, installedAppRepositoryImpl) - deployedApplicationEventProcessorImpl := in.NewDeployedApplicationEventProcessorImpl(sugaredLogger, pubSubClientServiceImpl, gitOpsConfigReadServiceImpl, installedAppDBExtendedServiceImpl, workflowDagExecutorImpl, cdWorkflowCommonServiceImpl, pipelineBuilderImpl, appStoreDeploymentServiceImpl, pipelineRepositoryImpl, installedAppRepositoryImpl) + deployedApplicationEventProcessorImpl := in.NewDeployedApplicationEventProcessorImpl(sugaredLogger, pubSubClientServiceImpl, appServiceImpl, gitOpsConfigReadServiceImpl, installedAppDBExtendedServiceImpl, workflowDagExecutorImpl, cdWorkflowCommonServiceImpl, pipelineBuilderImpl, appStoreDeploymentServiceImpl, pipelineRepositoryImpl, installedAppRepositoryImpl) appStoreAppsEventProcessorImpl := in.NewAppStoreAppsEventProcessorImpl(sugaredLogger, pubSubClientServiceImpl, chartGroupServiceImpl, installedAppVersionHistoryRepositoryImpl) centralEventProcessor, err := eventProcessor.NewCentralEventProcessor(sugaredLogger, workflowEventProcessorImpl, ciPipelineEventProcessorImpl, cdPipelineEventProcessorImpl, deployedApplicationEventProcessorImpl, appStoreAppsEventProcessorImpl) if err != nil {