From 4661f4f2ce95176a8b0fb7a5208d0d6bcd9a2e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Svantesson?= Date: Tue, 7 Jan 2025 10:47:51 +0100 Subject: [PATCH] Revert "fix: retry creation of pipelinerun" --- pkg/engines/tekton/controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/engines/tekton/controller.go b/pkg/engines/tekton/controller.go index 539d2c75f..73f24499f 100644 --- a/pkg/engines/tekton/controller.go +++ b/pkg/engines/tekton/controller.go @@ -108,8 +108,7 @@ func (r *LighthouseJobReconciler) Reconcile(ctx context.Context, req ctrl.Reques // if pipeline run does not exist, create it if len(pipelineRunList.Items) == 0 { - if job.Status.State == lighthousev1alpha1.TriggeredState || - job.Status.State == lighthousev1alpha1.PendingState { + if job.Status.State == lighthousev1alpha1.TriggeredState { // construct a pipeline run pipelineRun, err := makePipelineRun(ctx, job, r.namespace, r.logger, r.idGenerator, r.apiReader) if err != nil { @@ -130,6 +129,7 @@ func (r *LighthouseJobReconciler) Reconcile(ctx context.Context, req ctrl.Reques } } + // TODO: changing the status should be a consequence of a pipeline run being created // update status status := lighthousev1alpha1.LighthouseJobStatus{ State: lighthousev1alpha1.PendingState, @@ -155,7 +155,7 @@ func (r *LighthouseJobReconciler) Reconcile(ctx context.Context, req ctrl.Reques } } } else if len(pipelineRunList.Items) == 1 { - // if pipeline run exists, create pipelineactivity and update lighthousejob status + // if pipeline run exists, create it and update status pipelineRun := pipelineRunList.Items[0] if !r.disableLogging { r.logger.Infof("Reconcile PipelineRun %+v", pipelineRun)