From 1c756decc6de1455d33c72f8e11e1a924a65fc2e Mon Sep 17 00:00:00 2001 From: Lynwee Date: Wed, 6 Mar 2024 16:55:28 +0800 Subject: [PATCH] fix(dora): remove calculated `started_date` when converting pipelines to deployments (#7122) --- backend/plugins/dora/tasks/deployment_generator.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/backend/plugins/dora/tasks/deployment_generator.go b/backend/plugins/dora/tasks/deployment_generator.go index 237b7216ccf..54b39b2e2bb 100644 --- a/backend/plugins/dora/tasks/deployment_generator.go +++ b/backend/plugins/dora/tasks/deployment_generator.go @@ -18,15 +18,13 @@ limitations under the License. package tasks import ( - "reflect" - "time" - "github.com/apache/incubator-devlake/core/dal" "github.com/apache/incubator-devlake/core/errors" "github.com/apache/incubator-devlake/core/models/domainlayer" "github.com/apache/incubator-devlake/core/models/domainlayer/devops" "github.com/apache/incubator-devlake/core/plugin" "github.com/apache/incubator-devlake/helpers/pluginhelper/api" + "reflect" ) var DeploymentGeneratorMeta = plugin.SubTaskMeta{ @@ -145,10 +143,6 @@ func GenerateDeployment(taskCtx plugin.SubTaskContext) errors.Error { DurationSec: &pipelineExInfo.DurationSec, QueuedDurationSec: pipelineExInfo.QueuedDurationSec, } - if pipelineExInfo.FinishedDate != nil && pipelineExInfo.DurationSec != 0 { - s := pipelineExInfo.FinishedDate.Add(-time.Duration(pipelineExInfo.DurationSec) * time.Second) - domainDeployment.StartedDate = &s - } if pipelineExInfo.Environment == "" { if pipelineExInfo.HasProductionTasks { domainDeployment.Environment = devops.PRODUCTION