docs: plan for #305 — workbench idle session auto-suspend behavior#315
Open
posit-vip-triage[bot] wants to merge 5 commits into
Open
docs: plan for #305 — workbench idle session auto-suspend behavior#315posit-vip-triage[bot] wants to merge 5 commits into
posit-vip-triage[bot] wants to merge 5 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Preview Links
|
ian-flores
reviewed
Jun 11, 2026
|
|
||
| ## Open questions | ||
|
|
||
| - The issue proposes a grace window (timeout + 60s) to account for clock drift. Should this be a fixed 60-second buffer, a configurable field, or a percentage of the timeout? Defaulting to a fixed 60-second buffer is simplest and matches the issue's suggestion. This can be revisited if deployments with high clock drift are encountered. |
Contributor
There was a problem hiding this comment.
Done — the grace window is now a configurable idle_grace_seconds: int = 60 field in WorkbenchConfig (alongside idle_timeout_minutes). The plan has been updated throughout: config wiring, fixture snippet, activity loop, vip.toml.example docs, and verification selftest list. The open question is resolved. Commit: docs: make idle grace window configurable via idle_grace_seconds field.
Co-authored-by: ian-flores <18703558+ian-flores@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan for issue #305: workbench idle session auto-suspend behavior
This PR revises the generated plan with two critical design fixes applied on top of the #349/#336 merges.
What the plan proposes
[workbench] idle_timeout_minutesandidle_grace_secondsTOML fields inWorkbenchConfig(alongsidejob_timeoutandtest_packages, not afterkubernetes)src/vip_tests/workbench/test_session_idle.featuretagged@workbench @performance:idle_grace_seconds, default 60 s)Design: periodic activity loop (not a blocking Sys.sleep)
The active-session scenario keeps the session alive by sending periodic interactive input events via
rstudio_evalevery 90 seconds across the idle-timeout window — not a single blockingSys.sleepspanning the whole window. A console blocked inSys.sleepis R being busy, not a session registering user activity; Workbench's idle timeout is driven by interactive input events. The loop:Each
rstudio_evalcall types a trivial expression into the RStudio console, emitting a real input event that resets the idle clock — faithful to "activity correctly resets the idle clock" from the issue.Configurable grace window
The grace window added on top of
idle_timeout_minutesis exposed asidle_grace_seconds: int = 60inWorkbenchConfig. Deployments with high clock drift or slow suspend response can increase this value invip.toml. Thevip.toml.exampledocuments both fields:Runtime ceiling: 15 minutes
These scenarios are only viable against deployments configured with a short idle timeout. The implementation skips (with a clear message) when
idle_timeout_minutes > 15:The
vip.toml.examplewill useidle_timeout_minutes = 5(not 120) and note the ceiling. A 120-minute example value would imply a 2+ hour test run, which is not viable.Note on TERMINAL_SESSION_FAILURE_STATES
TERMINAL_SESSION_FAILURE_STATESinsrc/vip_tests/workbench/conftest.py:39contains only("Failed",)—"Suspended"is intentionally absent, so PR #320's fail-fast logic will not false-fail the idle scenario when the session legitimately reaches Suspended state.Implements plan for #305