Repository navigation
fix waitForSessionRestart marker false-pass during session resume - #18207
Merged
Merged
Conversation
The readiness check typed cat("<marker>") and looked for the marker in the
console output -- but the submitted command is echoed into the output, so the
check passed off the echo even when the console input never reached R (jsonrpc
error 1 "Unable to connect to service" while a suspended session was still
relaunching). The helper then returned "ready" while the session was down,
and the test's next executeInConsole wait timed out.
Split the marker across two cat() arguments so only real output matches, use
one timestamp per call so a late-delivered early attempt satisfies a later
check, and widen the retry budget to cover a slow relaunch (rserver can hold
each input for up to 30s before failing it).
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This was referenced Jul 13, 2026
RStudio E2E - all platformsAll tests passed!
View / download the full reportView report online -- opens in the browser, no download needed. Available for 14 days. Download playwright-report.zip -- extract and open
All platforms - commit |
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.
Summary
The server-linux
session_suspend.test.tsfailure on PR #18203 (run 29273786621) traced back to a false-pass inwaitForSessionRestart: the helper typedcat("<marker>")and checkedoutput.includes(marker), but the submitted command is echoed into the console output, so the check passed off the echo even when the console input never reached R. In the failing run, the input came back asjsonrpc error 1 (Unable to connect to service)-- rserver's ConnectionError envelope while the suspended session was still relaunching -- yet the helper declared the session ready on its first attempt. The test's nextexecuteInConsole({ wait: true })input was swallowed the same way, sopromptCountnever advanced and the 30s wait timed out.Changes:
cat()arguments (cat("[pw:session-restart-", "ready <ts>]", sep = "")) so the joined marker can only appear as real R output, never in the command echo. A failed delivery now correctly falls through to the retry loop.rsession-proxy-max-wait-secs(default 30s) before failing it, so an early attempt'scat()may only execute during a later attempt's check -- any attempt's output confirms readiness.SessionManager::launchSessionreturns early for pending launches < 1 minute old).Test-infra only; no NEWS entry.
Testing
npx tsc --noEmitine2e/rstudiopasses.includes()check.