-
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
Allow admins to change workspaces inactivity and run timeout #21390
Comments
I ran across this enhancement request while searching for any known method of customizing the workspace idle timeout. I have searched, and found another suggested workaround here. Questions:
|
I'm not clear on why it's done in this way. The DevWorkspace Operator provides the environment variable command:
- /go/bin/che-machine-exec
- '--url'
- '127.0.0.1:3333'
- '--idle-timeout'
- '$DEVWORKSPACE_IDLE_TIMEOUT' then the workspace would automatically take into account the configured value in DWO. |
Note that here we are talking about Theia, the default editor included in Che workspaces. If instead we specify to use VS Code, IntelliJ or PyCharm instead of Theia, those won't be idled at all (and this can be problematic too). So, @pdfruth, if you prefer no-idling you can refer to this blog post draft to use a different editor. |
@l0rd |
@pdfruth sorry, I have updated the comment above with the right link. |
@l0rd Thank you for the updated link to the blog post draft. |
@pdfruth: you need a devfile c.f. https://github.com/pdfruth/voting-app-py-ds/pull/1, thanks for spotting that, I will update the document to mention that. @olexii4 I have reproduced that upstream too: .che/che-editor.yaml is ignored if there is no devfile. |
Thank You @l0rd. I can confirm that the addition of a devfile has enabled the che-code editor to load. And there is no idle timeout!! |
Hi @l0rd
I have been able to get the che-code editor working in conjunction with the Red Hat OpenShift Dev Spaces V3.0 operator on an OCP cluster on x86 architecture.
|
@pdfruth @azatsarynnyy I don't think we have any s390 build yet and I am not sure if we have a plan to build it for 3Q22 (cc @azatsarynnyy @RomanNikitenko @nickboldt). To build it yourself you can have a look at the PR check GitHub action. |
I have updated the description with CheCluster |
I think for Using those changes I had a successful build for |
@dkwon17 can we close this issue (asking to figure out if we can include it in 7.51 release notes). |
@l0rd , yes this can be closed and included in the 7.51 release notes |
For S390x support, or to contrubute to the effort, see https://issues.redhat.com/browse/CRW-3171 |
Tested on @pdfruth |
Is your enhancement related to a problem? Please describe
Before switching to the DevWorkspace engine, it was possible to specify workspaces timeout through Che server properties
CHE_LIMITS_WORKSPACE_IDLE_TIMEOUT
andCHE_LIMITS_WORKSPACE_RUN_TIMEOUT
.Currently Che-Theia based workspaces are idled after 15 minutes of inactivity. This is specified in the editor definition and it's not configurable by the user or by an admin (if not by patching the editor definition in the plugin registry or by publishing and using an alternative editor definition).
Note that VS Code and JetBrains IDE based workspaces are never idled and that we want to use a universal idling mechanism (there is a separate issue for that).
Describe the solution you'd like
CheCluster
CRD should have:devEnvironments.secondsOfInactivityBeforeIdling
devEnvironments.secondsOfRunBeforeIdling
That should be propagated as environment variables to the workspace containers:
SECONDS_OF_DW_INACTIVITY_BEFORE_IDLING
SECONDS_OF_DW_RUN_BEFORE_IDLING
Machine exec should parse those variables, if they exist, when setting the timeout.
Machine exec should support
SECONDS_OF_DW_RUN_BEFORE_IDLING
Theia definition should not specify the
--idle-timeout
parameter for machine exec.The defaults should be 30 minutes for
secondsOfInactivityBeforeIdling
andSECONDS_OF_DW_INACTIVITY_BEFORE_IDLING
and -1 forsecondsOfRunBeforeIdling
andSECONDS_OF_DW_RUN_BEFORE_IDLING
Additional context
#21322
Release notes text
Administrators can specify the timeout for inactivity and running workspaces with the
CheCluster
spec.devEnvironmentfields
secondsOfInactivityBeforeIdlingand
secondsOfRunBeforeIdling` respectively. The default values are 30 minutes and -1 (no timeout) respectively.The text was updated successfully, but these errors were encountered: