-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 exception if no data in certs config map #18519
Conversation
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Multiuser User on K8S (minikube v1.1.1)
|
@@ -114,7 +114,9 @@ public void provision(KubernetesEnvironment k8sEnv, RuntimeIdentity runtimeID) | |||
|
|||
KubernetesNamespace namespace = namespaceFactory.getOrCreate(runtimeID); | |||
Optional<ConfigMap> existing = namespace.configMaps().get(configMapName); | |||
if (existing.isEmpty() || !existing.get().getData().equals(allCaCertsConfigMap.getData())) { | |||
if (existing.isEmpty() | |||
|| !(existing.get().getData() == allCaCertsConfigMap.getData() |
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.
A || !(B || C)
is hard to read and understand.
The following can be a bit easier if A || !B && !C!
If empty OR not the same (not equals in pointers terms && does not have the same values)
WDYT?
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.
Conditions B and C are logically related so, to my mind, it is clearer to leave that as is.
What does this PR do?
Provides fix for inability to start second workspace for the user
Screenshot/screencast of this PR
N/A
What issues does this PR fix or reference?
Failure to start second workspace for the user cause by exception:
How to test this PR?
Start two workspaces simultaniously
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.