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

timeout: 0 will fail the pipeline immediately #1303

Closed
lafh opened this issue Sep 12, 2019 · 4 comments
Closed

timeout: 0 will fail the pipeline immediately #1303

lafh opened this issue Sep 12, 2019 · 4 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@lafh
Copy link

lafh commented Sep 12, 2019

Expected Behavior

timeout: "0" sets no timeout for PipelineRun or TaskRun.

Actual Behavior

apiVersion: tekton.dev/v1alpha1
kind: PipelineRun
metadata:
  name: pipelin-run
spec:
  ...
  timeout: "0"

failed immediately on the HEAD release.

@imjasonh
Copy link
Member

I believe this is working as intended, though we should probably validate that a timeout is >0 (or > some reasonable minimum) if it's specified.

If you don't specify a timeout, the controller will set a default timeout, which is currently one hour.

There is not currently a way to specify "this *Run should be allowed to run indefinitely forever" since, the thinking goes, that's usually not what you actually want. Generally you have some idea that this process should finish in some bounded amount of time.

Bounded timeouts can be useful to operators, since it allows them to block new incoming runs and calculate how long at most they'll have to wait for all existing runs to finish. This can be especially useful when migrating or upgrading workloads, without having to forcibly cancel anything.

@lafh
Copy link
Author

lafh commented Sep 20, 2019

It seems "no timeout" is an option according to #978 and the documentation https://github.com/tektoncd/pipeline/blob/master/docs/pipelineruns.md

"this *Run should be allowed to run indefinitely forever" is unlikely to happen, but "no timeout" should still be an option for flexibility reason. For example, we might want to control the timeout at a higher level (e.g. by killing the pipelines instead of it failing automatically).

@imjasonh
Copy link
Member

Ah okay, I must have been mistaken. If the docs says timeout: 0 should work and it doesn't that's a bug. Reopening!

@imjasonh imjasonh reopened this Sep 20, 2019
@imjasonh
Copy link
Member

@houshengbo Can you look into this and see if you can reproduce? (I ask because you implemented #1040)

@bobcatfish bobcatfish added this to the Pipelines 0.8 🐱 milestone Sep 20, 2019
@bobcatfish bobcatfish added the kind/bug Categorizes issue or PR as related to a bug. label Sep 20, 2019
dlorenc added a commit to dlorenc/build-pipeline that referenced this issue Sep 30, 2019
This was already done in tektoncd#1040 for TaskRuns, but PipelineRuns seem to have been missed.
This fixes tektoncd#1303.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants