Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/appWorkflow/AppWorkflowService.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,11 @@ func (impl AppWorkflowServiceImpl) FindAppWorkflowMappingForEnv(appIds []int) (m
workflowMappings := make(map[int][]bean4.AppWorkflowMappingDto)
workflows := make(map[int]*bean4.AppWorkflowDto)
for _, w := range appWorkflowMappings {
if _, ok := pipelineMap[w.ComponentId]; !ok {
impl.Logger.Warnw("pipeline not found for componentId", "componentId", w.ComponentId, "appWorkflowId", w.AppWorkflowId)
// If the pipeline is not found, we skip adding this mapping as one possible reason would be pipeline have been deleted
continue
}
if _, ok := workflows[w.AppWorkflowId]; !ok {
workflows[w.AppWorkflowId] = &bean4.AppWorkflowDto{
Id: w.AppWorkflowId,
Expand Down
5 changes: 5 additions & 0 deletions pkg/pipeline/DeploymentPipelineConfigService.go
Original file line number Diff line number Diff line change
Expand Up @@ -1821,6 +1821,11 @@ func (impl *CdPipelineConfigServiceImpl) GetCdPipelinesByEnvironment(request res
}

for _, dbPipeline := range authorizedPipelines {
if _, ok := pipelineWorkflowMapping[dbPipeline.Id]; !ok {
// can be due to concurrent deletion of pipeline, app workflow mapping
impl.logger.Warnw("pipeline workflow mapping not found for pipeline", "pipelineId", dbPipeline.Id)
continue
}
var customTag *bean.CustomTagData
var customTagStage repository5.PipelineStageType
customTagPreCD := customTagMapResponse.GetCustomTagForEntityKey(pipelineConfigBean.EntityTypePreCD, strconv.Itoa(dbPipeline.Id))
Expand Down
Loading