Skip to content

Add 20-minute timeout to CI test jobs#143

Merged
LakshyAAAgrawal merged 1 commit into
microsoft:mainfrom
LakshyAAAgrawal:fix/ci-timeout
Apr 11, 2026
Merged

Add 20-minute timeout to CI test jobs#143
LakshyAAAgrawal merged 1 commit into
microsoft:mainfrom
LakshyAAAgrawal:fix/ci-timeout

Conversation

@LakshyAAAgrawal
Copy link
Copy Markdown
Collaborator

GitHub Actions jobs default to a 6-hour timeout. Multiple runs observed stuck for 2+ hours on "Run tests" while identical tests pass in 8 minutes on other runners. This wastes CI minutes and blocks PRs.

Adds timeout-minutes: 20 to both test and publish workflows. Normal runs complete in ~9 minutes.

@LakshyAAAgrawal LakshyAAAgrawal force-pushed the fix/ci-timeout branch 6 times, most recently from ca345a1 to 7253cf6 Compare April 10, 2026 21:57
Root cause: tests hang indefinitely when a language server fails to
initialize or shut down. Three issues:

1. create_subprocess_shell spawns a shell wrapper (sh -c "java ...").
   When the shell exits, process.kill() targets the shell, but the
   actual server (e.g., JVM) may continue running as an orphan,
   holding workspace locks that block subsequent test instances.
   Fix: switch to create_subprocess_exec with cmd as List[str],
   eliminating the shell wrapper entirely. The language server is
   now the direct child process.

2. All Event.wait() calls (server_ready, completions_available, etc.)
   had no timeout. If the server never sends the expected notification,
   the test blocks forever.
   Fix: wrap all 10 Event.wait() calls in wait_for(timeout=120).

3. LSP shutdown() request had no timeout. If the server is
   unresponsive, shutdown blocks forever, preventing stop() from
   killing the process.
   Fix: add 30-second timeout to shutdown request.

Also: capture full process tree before signaling and kill any surviving
orphaned children, and add timeout-minutes: 20 to CI as safety net.
@LakshyAAAgrawal LakshyAAAgrawal merged commit 55a0ca5 into microsoft:main Apr 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants