-
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 final tasks failed/skipped #7407
Conversation
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/approve |
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 [email protected]
e7c0f6a
to
f3d0f7e
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chitrangpatel, 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 |
@@ -542,6 +542,30 @@ func (facts *PipelineRunFacts) GetPipelineTaskStatus() map[string]string { | |||
return tStatus | |||
} | |||
|
|||
// GetPipelineTaskStatus returns the status of a PipelineFinalTask depending on its taskRun | |||
func (facts *PipelineRunFacts) GetPipelineFinalTaskStatus() map[string]string { | |||
// construct a map of tasks.<pipelineTask>.status and its state |
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.
Looks like this code is very similar to GetPipelineTaskStatus
. Can we refactor this part 🙏
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.
just the switch part is overlapping, I think that's fine? 🤔
// None includes skipped as well | ||
s = PipelineTaskStateNone | ||
} | ||
tStatus[PipelineTaskStatusPrefix+t.PipelineTask.Name+PipelineTaskStatusSuffix] = s |
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.
let's use fmt.Sprintf()?
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.
did you mean fmt.Sprintf(PipelineTaskStatusPrefix, t.PipelineTask.Name, PipelineTaskStatusSuffix)
?
we don't have format here, the ide will complain
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 was talking about using fmt.Sprintf("%s%s%s", aa, bb, cc)
. Not really a big deal though
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.
Ohhh 😂 my bad
Thanks! /lgtm |
@Yongxuanzhang @QuanZhang-William @chitrangpatel we should probably backport this to affected LTS as well, make sense ? |
/cherry-pick release-v0.47.x |
/cherry-pick release-v0.50.x |
/cherry-pick release-v0.53.x |
@vdemeester: #7407 failed to apply on top of branch "release-v0.47.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. |
@vdemeester: new pull request created: #7485 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: #7486 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. |
Yes! Thanks for helping me to patch this fix. I don't have time this week. >_< But may be able to do so next week or next month after holidays... |
This also affects 0.54.x 🙃 |
@vdemeester: new pull request created: #7510 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 in case you missed it, it failed to apply on 0.47.x - #7407 (comment) |
Add some missing functions. Signed-off-by: Vincent Demeester <[email protected]>
Add some missing functions. Signed-off-by: Vincent Demeester <[email protected]>
#7487 I did the cherry-pick manually |
Add some missing functions. Signed-off-by: Vincent Demeester <[email protected]>
Changes
This commit closes #6139, in previous fix PR:
#6395, only dagTasks statuses are considered and final tasks are missing. This PR fixes this.
/kind bug
Signed-off-by: Yongxuan Zhang [email protected]
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