che: Allow admins to change workspaces inactivity and run timeout

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 and CHE_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 and SECONDS_OF_DW_INACTIVITY_BEFORE_IDLING and -1 for secondsOfRunBeforeIdling and SECONDS_OF_DW_RUN_BEFORE_IDLING

Additional context

https://github.com/eclipse/che/issues/21322

Release notes text

Administrators can specify the timeout for inactivity and running workspaces with the CheCluster spec.devEnvironmentfieldssecondsOfInactivityBeforeIdlingandsecondsOfRunBeforeIdling` respectively. The default values are 30 minutes and -1 (no timeout) respectively.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

@l0rd , yes this can be closed and included in the 7.51 release notes

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!!