-
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
Fix Taskrun Failure for Preempted Pod of Taskrun #6962
Conversation
We will need to fix this for v0.46, v0.47, v0.48 and v0.49. |
The following is the coverage report on the affected files.
|
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.
/kind bug
The following is the coverage report on the affected files.
|
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.
@khrm any way to write a regression test for this somehow ? (in taskrun_test.go
or something)
@vdemeester Sure, I would write a test. |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
@vdemeester I have added the test. Please check. |
The following is the coverage report on the affected files.
|
9ec3db4
to
6e38d56
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.
|
|
||
// TestTaskRunPremption tests that Taskrun can run again | ||
// after its pod has been prempted before completion. | ||
func TestTaskRunPremption(t *testing.T) { |
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.
Nice!
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 fixing this bug!
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afrittoli 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 |
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.
|
The following is the coverage report on the affected files.
|
This fixes the Taskrun failure for Preempted Pod of Taskrun. In CreatePod, we stop deep copying task spec since v46.0 which causes failure when we preempt pod. Killing the pod twice or thrice should fail the Taskrun because we overwrite information about task spec in the Taskrun status and when the pod is recreated, validation will fail. Like volume mount for workspace validation will fail in the case of PVC.
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/lgtm |
@khrm: new pull request created: #7005 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. |
@khrm: new pull request created: #7006 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. |
@khrm: new pull request created: #7007 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. |
@khrm: new pull request created: #7008 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. |
@khrm: new pull request created: #7009 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 fixes the Taskrun failure for Preempted Pod of Taskrun. In CreatePod, we stop deep copying task spec since v46.0 which causes failure when we preempt pod. Killing the pod twice or thrice should fail the Taskrun because we overwrite information about task spec in the Taskrun status and when the pod is recreated, validation will fail. Like volume mount for workspace validation will fail in the case of PVC.
Fixes #6947
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