Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change tkn task start --timeout Flag to a String to Allow User to Pass Duration Instead of Seconds #730

Closed
danielhelfand opened this issue Feb 17, 2020 · 1 comment · Fixed by #779
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@danielhelfand
Copy link
Member

Currently, the --timeout flag for tkn task start is an int64 to allow a user to specify in seconds what a timeout should be for a TaskRun. As described in this comment, it would be a much better user experience to allow users to pass a string in duration format (e.g. 1h30m2s) instead of the exact number of seconds for a timeout. This will allow for timeouts to be specified in much clearer, more granular way.

The conversion process would consist of changing the TimeOut option to a string, updating the associated timeout flag, parsing the duration string passed by the user using time.parseDuration(opt.TimeOut), and passing the parsed duration to the TaskRunSpec Timeout field.

Since this will alter existing behavior, this should not be implemented until v0.9.0 so we can give users a warning. The warning should consist of calling this change out in the v0.8.0 release notes and also adding a log warning in v0.8.0 that this behavior will change. The log warning will be implemented in a similar way to what is being done in #729.

@danielhelfand danielhelfand added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 17, 2020
@danielhelfand danielhelfand added this to the 0.9.0 🐺 milestone Feb 17, 2020
@pradeepitm12
Copy link
Contributor

/assign

tekton-robot pushed a commit that referenced this issue Mar 5, 2020
Close #730

this change timeout type from `int64` to string for tkn task start
command which enables user to give input as string like `1h2m3s`
default value set is `1h`

Signed-off-by: Pradeep Kumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants