Skip to content

Override --timeout Value when Using --last/--use-taskrun/--use-pipelinerun #1240

@danielhelfand

Description

@danielhelfand

Versions and Operating System

  • Kubernetes version:

N/A

  • Tekton Pipeline version:

N/A

  • Operating System:

N/A

Expected Behavior

When using the --last, --use-taskrun, and --use-pipelinerun with start commands, users should have the ability to override the value of --timeout using the option as shown below:

tkn t start taskName --last --timeout 1s

The above command would result in a TaskRun that uses all the previous runtime values of the last available TaskRun but also specifies a new --timeout that should be 1s. If a previous timeout had been part of the last TaskRun, it should be replaced by the new --timeout value.

Actual Behavior

The old --timeout value is still applied from the older run.

Steps to Reproduce the Problem

  1. Create a TaskRun from a Task (Any Task should work) using tkn task start
  2. Create a new TaskRun using tkn task start with --last or --use-taskrun and add the --timeout value.
  3. Observe that the timeout value is not the same as what was specified using the --timeout option by using tkn tr desc --last or kubectl describe tr <taskrunname>

Additional Info

As part of working on this issue, it might be helpful to also assess whether other runtime values (e.g. params, workspaces, etc.) are also able to be overrode when using --last.

It should also be noted that this will apply to ALL start commands: tkn clustertask, tkn task, tkn pipeline. This fix for this issue should be applied to all to close this issue.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions