-
Notifications
You must be signed in to change notification settings - Fork 68
Fix issue where deleting a workspace deletes the PVC incorrectly #870
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
Once merged, this PR should be cherry-picked to the 0.15.x branch. |
Fix a regression caused by commit cbd3fd1. When deleting workspaces, if there are no non-terminating workspaces left in the namespace, we delete the common PVC rather than running cleanup jobs. However, the way the check was written assumed that we were counting _all_ workspaces, and would delete the common PVC if there were two workspaces in a namespace and one was deleted. Signed-off-by: Angel Misevski <amisevsk@redhat.com>
f36f052
to
c46d7e5
Compare
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.
This fixes the issue that the PR aims to fix, but prevents the PVC from being deleted when there are no workspaces present (
i.e. delete both workspaces and see that the common PVC is not deleted). I'm going to think a bit more of another potential fix.
@AObuchow I had made 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.
@amisevsk Works as expected now :)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amisevsk, AObuchow, ibuziuk 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 |
What does this PR do?
Fix a regression caused by commit cbd3fd1. When deleting workspaces, if
there are no non-terminating workspaces left in the namespace, we delete
the common PVC rather than running cleanup jobs. However, the way the
check was written assumed that we were counting all workspaces, and
would delete the common PVC if there were two workspaces in a namespace
and one was deleted.
What issues does this PR fix or reference?
Mentioned in review for #846 (review) -- I'm not sure how I didn't catch it in the original PR; test case was likely missed by me testing
Closes #871
Is it tested? How?
PR Checklist
/test v8-devworkspace-operator-e2e, v8-che-happy-path
to trigger)v8-devworkspace-operator-e2e
: DevWorkspace e2e testv8-che-happy-path
: Happy path for verification integration with Che