-
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
feat(retries) Design and implement retries #658
Conversation
/ok-to-test |
Hey @joseblas ! So to resurrect our conversation from #510, the design that makes the most sense to me given our requirements is still having apiVersion: tekton.dev/v1alpha1
kind: Pipeline
..
tasks:
- name: build-skaffold-web
retries: 3
...
- name: build-skaffold-app
retries: 3
...
- name: deploy-app
...
- name: deploy-web It doesn't seem to me like we need to have retries in the
We are definitely on the same page that the number of retries should be in the If you want to discuss more there is time in our Tuesday 9am PST working group meeting (https://github.com/tektoncd/pipeline/blob/master/CONTRIBUTING.md#contact) for design discussions now so we could keep the discussion going there if you want to speed it up :) |
Hi @bobcatfish, |
Quick update: @joseblas and I discussed further offline :) |
/test pull-tekton-pipeline-integration-tests |
2 similar comments
/test pull-tekton-pipeline-integration-tests |
/test pull-tekton-pipeline-integration-tests |
/hold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really coming along! The interface is looking great :D
I have a lot of miscellaneous comments. One high level thing I noticed is that I don't see any logic handling cancellations - if a taskrun is cancelled we shouldn't retry it
(note i didnt look at TestReconcileWithTimeoutAndRetry
yet - i have a feeling we need to add more test cases at a lower level and possibly a couple at that level as well)
docs/pipelines.md
Outdated
@@ -140,6 +140,16 @@ tasks: | |||
name: build-push | |||
``` | |||
|
|||
There is an optional attribute called `retries`, which declares how many times that task should be retries in case of failure, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make this a section and add a link to the "optional" section at the top of the doc re. attributes of tasks?
e.g. in the section at the top:
- Optional:
- [`resources`](#declared-resources) - Specifies which
[`PipelineResources`](resources.md) of which types the `Pipeline` will be
using in its [Tasks](#pipeline-tasks)
- `tasks`
- `resources.inputs` / `resource.outputs`
- [`from`](#from) - Used when the content of the
[`PipelineResource`](resources.md) should come from the
[output](tasks.md#output) of a previous [Pipeline Task](#pipeline-tasks)
- [`runAfter`](#runAfter) - Used when the [Pipeline Task](#pipeline-task)
should be executed after another Pipeline Task, but there is no
[output linking](#from) required
- [`retries`](#retries)
And here:
#### Retries
An optional attribute....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
@@ -73,6 +73,10 @@ type PipelineTask struct { | |||
Name string `json:"name"` | |||
TaskRef TaskRef `json:"taskRef"` | |||
|
|||
// Number of retries to be run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment could also use some more detail re. what it means to retry and under what circumstances that will happen
pkg/reconciler/v1alpha1/pipelinerun/resources/pipelinerunresolution.go
Outdated
Show resolved
Hide resolved
pkg/reconciler/v1alpha1/pipelinerun/resources/pipelinerunresolution_test.go
Show resolved
Hide resolved
pkg/reconciler/v1alpha1/pipelinerun/resources/pipelinerunresolution.go
Outdated
Show resolved
Hide resolved
/test pull-tekton-pipeline-integration-tests |
Hi @bobcatfish, I've pushed some code according your comments. I did do a comment earlier but I deleted it as there was an error in the code. Sorry for that. |
/hold cancel |
pkg/reconciler/v1alpha1/pipelinerun/resources/pipelinerunresolution.go
Outdated
Show resolved
Hide resolved
Chatted offline about all of the above comments. Everything looks good👍 |
/lgtm |
oh wait yeah |
ugh, I don't have approve rights... @bobcatfish, halp? =) |
/approve it's happening!!! Thanks for your hard work on this and patience @joseblas 🎉 ❤️ /meow space |
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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abayer, bobcatfish, joseblas The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
closes #221
Changes
Adding retries to pipeline. Pipeline/Tasks will have retries that will be passed to the subsequent pipeline|task run.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide
for more details.
Release Notes
Adds the possibility to execute automated retries when something fails, could be applied to Pipelines or Tasks.