Skip to content

Commit

Permalink
Adjust several log lines
Browse files Browse the repository at this point in the history
Drop two that provide nearly no value that have been copy/pasted around since the early days of Knative controllers.

Reduce the CloudEvents log statement to debug level.

Add a log statement to the path where PipelineRun updates the TaskRun status.
  • Loading branch information
mattmoor authored and tekton-robot committed Aug 24, 2021
1 parent 8e10069 commit e38b267
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion pkg/reconciler/pipelinerun/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ func NewController(namespace string, images pipeline.Images) func(context.Contex
}
})

logger.Info("Setting up event handlers")
pipelineRunInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue))

taskRunInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
Expand Down
1 change: 1 addition & 0 deletions pkg/reconciler/pipelinerun/pipelinerun.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ func (c *Reconciler) createTaskRun(ctx context.Context, rprt *resources.Resolved
Type: apis.ConditionSucceeded,
Status: corev1.ConditionUnknown,
})
logger.Infof("Updating taskrun %s with cleared status and retry history (length: %d).", tr.GetName(), len(tr.Status.RetriesStatus))
return c.PipelineClientSet.TektonV1beta1().TaskRuns(pr.Namespace).UpdateStatus(ctx, tr, metav1.UpdateOptions{})
}

Expand Down
1 change: 0 additions & 1 deletion pkg/reconciler/taskrun/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ func NewController(namespace string, images pipeline.Images) func(context.Contex
}
})

logger.Info("Setting up event handlers")
taskRunInformer.Informer().AddEventHandler(controller.HandleAll(impl.Enqueue))

podInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/taskrun/taskrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ func (c *Reconciler) prepare(ctx context.Context, tr *v1beta1.TaskRun) (*v1beta1
// and they have not been initialized yet.
// FIXME(afrittoli) This resource specific logic will have to be replaced
// once we have a custom PipelineResource framework in place.
logger.Infof("Cloud Events: %s", tr.Status.CloudEvents)
logger.Debugf("Cloud Events: %s", tr.Status.CloudEvents)
cloudevent.InitializeCloudEvents(tr, rtr.Outputs)

return taskSpec, rtr, nil
Expand Down

0 comments on commit e38b267

Please sign in to comment.