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

Set PipelineRun Tasks to inherit their timeout from their PipelineRun's spec.timeouts.pipeline #8539

Open
aThorp96 opened this issue Jan 28, 2025 · 2 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@aThorp96
Copy link
Contributor

Feature request

Based on the Pipelines docs it appears that previously a Task would inherit its timeout from pipelinerun.spec.timeout if unspecified. That field is now deprecated, and its new functional equivalent is pipelinerun.spec.timeouts.pipeline. I propose that a Pipeline's Task's default timeout still be the (functional) Pipeline timeout, instead of defaulting to the TektonConfig default-timeout-minutes. I believe this is an intuitive expectation of the default value. This of course does not offer any net-new functionality but improves the ergonomics of the user.

Use case

Example of potential perceived regression

  • User starts with the pipeline:
apiVersion: tekton.dev/v1
kind: PipelineRun
  name: some-run
  namespace: cool-namespace-uwu
spec:
  timeout: "24h"
  pipelineSpec:
    tasks:
      - name: sleepy
        taskSpec:
          steps:
            - name: sleep
              image: ubuntu
              script: |
                #!/usr/bin/env bash
                sleep 12h && echo "yawn" 
  • User sees that spec.timeout is deprecated and updates their spec:
-  timeout: "24h"
+  timeouts:
+    pipeline: "24h"
  • spec.pipelineSpec.tasks[0] now uses the default timeout minutes 60m, causing it to timeout where it did not before

General use-case, ergonomics

When a pipeline takes longer than the default timeout due to one or more of the tasks taking longer than the tiemout, an intuitive solution would be to simply raise the PipelineRun's timeouts.pipeline and/or timeouts.tasks. However this will not have the desired effect as the long-running tasks will still keep the default timeout.

@aThorp96 aThorp96 added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 28, 2025
@vdemeester
Copy link
Member

cc @tektoncd/core-maintainers @tektoncd/core-collaborators

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
Status: Todo
Development

No branches or pull requests

2 participants