Skip to content
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

feat: Deleting the common PVC if there are no workspaces left for a given user #16

Merged
merged 13 commits into from
Jun 7, 2021

Conversation

dkwon17
Copy link
Contributor

@dkwon17 dkwon17 commented May 27, 2021

What does this PR do?

Deletes the common PVC if there are no workspaces left for a given user. This PR copies over the three commits from this PR: eclipse-che/che#18713.

Screenshot/screencast of this PR

che-18369
After the three workspaces are deleted, the common PVC is deleted.

PVCs are also deleted when pvcStrategy is set to per-workspace:
che-18369_2
If pvcStrategy is set to per-workspace, after a workspace is deleted, the corresponding PVC is deleted.

What issues does this PR fix or reference?

eclipse-che/che#18369

How to test this PR?

The image: quay.io/dkwon17/che-server:che-18369

Testing with helm installer:

minikube start --addons=ingress --vm=true --memory=8192
chectl server:deploy --installer helm -p minikube --cheimage=quay.io/dkwon17/che-server:che-18369

Testing with operator installer:
When Che is deployed with the operator, we need this PR to provide delete permissions for the Che service account: eclipse-che/che-operator#847.
My che-operator image for that PR is: quay.io/dkwon17/che-operator:19867.

minikube start --addons=ingress --vm=true --memory=8192
chectl server:deploy --installer operator -p minikube --cheimage=quay.io/dkwon17/che-server:che-18369 --che-operator-image=quay.io/dkwon17/che-operator:19867

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

ibuziuk and others added 4 commits May 27, 2021 13:28
…r a given user

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
…e users ('workspaceNamespaceDefault' without placeholders is defined)

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
@che-bot
Copy link
Contributor

che-bot commented May 27, 2021

Can one of the admins verify this patch?

@dkwon17
Copy link
Contributor Author

dkwon17 commented May 27, 2021

@amisevsk @ibuziuk I had trouble reproducing this possible corner case: eclipse-che/che#18713 (review).

For the common strategy, I delete the Go workspace, and immediately create a Java Maven workspace, I don't seem to experience any blocking due to PVC deletion:
che-18369_4

Copy link
Member

@ibuziuk ibuziuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkwon17 could you please follow the brand new semantic PR requirment https://github.com/zeke/semantic-pull-requests

@dkwon17 dkwon17 changed the title che #18369 Deleting the common PVC if there are no workspaces left for a given user Feat: deleting the common PVC if there are no workspaces left for a given user May 31, 2021
@dkwon17 dkwon17 changed the title Feat: deleting the common PVC if there are no workspaces left for a given user feat: Deleting the common PVC if there are no workspaces left for a given user May 31, 2021
Signed-off-by: David Kwon <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
@skabashnyuk
Copy link
Contributor

[crw-ci-test --rebuild]

Copy link
Member

@ibuziuk ibuziuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, assuming that formatting is fixed (mvn fmt:format should be run according to the PR check) + the non-relevant test is removed #16 (comment)

@dkwon17 please also provide a relevant PR to docs with a new feature description. Smth. like:

NOTE: the common PVC will be removed once all user's workspaces are deleted. PVC will be re-created once a new non-ephemeral workspace is started.

https://www.eclipse.org/che/docs/che-7/installation-guide/configuring-storage-strategies/

Signed-off-by: David Kwon <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
@skabashnyuk
Copy link
Contributor

[crw-ci-test --rebuild]

@che-bot
Copy link
Contributor

che-bot commented Jun 4, 2021

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che on K8S (minikube v1.1.1)

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe

Copy link
Member

@sparkoo sparkoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great contribution, thanks

@skabashnyuk
Copy link
Contributor

[crw-ci-test --rebuild]

@che-bot
Copy link
Contributor

che-bot commented Jun 4, 2021

❌ E2E Happy path tests failed ❗

See Details

Tested with Eclipse Che on K8S (minikube v1.1.1)

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe

Copy link
Contributor

@metlos metlos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@skabashnyuk
Copy link
Contributor

[crw-ci-test --rebuild]

@che-bot
Copy link
Contributor

che-bot commented Jun 4, 2021

✅ E2E Happy path tests succeed 🎉

See Details

Tested with Eclipse Che on K8S (minikube v1.1.1)

  • Use comment "[crw-ci-test]" to rerun happy path E2E test.
  • Use comment "[crw-ci-test --rebuild]" to re-build the images and rerun happy path E2E test.

Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe

@dkwon17
Copy link
Contributor Author

dkwon17 commented Jun 4, 2021

Thanks a lot, everyone. Is now a good time for me to squash all commits into one?

@nickboldt
Copy link
Contributor

Is now a good time for me to squash all commits into one?

Unless there's a compelling reason to show the commit history, I always use 'squash and merge' to apply PRs.

Sometimes I'll manually rebase a bunch of commits from, say, 12 commits down to 2 or 3 (if the PR covers more than one interesting change) and then NOT squash-merge... but that's the exception.

TL;DR, I'd say yes, squash away!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants