Skip to content

Commit

Permalink
Revert "fix: retry creation of pipelinerun"
Browse files Browse the repository at this point in the history
  • Loading branch information
msvticket authored Jan 7, 2025
1 parent 29e2152 commit 4661f4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/engines/tekton/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit 4661f4f

Please sign in to comment.