This is an automated email from the ASF dual-hosted git repository. klesh pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push: new 3238fc4cb fix: notify pipeline started after status change committed (#8526) 3238fc4cb is described below commit 3238fc4cba45c4c8d33aa1c8e1ed55dd0a66ccb6 Author: NaRro <cong.w...@merico.dev> AuthorDate: Tue Aug 5 09:00:45 2025 +0000 fix: notify pipeline started after status change committed (#8526) #8525 --- backend/server/services/pipeline.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/backend/server/services/pipeline.go b/backend/server/services/pipeline.go index 5c5fcca62..413ba3db6 100644 --- a/backend/server/services/pipeline.go +++ b/backend/server/services/pipeline.go @@ -293,13 +293,6 @@ func dequeuePipeline(runningParallelLabels []string) (pipeline *models.Pipeline, panic(err) } - // Notify that the pipeline has started - go func(pipelineId uint64) { - if notifyErr := NotifyExternal(pipelineId); notifyErr != nil { - globalPipelineLog.Error(notifyErr, "failed to send pipeline started notification for pipeline #%d", pipelineId) - } - }(pipeline.ID) - return } if tx.IsErrorNotFound(err) { @@ -357,6 +350,11 @@ func RunPipelineInQueue(pipelineMaxParallel int64) { globalPipelineLog.Info("finish pipeline #%d, now runningParallelLabels is %s", pipelineId, runningParallelLabels) }() globalPipelineLog.Info("run pipeline, %d, now running runningParallelLabels are %s", pipelineId, runningParallelLabels) + // Notify that the pipeline has started + err = NotifyExternal(pipelineId) + if err != nil { + globalPipelineLog.Error(err, "failed to send pipeline started notification for pipeline #%d", pipelineId) + } err = runPipeline(pipelineId) if err != nil { globalPipelineLog.Error(err, "failed to run pipeline %d", pipelineId)