-
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
TEP-0090: Add TaskRuns
to ResolvedPipelineRunTask
and implement isFailure
#4951
Conversation
The following is the coverage report on the affected files.
|
7cc1907
to
2c55235
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
[TEP-0090: Matrix][tep-0090] proposed executing a `PipelineTask` in parallel `TaskRuns` and `Runs` with substitutions from combinations of `Parameters` in a `Matrix`. In this change, we add `TaskRuns` field to `ResolvedPipelineRunTask` alongside the `TaskRun` field. - When a `PipelineTask` does not have a `Matrix`, the `TaskRun` field is populated (as is already being done, no change here). - When a `PipelineTask` has a `Matrix`, `TaskRuns` will be populated to track all `TaskRuns` from a given matrixed `ResolvedPipelineRunTask`. When we promote `Matrix` to Beta, we could remove `TaskRun` field and migrate to using `TaskRuns` field only where it would have one `TaskRun` only when the `PipelineTask` does not have a `Matrix`. However, the current separation is helpful to isolate the Matrix feature in alpha. In this change, we also implement the `isFailure` and other member functions of `ResolvedPipelineRunTask` that `isFailure` uses: `isCancelled` and `hasRemainingRetries`. The failure strategy in `Matrix` is to fail fast. We can explore other failure strategies, if needed, before promoting to Beta. [tep-0090]: https://github.com/tektoncd/community/blob/main/teps/0090-matrix.md
The following is the coverage report on the affected files.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom 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 |
/hold need to update the TEP-0090: Matrix with fail-fast failure strategy - tektoncd/community#724 |
/lgtm I don’t love this - it’s fine for just supporting matrixed |
opened tektoncd/community#724 to discuss the failure strategies, will unhold this PR so that we can make progress - matrix is not yet fully functional so we can update this if we land on a different approach other than fail-fast /hold cancel |
/test tekton-pipeline-unit-tests |
It doesn't look like my comments about the function docstrings were resolved? |
thank you @abayer 👍 Runs are coming in the next milestone - https://github.com/tektoncd/community/blob/main/teps/0090-matrix.md#milestone-2-execute-runs I haven't gotten chance to review this PR but please feel free to suggest better approach, best to follow @vdemeester's reference quote - No is temporary, yes is permanent. |
In tektoncd#4951, we implemented `isFailure` for matrixed `TaskRuns` where we applied fail-fast failure strategy. We discussed failure strategies further in this PR - tektoncd/community#724 - and API WG on 13 June 2022. We agreed to leave early termination upon failure out of scope for the initial release of Matrix. We plan to explore failure strategies, including fail-fast, in future work. And these failure strategies may apply more broadly beyond Matrix. In this change, we update `isFailure` to evaluate to `true` only when there's a failure and there are no running `TaskRuns` in the `rprt`.
In tektoncd#4951, we implemented `isFailure` for matrixed `TaskRuns` where we applied fail-fast failure strategy. We discussed failure strategies further in this PR - tektoncd/community#724 - and API WG on 13 June 2022. We agreed to leave early termination upon failure out of scope for the initial release of Matrix. We plan to explore failure strategies, including fail-fast, in future work. And these failure strategies may apply more broadly beyond Matrix. In this change, we update `isFailure` to evaluate to `true` only when there's a failure and there are no running `TaskRuns` in the `rprt`.
In tektoncd#4951, we implemented `isFailure` for matrixed `TaskRuns` where we applied fail-fast failure strategy. We discussed failure strategies further in this PR - tektoncd/community#724 - and API WG on 13 June 2022. We agreed to leave early termination upon failure out of scope for the initial release of Matrix. We plan to explore failure strategies, including fail-fast, in future work. And these failure strategies may apply more broadly beyond Matrix. In this change, we update `isFailure` to evaluate to `true` only when there's a failure and there are no running `TaskRuns` in the `rprt`.
In #4951, we implemented `isFailure` for matrixed `TaskRuns` where we applied fail-fast failure strategy. We discussed failure strategies further in this PR - tektoncd/community#724 - and API WG on 13 June 2022. We agreed to leave early termination upon failure out of scope for the initial release of Matrix. We plan to explore failure strategies, including fail-fast, in future work. And these failure strategies may apply more broadly beyond Matrix. In this change, we update `isFailure` to evaluate to `true` only when there's a failure and there are no running `TaskRuns` in the `rprt`.
Changes
TEP-0090: Matrix proposed executing a
PipelineTask
in parallelTaskRuns
andRuns
with substitutions from combinations ofParameters
in aMatrix
.In this change, we add
TaskRuns
field toResolvedPipelineRunTask
alongside theTaskRun
field.PipelineTask
does not have aMatrix
, theTaskRun
field is populated (as is already being done, no change here).PipelineTask
has aMatrix
,TaskRuns
will be populated to track allTaskRuns
from a given matrixedResolvedPipelineRunTask
.When we promote
Matrix
to Beta, we could removeTaskRun
field and migrate to usingTaskRuns
field only where it would have oneTaskRun
only when thePipelineTask
does not have aMatrix
. However, the current separation is helpful to isolate the Matrix feature in alpha.In this change, we also implement the
isFailure
and other member functions ofResolvedPipelineRunTask
thatisFailure
uses:isCancelled
andhasRemainingRetries
. The failure strategy inMatrix
is to fail fast. We can explore other failure strategies, if needed, before promoting to Beta./kind feature
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
Release Notes