-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Design: "Finally" Steps in Tasks #2448
Comments
/kind feature Also related to #1684 |
The design doc. Is behind restricted access :( Should I apply for access through the google docs link or should the document be made public @dibyom? |
Hi @NikeNano ! Joining our mailing list should give you access: https://github.com/tektoncd/community/blob/master/contact.md#mailing-list |
Thanks @bobcatfish :) |
@chhsia0 Are you still looking into this? This may be rendered unnecessary by the pipeline resource redesign. If you feel this is high prio still feel free to bring it back at the API WG |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/remove-lifecycle rotten |
@vdemeester: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
The use cases described here could be better solved using Pipelines in Pipelines because it:
This use case can be solved using a apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: unit-test-and-upload
spec:
tasks:
- name: unit-test
taskRef:
name: unit-test
finally:
- name: upload
taskRef:
name: upload
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: pipeline
spec:
tasks:
- name: unit-test-and-upload
taskRef:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
name: unit-test-and-upload
...
This use case can be solved using a apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: build-and-notify
spec:
tasks:
- name: build
taskRef:
name: build
finally:
- name: notify
when:
- input: $(tasks.build.status)
operator: in
values: [ "Failed" ]
taskRef:
name: notify
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: pipeline
spec:
tasks:
- name: build-and-notify
taskRef:
apiVersion: tekton.dev/v1beta1
kind: Pipeline
name: build-and-notify
... So I propose going forward with Pipelines in Pipelines to solve these use cases, and this still leaves Finally Steps as an option we can explore in the future if needed, please let me know what you think @chhsia0 |
Thanks for summarizing this and adding examples @jerop ! One detail that I would add which makes using Pipelines as the solution difficult is that sharing data between Tasks in a Pipeline requires a workspace (and probably a backing PVC) in order to make the data available to all the Tasks (pods) (e.g. the unit test upload example above would probably need a workspace too). If it was possible to colocate Tasks and Workspaces (TEP-0046) or if we had a way of composing Tasks with Tasks (executing in the same pod) (TEP-0044) that would be a different story! |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Related issue: #1559
Motivating Use Cases
Proposed User-Facing Changes
Add a new
Finally
field to specify a list of sequential steps that run regardless of whether previous steps have succeeded or not. Example:Design Doc
https://docs.google.com/document/d/1e1fagYDErliLnIwU1g_N3YKVyAProhs1l14UyPIoZuM/edit?usp=sharing
Alternative Design
Error Strategy in Task Steps (#1573)
The text was updated successfully, but these errors were encountered: