@@ -555,11 +555,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
555555 if err != nil {
556556 impl .logger .Errorw ("error in save/update pipeline status fetch detail" , "err" , err , "cdWfrId" , runnerHistoryId )
557557 }
558- syncStartTime , found := helper .GetSyncStartTime (app )
559- if ! found {
560- impl .logger .Warnw ("sync operation not started yet" , "app" , app )
561- return isTimelineUpdated , isTimelineTimedOut , kubectlApplySyncedTimeline , fmt .Errorf ("sync operation not started yet" )
562- }
558+ syncStartTime := helper .GetSyncStartTime (app , statusTime )
563559 // creating cd pipeline status timeline
564560 timeline := & pipelineConfig.PipelineStatusTimeline {
565561 CdWorkflowRunnerId : runnerHistoryId ,
@@ -596,11 +592,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
596592 timeline .Id = 0
597593 timeline .Status = timelineStatus .TIMELINE_STATUS_KUBECTL_APPLY_SYNCED
598594 timeline .StatusDetail = app .Status .OperationState .Message
599- syncFinishTime , found := helper .GetSyncFinishTime (app )
600- if ! found {
601- impl .logger .Warnw ("sync operation not found for the deployment" , "app" , app )
602- return isTimelineUpdated , isTimelineTimedOut , kubectlApplySyncedTimeline , fmt .Errorf ("sync operation not found for the deployment" )
603- }
595+ syncFinishTime := helper .GetSyncFinishTime (app , statusTime )
604596 timeline .StatusTime = syncFinishTime
605597 // checking and saving if this timeline is present or not because kubewatch may stream same objects multiple times
606598 err = impl .pipelineStatusTimelineService .SaveTimeline (timeline , nil )
@@ -679,11 +671,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
679671 if err != nil {
680672 impl .logger .Errorw ("error in save/update pipeline status fetch detail" , "err" , err , "installedAppVersionHistoryId" , runnerHistoryId )
681673 }
682- syncStartTime , found := helper .GetSyncStartTime (app )
683- if ! found {
684- impl .logger .Warnw ("sync operation not started yet" , "app" , app )
685- return isTimelineUpdated , isTimelineTimedOut , kubectlApplySyncedTimeline , fmt .Errorf ("sync operation not started yet" )
686- }
674+ syncStartTime := helper .GetSyncStartTime (app , statusTime )
687675 // creating installedAppVersionHistory status timeline
688676 timeline := & pipelineConfig.PipelineStatusTimeline {
689677 InstalledAppVersionHistoryId : runnerHistoryId ,
@@ -720,11 +708,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
720708 timeline .Id = 0
721709 timeline .Status = timelineStatus .TIMELINE_STATUS_KUBECTL_APPLY_SYNCED
722710 timeline .StatusDetail = app .Status .OperationState .Message
723- syncFinishTime , found := helper .GetSyncFinishTime (app )
724- if ! found {
725- impl .logger .Warnw ("sync operation not found for the deployment" , "app" , app )
726- return isTimelineUpdated , isTimelineTimedOut , kubectlApplySyncedTimeline , fmt .Errorf ("sync operation not found for the deployment" )
727- }
711+ syncFinishTime := helper .GetSyncFinishTime (app , statusTime )
728712 timeline .StatusTime = syncFinishTime
729713 // checking and saving if this timeline is present or not because kubewatch may stream same objects multiple times
730714 err = impl .pipelineStatusTimelineService .SaveTimeline (timeline , nil )
@@ -744,6 +728,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
744728 haveNewTimeline = true
745729 timeline .Status = timelineStatus .TIMELINE_STATUS_APP_HEALTHY
746730 timeline .StatusDetail = "App status is Healthy."
731+ timeline .StatusTime = statusTime
747732 }
748733 if haveNewTimeline {
749734 // not checking if this status is already present or not because already checked for terminal status existence earlier
0 commit comments