-
Notifications
You must be signed in to change notification settings - Fork 71
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: Simplification of the 'canCreateNamespace' logic #431
Conversation
Signed-off-by: Ilya Buziuk <[email protected]>
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.
Neat solution!
Very nice and straightforward solution! Great job @ibuziuk ! |
Build 3.6 :: server_3.x/111: Console, Changes, Git Data |
Build 3.6 :: sync-to-downstream_3.x/2178: Console, Changes, Git Data |
Build 3.6 :: push-latest-container-to-quay_3.x/1636: Console, Changes, Git Data |
Build 3.6 :: push-latest-container-to-quay_3.x/1636: Copied: server-rhel8; Quay/Brew version mismatch; all Quay images updated; /job/DS_CI/job/update-digests_3.x triggered; |
Build 3.6 :: update-digests_3.x/2051: Console, Changes, Git Data |
Build 3.6 :: get-sources-rhpkg-container-build_3.x/2070: server : 3.x :: Build 50455166 : quay.io/devspaces/server-rhel8:3.6-1 |
Build 3.6 :: copyIIBsToQuay/787: Console, Changes, Git Data |
Build 3.6 :: sync-to-downstream_3.x/2178: Build container: devspaces-server synced; /DS_CI/get-sources-rhpkg-container-build_3.x/2070 triggered; |
Build 3.6 :: server_3.x/111: Upstream sync done; /DS_CI/sync-to-downstream_3.x/2178 triggered |
Build 3.6 :: operator-bundle_3.x/822: Console, Changes, Git Data |
Build 3.6 :: sync-to-downstream_3.x/2181: Console, Changes, Git Data |
Build 3.6 :: get-sources-rhpkg-container-build_3.x/2072: devspaces-operator-bundle : 3.x :: Failed in 50455692 : BREW:BUILD/STATUS:UNKNOWN |
What does this PR do?
Simplification of the 'canCreateNamespace' logic, checking only single property
namespaceCreationAllowed
as part of the method.Screenshot/screencast of this PR
canCreateNamespace
has a pretty sophisticated logic. Since we do not store any relevant data in the db anymore (see #398 for additional details) this resulted in the bug when the username contains special characters and can not be used as-is as a placeholder for k8s namespace / OpenShift project.However, at this point, we probably do not need at all such checks since those were relevant only when workspaces were created and managed by che-server
What issues does this PR fix or reference?
eclipse-che/che#21958
NOTE: should be also backported to 7.60.x for Eclipse Che 7.60.1 and Dev Spaces 3.5
How to test this PR?
image
quay.io/ibuziuk/che-server:che-21958
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.