-
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
don't return validation error when taskrun failed/skipped #6395
Conversation
Skipping CI for Draft Pull Request. |
/test all |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
2ad0e55
to
455e0e0
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/retest |
Hi @pritidesai, @vdemeester , could you help me take a look at this PR and see if it could be a fix for those issues? Comments and suggestions are welcome! |
@Yongxuanzhang @pritidesai does it make sense to cherry-pick this for 0.41 and 0.44 (LTS), 0.45 and 0.46 ? (as this is a behavior something that changed) |
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.
I would love to have one more yaml for regression test, but other than this, LGTM I think
}, { | ||
description: "unsuccessful-taskrun-no-returned-result", | ||
results: []v1beta1.PipelineResult{{ | ||
Name: "foo", | ||
Value: *v1beta1.NewStructuredValues("$(tasks.pt1.results.foo)"), | ||
}}, | ||
taskResults: map[string][]v1beta1.TaskRunResult{}, | ||
expectedResults: nil, | ||
expectedError: fmt.Errorf("invalid pipelineresults [foo], the referred results don't exist"), |
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.
Shouldn't we "update" that Test, the expected Error should, however change (not invalid result, but something else) ? But maybe this is not at the same level.
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.
I don't remember why I removed this test, could be a mistake
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.
added this back
We better have an e2e test for this pr |
@Yongxuanzhang Any update on this ? |
/assign |
Hi @pritidesai, wonder if you have availability/interested to review this PR ? Thanks! |
/assign @pritidesai |
taskstatus: map[string]string{resources.PipelineTaskStatusPrefix + "pt1" + resources.PipelineTaskStatusSuffix: v1beta1.TaskRunReasonFailed.String()}, | ||
expectedResults: nil, | ||
}, { | ||
description: "unsuccessful-taskrun-with-results", |
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 for adding this test case which will be add more value and affirmation to #6510
@Yongxuanzhang Sorry for the delay 🙏 Thanks a bunch for adding an example and also /lgtm once this is merged, let's cherry pick this into 0.41, 0.44, and 0.47, thanks! |
/cherry-pick release-v0.41.x |
/cherry-pick release-v0.44.x |
/cherry-pick release-v0.47.x |
@pritidesai: #6395 failed to apply on top of branch "release-v0.41.x":
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. |
@pritidesai: #6395 failed to apply on top of branch "release-v0.44.x":
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. |
@pritidesai: new pull request created: #6688 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. |
This commit closes tektoncd#6139, in previous fix PR: tektoncd#6395, only dagTasks statuses are considered and final tasks are missing. This PR fixes this. Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
This commit closes tektoncd#6139, in previous fix PR: tektoncd#6395, only dagTasks statuses are considered and final tasks are missing. This PR fixes this. Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
This commit closes tektoncd#6139, in previous fix PR: tektoncd#6395, only dagTasks statuses are considered and final tasks are missing. This PR fixes this. Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
This commit closes tektoncd#6139, in previous fix PR: tektoncd#6395, only dagTasks statuses are considered and final tasks are missing. This PR fixes this. Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
This commit closes tektoncd#6139, in previous fix PR: tektoncd#6395, only dagTasks statuses are considered and final tasks are missing. This PR fixes this. Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com (cherry picked from commit 7c040de)
This commit closes tektoncd#6139, in previous fix PR: tektoncd#6395, only dagTasks statuses are considered and final tasks are missing. This PR fixes this. Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com (cherry picked from commit 7c040de) Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
This commit closes tektoncd#6139, in previous fix PR: tektoncd#6395, only dagTasks statuses are considered and final tasks are missing. This PR fixes this. Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
Changes
This commit aims to fix #6383, #6139 and supports #3749. This commits skip the validation if the taskrun is not successful (e.g. failed or skipped) and omit the pipelinerun coresponding result. This way the skipped taskrun won't get validation error for pipelinerun. And the pipelinerun error won't be overwritten by the validation error.
/kind bug
Signed-off-by: Yongxuan Zhang yongxuanzhang@google.com
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes