@@ -27,6 +27,7 @@ import (
27
27
"github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig/adapter/cdWorkflow"
28
28
"github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig/bean/timelineStatus"
29
29
cdWorkflow2 "github.com/devtron-labs/devtron/internal/sql/repository/pipelineConfig/bean/workflow/cdWorkflow"
30
+ "github.com/devtron-labs/devtron/pkg/argoApplication/helper"
30
31
installedAppReader "github.com/devtron-labs/devtron/pkg/appStore/installedApp/read"
31
32
common2 "github.com/devtron-labs/devtron/pkg/deployment/common"
32
33
bean2 "github.com/devtron-labs/devtron/pkg/deployment/common/bean"
@@ -550,7 +551,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
550
551
// creating cd pipeline status timeline
551
552
timeline := & pipelineConfig.PipelineStatusTimeline {
552
553
CdWorkflowRunnerId : runnerHistoryId ,
553
- StatusTime : statusTime ,
554
+ StatusTime : helper . GetSyncStartTime ( app , statusTime ) ,
554
555
AuditLog : sql.AuditLog {
555
556
CreatedBy : 1 ,
556
557
CreatedOn : time .Now (),
@@ -583,6 +584,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
583
584
timeline .Id = 0
584
585
timeline .Status = timelineStatus .TIMELINE_STATUS_KUBECTL_APPLY_SYNCED
585
586
timeline .StatusDetail = app .Status .OperationState .Message
587
+ timeline .StatusTime = helper .GetSyncFinishTime (app , statusTime )
586
588
// checking and saving if this timeline is present or not because kubewatch may stream same objects multiple times
587
589
err = impl .pipelineStatusTimelineService .SaveTimeline (timeline , nil )
588
590
if err != nil {
@@ -662,7 +664,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
662
664
// creating installedAppVersionHistory status timeline
663
665
timeline := & pipelineConfig.PipelineStatusTimeline {
664
666
InstalledAppVersionHistoryId : runnerHistoryId ,
665
- StatusTime : statusTime ,
667
+ StatusTime : helper . GetSyncStartTime ( app , statusTime ) ,
666
668
AuditLog : sql.AuditLog {
667
669
CreatedBy : 1 ,
668
670
CreatedOn : time .Now (),
@@ -695,6 +697,7 @@ func (impl *AppServiceImpl) UpdatePipelineStatusTimelineForApplicationChanges(ap
695
697
timeline .Id = 0
696
698
timeline .Status = timelineStatus .TIMELINE_STATUS_KUBECTL_APPLY_SYNCED
697
699
timeline .StatusDetail = app .Status .OperationState .Message
700
+ timeline .StatusTime = helper .GetSyncFinishTime (app , statusTime )
698
701
// checking and saving if this timeline is present or not because kubewatch may stream same objects multiple times
699
702
err = impl .pipelineStatusTimelineService .SaveTimeline (timeline , nil )
700
703
if err != nil {
0 commit comments