-
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
Filter workspace containers like tools and user's #12386
Conversation
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
...core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/WorkspaceRuntimes.java
Outdated
Show resolved
Hide resolved
...-core-api-workspace-shared/src/main/java/org/eclipse/che/api/workspace/shared/Constants.java
Outdated
Show resolved
Hide resolved
...lipse/che/workspace/infrastructure/kubernetes/wsplugins/KubernetesPluginsToolingApplier.java
Outdated
Show resolved
Hide resolved
...core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/WorkspaceRuntimes.java
Outdated
Show resolved
Hide resolved
...core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/WorkspaceRuntimes.java
Outdated
Show resolved
Hide resolved
The final goal is to filter out containers where a user can open a terminal. I think we should make it explicit and instead of |
@l0rd It makes sense for me. Because plugin (tooling) may provide some CLI software in sidecar, like maven, git. And then it makes sense to propose user open terminal there. |
Why should we state that the terminal is NOT available in other containers? I think that there are cases when someone would want to have the terminal in those containers. At least Che/Theia contributors that found a bug while working with the project. We might skip those containers by default, but this doesn't mean we should say that the terminal is not available for them overall. |
@l0rd My changes supposed to be used not only for terminal access but also for an ability for hiding tools containers on |
@sleshchenko yes it's just to filter them out from theia command palette. Maybe the attribute @garagatyi agreed. I see this PR as a first step (add the enable terminal attribute and make it true by default for users containers and false for plugins). A second PR should follow to make it possible to enable terminal for plugin containers. And as a third and final step we should implement the ability to disable terminal for some runtime containers. @AndrienkoAleksandr I believe that the semantic is different and thus we need 2 distinct attributes. There will be situations where I don't want to enable a terminal but I want to see the container amongst the list and vice-versa. Think about plugins as well: jdt.ls sidecar for instance won't be a user container but the user will probably want to open a terminal there and we want to see it amongst the container list as well. Let's be explicit and use 2 different attributes (e.g. |
I guess make sense have two filter level:
In the machine View we could use first filter level: display in the tree two items: |
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
@AndrienkoAleksandr the problem with the types If you really don't want to use attributes names that reference explicitly the filters (containers for the terminal and for the viewer) and you want to keep the attribute |
@l0rd Thanks for sharing Devfile model. I was not aware of it before. |
Well Devfile is supposed to become the new way to define a workspace and the wording should not change much. WorkspaceConfig attributes instead may change names in next releases. I am not sure how long we will keep the name |
@l0rd Maybe later when |
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.
@AndrienkoAleksandr let's merge this PR in its current status. We don't need to discuss too much about it right now and we can rework if needed in the future.
We can even use the tool
attribute because we plan to rename tools
to components
in the devfile.
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
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.
LGTM
...-core-api-workspace-shared/src/main/java/org/eclipse/che/api/workspace/shared/Constants.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/che/api/workspace/server/spi/environment/InternalEnvironmentFactory.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/che/api/workspace/server/spi/environment/InternalEnvironmentFactory.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
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.
LGTM
Please take a look my minor comments
Long.toString(memoryLimitLong)); | ||
Long.toString(memoryLimitLong), | ||
CONTAINER_SOURCE_ATTRIBUTE, | ||
TOOL_CONTAINER_SOURCE); |
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.
It would be nice to have the corresponding check in JwtProxyProvisionerTest
@@ -194,6 +196,7 @@ private void addSidecar( | |||
.build(); | |||
|
|||
InternalMachineConfig machineConfig = machineResolver.resolve(); | |||
machineConfig.getAttributes().put(CONTAINER_SOURCE_ATTRIBUTE, TOOL_CONTAINER_SOURCE); |
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.
It would be nice to have the corresponding test in KubernetesPluginsToolingApplierTest
ci-test |
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
ci-test |
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
@AndrienkoAleksandr |
Signed-off-by: Anna Shumilova <ashumilo@redhat.com>
ci-test |
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
@eclipse/eclipse-che-qa Please verify the last test-report: #12386 (comment) |
Referenced issue
#11804
Add ability filter workspace containers like 'user-container' and 'tool-container'.
Signed-off-by: Oleksandr Andriienko oandriie@redhat.com