@@ -555,11 +555,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
555
555
if err != nil {
556
556
impl .logger .Errorw ("error in save/update pipeline status fetch detail" , "err" , err , "cdWfrId" , runnerHistoryId )
557
557
}
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 )
563
559
// creating cd pipeline status timeline
564
560
timeline := & pipelineConfig.PipelineStatusTimeline {
565
561
CdWorkflowRunnerId : runnerHistoryId ,
@@ -596,11 +592,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
596
592
timeline .Id = 0
597
593
timeline .Status = timelineStatus .TIMELINE_STATUS_KUBECTL_APPLY_SYNCED
598
594
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 )
604
596
timeline .StatusTime = syncFinishTime
605
597
// checking and saving if this timeline is present or not because kubewatch may stream same objects multiple times
606
598
err = impl .pipelineStatusTimelineService .SaveTimeline (timeline , nil )
@@ -679,11 +671,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
679
671
if err != nil {
680
672
impl .logger .Errorw ("error in save/update pipeline status fetch detail" , "err" , err , "installedAppVersionHistoryId" , runnerHistoryId )
681
673
}
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 )
687
675
// creating installedAppVersionHistory status timeline
688
676
timeline := & pipelineConfig.PipelineStatusTimeline {
689
677
InstalledAppVersionHistoryId : runnerHistoryId ,
@@ -720,11 +708,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
720
708
timeline .Id = 0
721
709
timeline .Status = timelineStatus .TIMELINE_STATUS_KUBECTL_APPLY_SYNCED
722
710
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 )
728
712
timeline .StatusTime = syncFinishTime
729
713
// checking and saving if this timeline is present or not because kubewatch may stream same objects multiple times
730
714
err = impl .pipelineStatusTimelineService .SaveTimeline (timeline , nil )
@@ -744,6 +728,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
744
728
haveNewTimeline = true
745
729
timeline .Status = timelineStatus .TIMELINE_STATUS_APP_HEALTHY
746
730
timeline .StatusDetail = "App status is Healthy."
731
+ timeline .StatusTime = statusTime
747
732
}
748
733
if haveNewTimeline {
749
734
// not checking if this status is already present or not because already checked for terminal status existence earlier
0 commit comments