Skip to content

Commit

Permalink
TEP-0077: Partial pipeline execute - wip - proposal.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrapCodes committed Jul 22, 2021
1 parent e86f05b commit 87ca369
Showing 1 changed file with 48 additions and 21 deletions.
69 changes: 48 additions & 21 deletions teps/0077-pipeline-partial-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,32 +69,59 @@ Together these will bring in the ability to resume/retry a failed `PipelineRun`

### Use Cases (optional)

<!--
Describe the concrete improvement specific groups of users will see if the
Motivations in this doc result in a fix or feature.
Consider both the user's role (are they a Task author? Catalog Task user?
Cluster Admin? etc...) and experience (what workflows or actions are enhanced
if this problem is solved?).
-->

1. *Optimal use of resources* If a `PipelineRun` fails today, there is no way
it can be retried or resumed. Even if one copies all the unfinished tasks to
new `PipelineRun` it can be daunting. A user has to resolve all the
results/workspaces from the previous `PipelineRun`.

## Requirements

<!--
Describe constraints on the solution that must be met. Examples might include
performance characteristics that must be met, specific edge cases that must
be handled, or user scenarios that will be affected and must be accomodated.
-->
- Create a new `PipelineRun` to resume or retry a completed `PipelineRun`.

## Proposal

<!--
This is where we get down to the specifics of what the proposal actually is.
This should have enough detail that reviewers can understand exactly what
you're proposing, but should not include things like API designs or
implementation. The "Design Details" section below is for the real
nitty-gritty.
-->
#### Requesting API Changes



```yaml
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: new-pipeline-run
spec:
resumeFrom:
# can only be resumed from a previous PipelineRun
name: prev-pipeline-run
selectTasks:
# select tasks for which `pipelineRun.status.conditions` = False
# conditions: None i.e. default value - will select all.
conditions: False # either None|True|False|Unknown
# for unselected/disabled tasks whether to reference results from
# previous PipelineRun or not
referenceResults: True
disableTasks:
- name: task-name
# option to pre-populate the values of disabled task's results.
results:
- name: result1-name
value: some-val
- name: result2-name
value: some-val2
serviceAccountName: 'default'
# Option1. these are referenced from previousRun and following specification
# overrides the referenced specs.
# Option2. disallow the following specification when resumeFrom exists
# and only use the specifications from previous run.
workspaces:
- name: some-data
persistentVolumeClaim:
claimName: some-storage
resources:
- name: repo
resourceRef:
name: some-ref
```
### Notes/Caveats (optional)
Expand Down

0 comments on commit 87ca369

Please sign in to comment.