-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Do not fail PipelineRun if pvc creation error is because of exceeded quotas #8903
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
Conversation
/wip |
4a5edbf
to
52464a8
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/hold |
52464a8
to
6b0c7ae
Compare
The following is the coverage report on the affected files.
|
/retest |
Timeout is taken into account 👼🏼 |
/assign |
/cc @twoGiants |
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.
Good job, it makes sense to set the status to pending and let it retry 😸 👍.
Now it will re-queue right away. Do you want to make it configurable at some point like suggested in the issue?
My comments are below. I would add unit tests, simplify the conditional logic and remove the re-declaration of the errors in affinity_assistant.go
.
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.
Unit tests for the new conditional logic in CreatePVCFromVolumeClaimTemplate
should be added.
@@ -577,54 +577,56 @@ func TestCreateOrUpdateAffinityAssistantsAndPVCs_Failure(t *testing.T) { | |||
name: "pvc creation failed - per workspace", | |||
failureType: "pvc", | |||
aaBehavior: aa.AffinityAssistantPerWorkspace, | |||
expectedErr: fmt.Errorf("%w: failed to create PVC pvc-b9eea16dce: error creating persistentvolumeclaims", ErrPvcCreationFailed), | |||
expectedErr: fmt.Errorf("%w for pvc-b9eea16dce: error creating persistentvolumeclaims", ErrPvcCreationFailed), |
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.
You could use volumeclaim.ErrPvcCreationFailed
instead, then you don't need to re-declare them in affinity_assistant.go
.
…quotas In case of the PVC creation (from volumeclaimtemplate) is due to a quota error (quota exceeded), do not fail with a permanent error, and instead mark the PipelineRun as pending. Once there is some quota available back, it will be able to start. Signed-off-by: Vincent Demeester <[email protected]>
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/retest |
69cc896
to
0758e65
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
0758e65
to
3c2ea80
Compare
The following is the coverage report on the affected files.
|
Co-authored-by: Stanislav Jakuschevskij <[email protected]>
3c2ea80
to
e0410bf
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.
Looks good. Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aThorp96, waveywaves 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 |
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
@khrm: changing LGTM is restricted to collaborators 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. |
I believe the |
/cherry-pick release-v1.3.x |
1 similar comment
/cherry-pick release-v1.3.x |
Changes
In case of the PVC creation (from volumeclaimtemplate) is due to a
quota error (quota exceeded), do not fail with a permanent error, and
instead mark the PipelineRun as pending. Once there is some quota
available back, it will be able to start.
Signed-off-by: Vincent Demeester [email protected]
Closes #7672
/kind feature
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