-
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-140: Produce Results in Matrix #7167
TEP-140: Produce Results in Matrix #7167
Conversation
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/assign |
c926aaa
to
b1ea72c
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
b1ea72c
to
c04d0df
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/assign @pritidesai |
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.
Thanks! This is a really big PR, just finish reading the pipeline_validation file.
pkg/reconciler/pipelinerun/resources/pipelinerunresolution_test.go
Outdated
Show resolved
Hide resolved
c04d0df
to
5c986c5
Compare
Thanks @Yongxuanzhang! I've addressed the comments so far and will continue iterating. Appreciate the reviews 🙂 |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
5c986c5
to
8100f01
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
8100f01
to
2b353aa
Compare
The following is the coverage report on the affected files.
|
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.
Thank you @Yongxuanzhang and @JeromeJu for the reviews 🙏
examples/v1/pipelineruns/alpha/pipelinerun-with-matrix-emitting-results.yaml
Show resolved
Hide resolved
The following is the coverage report on the affected files.
|
/retest |
Thanks! I will take another round later |
bafc0b7
to
8798c09
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.
|
/retest |
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.
Thanks a lot for all the efforts working on this feature!
} | ||
if !referencedPipelineTask.isSuccessful() && !referencedPipelineTask.isFailure() { | ||
return nil, resultRef.PipelineTask, fmt.Errorf("task %q referenced by result was not finished", referencedPipelineTask.PipelineTask.Name) | ||
func resolveCustomResultRef(customRuns []*v1beta1.CustomRun, resultRef *v1.ResultRef) (*ResolvedResultRef, error) { |
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.
It looks like the refactor here attempts to separate resolveCustomResultRef out from previously the first condition check at L140. Do we not need the check the following any longer or is this indicating customRuns would also support matrixed referenced Tasks IIUC?
if len(referencedPipelineTask.CustomRuns) != 1 {
return nil, resultRef.PipelineTask, fmt.Errorf("referenced tasks can only have length of 1 since a matrixed task does not support producing results, but was length %d", len(referencedPipelineTask.TaskRuns))
}
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.
Custom Runs would also support referenced Matrixed tasks. Added an example unit test:
func TestReconciler_CustomTaskMatrixConsumingResults(t *testing.T) { |
8798c09
to
3e499fe
Compare
The following is the coverage report on the affected files.
|
This commit enables producing Results from Matrixed PipelineTasks so that they can be used in subsequent PipelineTasks. A Pipeline author can now declare a matrixed taskRun that emits results of type string that are fanned out over multiple taskRuns and aggregated into an array of results that can then be consumed by another pipelineTask using the syntax `$(tasks.<pipelineTaskName>.results.<resultName>[*])`. This commit also introduces 2 context variables to 1) Access Matrix Combinations Length using `tasks.<pipelineTaskName>.matrix.length` and 2) Access Aggregated Results Length using `tasks.<pipelineTaskName>.matrix.<resultName>.length` Note: Currently, we don't support consuming a single instance/combinations of results. Authors must consume the entire aggregated results array. Co-authored-by: Priti Desai <pdesai@us.ibm.com>
3e499fe
to
e315399
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.
|
/retest |
/retest |
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.
Thanks @EmmaMunley and @pritidesai for the hard work on this!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JeromeJu, pritidesai, Yongxuanzhang 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 |
/lgtm |
This PR enables producing Results from Matrixed PipelineTasks so that they can be used in subsequent PipelineTasks [See TEP-140: Produce Results in Matrix]. A Pipeline author can now declare a matrixed taskRun that emits results of type string that are fanned out over multiple taskRuns and aggregated into an array of results that can then be consumed by another pipelineTask using the syntax
$(tasks.<pipelineTaskName>.results.<resultName>[*])
.This commit also introduces 2 context variables to 1) Access Matrix Combinations Length using
tasks.<pipelineTaskName>.matrix.length
and 2) Access Aggregated Results Length usingtasks.<pipelineTaskName>.matrix.<resultName>.length
Note: Currently, we don't support consuming a single instance/combinations of results. Authors must consume the entire aggregated results array. t message for your changes.
/kind feature
Closes #5265
Changes
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes