Skip to content

Commit

Permalink
remove the parameter is not used in func
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoyang Zhu <zhuxiaoyang1996@gmail.com>
  • Loading branch information
soulseen committed Oct 29, 2020
1 parent 0df5c32 commit 28c5e3f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/reconciler/taskrun/taskrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (c *Reconciler) ReconcileKind(ctx context.Context, tr *v1beta1.TaskRun) pkg
// prepare fetches all required resources, validates them together with the
// taskrun, runs API convertions. Errors that come out of prepare are
// permanent one, so in case of error we update, emit events and return
taskSpec, rtr, err := c.prepare(ctx, tr)
_, rtr, err := c.prepare(ctx, tr)
if err != nil {
logger.Errorf("TaskRun prepare error: %v", err.Error())
// We only return an error if update failed, otherwise we don't want to
Expand All @@ -189,7 +189,7 @@ func (c *Reconciler) ReconcileKind(ctx context.Context, tr *v1beta1.TaskRun) pkg

// Reconcile this copy of the task run and then write back any status
// updates regardless of whether the reconciliation errored out.
if err = c.reconcile(ctx, tr, taskSpec, rtr); err != nil {
if err = c.reconcile(ctx, tr, rtr); err != nil {
logger.Errorf("Reconcile: %v", err.Error())
}

Expand Down Expand Up @@ -338,8 +338,7 @@ func (c *Reconciler) prepare(ctx context.Context, tr *v1beta1.TaskRun) (*v1beta1
// It reports errors back to Reconcile, it updates the taskrun status in case of
// error but it does not sync updates back to etcd. It does not emit events.
// `reconcile` consumes spec and resources returned by `prepare`
func (c *Reconciler) reconcile(ctx context.Context, tr *v1beta1.TaskRun,
taskSpec *v1beta1.TaskSpec, rtr *resources.ResolvedTaskResources) error {
func (c *Reconciler) reconcile(ctx context.Context, tr *v1beta1.TaskRun, rtr *resources.ResolvedTaskResources) error {
logger := logging.FromContext(ctx)
recorder := controller.GetEventRecorder(ctx)
// Get the TaskRun's Pod if it should have one. Otherwise, create the Pod.
Expand Down

0 comments on commit 28c5e3f

Please sign in to comment.