-
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
Refine check if the result is from a matrix task #8158
Conversation
Given a matrix run of a TaskRun with cardinality of 1, the result from it will not be converted to an array but kept as a string, i.e. as if the TaskRun was not configured to run with matrix. This causes issues for consumers of the TaskRun's results as they will be configured to consume array results. As a result making the passed value equal to expression value instead. Resolves: tektoncd#8157
Hi @zregvart. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/kind bug |
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.
/ok-to-test
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.
cc @chitrangpatel @afrittoli
we'll want to backport this I think
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester 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 |
Wow, this is awesome! Looking forward to this bug being resolved so I can start using matrix builds! |
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.
/lgtm
@@ -132,7 +132,7 @@ func convertToResultRefs(pipelineRunState PipelineRunState, target *ResolvedPipe | |||
resolvedResultRefs = append(resolvedResultRefs, resolved) | |||
default: | |||
// Matrixed referenced Pipeline Task | |||
if len(referencedPipelineTask.TaskRuns) > 1 { | |||
if referencedPipelineTask.PipelineTask.IsMatrixed() { |
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.
Heh, we don't want to exclude size 1 matrices 😅
Yeah, definitely |
/cherry-pick release-v0.62.x |
/cherry-pick release-v0.59.x |
@vdemeester: new pull request created: #8167 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. |
@vdemeester: new pull request created: #8168 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. |
/cherry-pick release-v0.56.x |
@vdemeester: new pull request created: #8169 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. |
Actions taken: * Move the PipelineSpec content into a Pipeline file * Rearranged the spec to be ordered params, tasks, results, finally, workspaces * Added back the on-cel-expressions from before (changing the pipeline which will trigger builds from multi-arch-build-pipeline) * Added spec.params.build-platforms to the PipelineRun * Changed the build-image-index task to accept a single value for IMAGES to allow for a single arch build for initial builds since tektoncd/pipeline#8158 is not deployed to the Konflux cluster yet. Signed-off-by: arewm <[email protected]>
Actions taken: * Move the PipelineSpec content into a Pipeline file * Rearranged the spec to be ordered params, tasks, results, finally, workspaces * Added back the on-cel-expressions from before (changing the pipeline which will trigger builds from multi-arch-build-pipeline) * Added spec.params.build-platforms to the PipelineRun * Changed the build-image-index task to accept a single value for IMAGES to allow for a single arch build for initial builds since tektoncd/pipeline#8158 is not deployed to the Konflux cluster yet. Signed-off-by: arewm <[email protected]>
Actions taken: * Move the PipelineSpec content into a Pipeline file * Rearranged the spec to be ordered params, tasks, results, finally, workspaces * Added back the on-cel-expressions from before (changing the pipeline which will trigger builds from multi-arch-build-pipeline) * Added spec.params.build-platforms to the PipelineRun * Changed the build-image-index task to accept a single value for IMAGES to allow for a single arch build for initial builds since tektoncd/pipeline#8158 is not deployed to the Konflux cluster yet. Signed-off-by: arewm <[email protected]>
Actions taken: * Move the PipelineSpec content into a Pipeline file * Rearranged the spec to be ordered params, tasks, results, finally, workspaces * Added back the on-cel-expressions from before (changing the pipeline which will trigger builds from multi-arch-build-pipeline) * Added spec.params.build-platforms to the PipelineRun * Changed the build-image-index task to accept a single value for IMAGES to allow for a single arch build for initial builds since tektoncd/pipeline#8158 is not deployed to the Konflux cluster yet. Signed-off-by: arewm <[email protected]>
Changes
Given a matrix run of a TaskRun with cardinality of 1, the result from it will not be converted to an array but kept as a string, i.e. as if the TaskRun was not configured to run with matrix.
This causes issues for consumers of the TaskRun's results as they will be configured to consume array results. As a result making the passed value equal to expression value instead.
Resolves: #8157
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