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

fix: Simplification of the 'canCreateNamespace' logic #431

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

ibuziuk
Copy link
Member

@ibuziuk ibuziuk commented Feb 1, 2023

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.

image

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

spec:
  components:
    cheServer:
      debug: true
      logLevel: INFO
      deployment:
        containers:
          - image: 'quay.io/ibuziuk/che-server:che-21958'
            name: che

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.

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

@tolusha tolusha left a comment

Choose a reason for hiding this comment

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

Neat solution!

@karatkep
Copy link
Contributor

karatkep commented Feb 1, 2023

Very nice and straightforward solution! Great job @ibuziuk !

@ibuziuk ibuziuk merged commit 3b39854 into eclipse-che:main Feb 2, 2023
@devstudio-release
Copy link

Build 3.6 :: server_3.x/111: Console, Changes, Git Data

@che-bot che-bot added this to the 7.61 milestone Feb 2, 2023
@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.6 :: push-latest-container-to-quay_3.x/1636: UNSTABLE

Copied: server-rhel8; Quay/Brew version mismatch; all Quay images updated; /job/DS_CI/job/update-digests_3.x triggered;
/job/DS_CI/job/Releng/job/copyIIBsToQuay triggered for OCP v4.13 v4.12 v4.11 v4.10

@devstudio-release
Copy link

Build 3.6 :: update-digests_3.x/2051: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.6 :: copyIIBsToQuay/787: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.6 :: sync-to-downstream_3.x/2178: SUCCESS

Build container: devspaces-server synced; /DS_CI/get-sources-rhpkg-container-build_3.x/2070 triggered;

@devstudio-release
Copy link

Build 3.6 :: server_3.x/111: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/2178 triggered

@devstudio-release
Copy link

Build 3.6 :: operator-bundle_3.x/822: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.6 :: get-sources-rhpkg-container-build_3.x/2072: FAILURE

devspaces-operator-bundle : 3.x :: Failed in 50455692 : BREW:BUILD/STATUS:UNKNOWN
FAILURE:; copied to quay

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

Successfully merging this pull request may close these issues.

6 participants