-
Notifications
You must be signed in to change notification settings - Fork 39
fix: Allow tools running in the terminal to prevent the workspace from stopping due to idling #332
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
base: main
Are you sure you want to change the base?
fix: Allow tools running in the terminal to prevent the workspace from stopping due to idling #332
Conversation
7c763bf
to
3dce8f3
Compare
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.
👍
@vrubezhny |
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.
Works as expected
There is extremely rare case, but when |
To test it:
|
Yes, if the check for a command running happens with the less frequency that it may skip some activity events. One can configure
|
3dce8f3
to
c26036f
Compare
…m stopping due to idling This adds support for a CLI Watcher in che-machine-exec to prevent DevWorkspace idling when long-running CLI tools are running in the terminal. The watcher is user-configurable via a '.noidle' YAML file. No admin privileges are required. How configuration is resolved: The '.noidle' file is located by searching in the following order: - A path specified by the CLI_WATCHER_CONFIG environment variable - Searching upward from the current project directory toward $PROJECTS_ROOT, looking for .noidle - Falling back to '$HOME/.noidle' (e.g. '~/.noidle') - If not found, CLI Watcher waits and checks again on the next poll Example .noidle configuration: ```yaml enabled: true watchedCommands: - helm - odo - sleep checkPeriodSeconds: 60 ``` Where: - enabled: Enables or disables the CLI watcher (boolean) - watchedCommands: List of command names to monitor - checkPeriodSeconds: Polling interval in seconds (default is 60) Benefits: - Works entirely in user space — no container or cluster admin config needed - Supports live updates (file can be added, edited, or removed while running) - Helps avoid idle timeout disconnects during long-running CLI workflows - Allows workspace authors to tailor idle behavior to specific tools Issue: eclipse-che/che#23529 Signed-off-by: Victor Rubezhny <[email protected]>
c26036f
to
8967a19
Compare
This adds support for a CLI Watcher in che-machine-exec to prevent DevWorkspace idling when long-running CLI tools are running in the terminal.
The watcher is user-configurable via a '.noidle' YAML file. No admin privileges are required.
How configuration is resolved:
The '.noidle' file is located by searching in the following order:
CLI_WATCHER_CONFIG
environment variable$PROJECTS_ROOT
, looking for.noidle
$HOME/.noidle
(e.g.~/.noidle
)Example
.noidle
configuration:Where:
Benefits:
Issue: eclipse-che/che#23529