@@ -111,7 +111,7 @@ func (impl *WorkFlowStageStatusServiceImpl) updatePodStages(currentWorkflowStage
111
111
}
112
112
//update pod stage status by using convertPodStatusToDevtronStatus
113
113
for _ , stage := range currentWorkflowStages {
114
- if stage .StatusType == bean2 .WORKFLOW_STAGE_STATUS_TYPE_POD {
114
+ if stage .StatusFor == bean2 .WORKFLOW_STAGE_STATUS_TYPE_POD {
115
115
// add pod name in stage metadata if not empty
116
116
if len (podName ) > 0 {
117
117
marshalledMetadata , _ := json .Marshal (map [string ]string {"podName" : podName })
@@ -190,7 +190,7 @@ func (impl *WorkFlowStageStatusServiceImpl) updateWorkflowStagesToDevtronStatus(
190
190
191
191
//if pod is running, update preparation and execution stages
192
192
for _ , stage := range currentWorkflowStages {
193
- if stage .StatusType == bean2 .WORKFLOW_STAGE_STATUS_TYPE_WORKFLOW {
193
+ if stage .StatusFor == bean2 .WORKFLOW_STAGE_STATUS_TYPE_WORKFLOW {
194
194
//mark preparation stage as completed
195
195
if stage .StageName == bean2 .WORKFLOW_PREPARATION {
196
196
if stage .Status == bean2 .WORKFLOW_STAGE_STATUS_RUNNING {
@@ -219,7 +219,7 @@ func (impl *WorkFlowStageStatusServiceImpl) updateWorkflowStagesToDevtronStatus(
219
219
220
220
//if pod is succeeded, update execution stage
221
221
for _ , stage := range currentWorkflowStages {
222
- if stage .StatusType == bean2 .WORKFLOW_STAGE_STATUS_TYPE_WORKFLOW {
222
+ if stage .StatusFor == bean2 .WORKFLOW_STAGE_STATUS_TYPE_WORKFLOW {
223
223
//mark execution stage as completed
224
224
if stage .StageName == bean2 .WORKFLOW_EXECUTION {
225
225
if stage .Status == bean2 .WORKFLOW_STAGE_STATUS_RUNNING {
@@ -234,7 +234,7 @@ func (impl *WorkFlowStageStatusServiceImpl) updateWorkflowStagesToDevtronStatus(
234
234
235
235
//if pod is failed, update execution stage
236
236
for _ , stage := range currentWorkflowStages {
237
- if stage .StatusType == bean2 .WORKFLOW_STAGE_STATUS_TYPE_WORKFLOW {
237
+ if stage .StatusFor == bean2 .WORKFLOW_STAGE_STATUS_TYPE_WORKFLOW {
238
238
//mark execution stage as completed
239
239
if stage .StageName == bean2 .WORKFLOW_EXECUTION {
240
240
if stage .Status == bean2 .WORKFLOW_STAGE_STATUS_RUNNING {
@@ -269,7 +269,7 @@ func (impl *WorkFlowStageStatusServiceImpl) updateWorkflowStagesToDevtronStatus(
269
269
impl .logger .Errorw ("unknown pod status" , "podStatus" , podStatus )
270
270
//mark workflow stage status as unknown
271
271
for _ , stage := range currentWorkflowStages {
272
- if stage .StatusType == bean2 .WORKFLOW_STAGE_STATUS_TYPE_WORKFLOW {
272
+ if stage .StatusFor == bean2 .WORKFLOW_STAGE_STATUS_TYPE_WORKFLOW {
273
273
//mark execution stage as completed
274
274
if stage .StageName == bean2 .WORKFLOW_EXECUTION {
275
275
if stage .Status == bean2 .WORKFLOW_STAGE_STATUS_RUNNING {
@@ -361,7 +361,7 @@ func (impl *WorkFlowStageStatusServiceImpl) ConvertDBWorkflowStageToMap(workflow
361
361
}
362
362
for _ , wfStage := range workflowStages {
363
363
if wfStage .WorkflowId == wfId {
364
- wfMap [wfStage .StatusType .ToString ()] = append (wfMap [wfStage .StatusType .ToString ()], adapter .ConvertDBWorkflowStageToDto (wfStage ))
364
+ wfMap [wfStage .StatusFor .ToString ()] = append (wfMap [wfStage .StatusFor .ToString ()], adapter .ConvertDBWorkflowStageToDto (wfStage ))
365
365
foundInDb = true
366
366
}
367
367
}
0 commit comments