-
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
(Universal) Idling for DevWorkspace based workspaces #20345
Comments
We had a call this morning where we discussed what's the best Che component to handle that. Here is a summary: I am against making the DevWorkspace operator responsible for idling workspaces. I would like the DevWorkspace to be as simple as possible and to only be responsible to transforms devfiles into k8s objects. It should not be multi-tenant and should not manage user workspaces (creating, updating, deleting DevWorkspace CRs): those are responsibilities of the server-side components. @skabashnyuk doesn’t want it to be part of the che-server because he considers that we are not investing in that Java code anymore and the che-server is not cloud native anyway. It should rather be a responsibility of the Che operator that currently manages workspaces namespaces. @sleshchenko doesn't know what's the ideal solution but delegating idling to an operator may not be the best option: that's not about reconciling custom resources and that's what controllers should do. @tolusha what's your opinion? |
For me it is strange to delegate this to che-operator. As you said:
|
Just to share. I looked a bit on the implementation for the referenced https://knative.dev/docs/serving/autoscaling/ and they really have operator-based approach.
If we go with Server approach, we still need to store somewhere the usage information. The simplest solution without database - configmap, but it may look a bit weird. |
Is using knative |
As we agreed on today's DevWorkspace Cabal, this issue is not in milestone 3 anymore, but instead, we'll implement (in 3rd Milestone) quick solution on Theia + Machine Exec side #20460. This issue is relevant and we see the value on stopping by inactivity on Che side, regardless editor that is used. |
An API only in chrome |
Removed from |
Removed the kind/epic label as that's a subtask of the epic Production-ready support of VS Code as a Che editor #20500 |
Issues go stale after Mark the issue as fresh with If this issue is safe to close now please do so. Moderators: Add |
Hello @l0rd, @nickboldt, @tolusha, @ibuziuk . Just to make it clear: is there any way to shut down DevWorkspace after some time of user inactivity? I tried to play with both |
It's implemented and working for VS Code but not for JetBrains IDE yet. The component that is responsible to track the IDE activity and stop the workspace is machine-exec that is copied in a volume and executed at workspace startup. |
Thank you @l0rd ! Could you please share how to use machine-exec container in the right way with VS Code? Any sample. Thanks in advance! |
There is nothing particular to do if you use Eclipse Che definition of VS Code:
|
Thank you very much @l0rd for detailed explanation! |
This is on hold until we start using JetBrians Gateway. |
Is your enhancement related to a problem? Please describe
Workspaces controlled by the che-server are shut down when inactive for a specific period of time (specified by the customCheProperty
CHE_LIMITS_WORKSPACE_IDLE_TIMEOUT
) but there is no way at the moment to automatically shut down Workspaces controlled by the devworkspace operator.Describe the solution you'd like
Workspaces idling should work with DevWorkspaces too. A possible solution would be to use a mechanism similar to Knative autoscaling system: expose workspaces activity metrics (e.g. editor requests per second) and at che-server level collect those metrics and decide which DevWorkspaces need to be scaled to zero.
Activity metrics should be exposed by editors (theia, jetbrains, vscode) extensions.
Scale to zero for workspaces without an editor or for workspaces with an editors but without metrics is out of the scope of this epic.
Describe alternatives you've considered
Currently the Web Terminal supports idling using activity ticks sent from the Console to the machine-exec activity rest API. This approach has a few drawbacks: couples machine-exec and the component that tracks the activity, machine-exec requires privileges to scale the dw to zero.
The text was updated successfully, but these errors were encountered: