Merged
Conversation
Root causes of E2E failures:
1. Docker Desktop becomes temporarily unresponsive after 74s of
heavy Docker tests on macOS. The single 'docker info' check
right after the tests was failing, causing the E2E server to
start without FORCE_DOCKER=1. All 5 sandbox runners then
attempted eager docker checks, found the socket broken, and
fell back to local-only mode (which has race conditions).
Fix: replace the one-shot 'if docker info' with a 30-second
retry loop (10 × 3s) that waits for Docker Desktop to recover
before starting the E2E server and setting FORCE_DOCKER=1.
2. ws.on('close') sets clientState.runner = null while
handleRunMessage is awaiting runSketch(), creating a race with
the subsequent clientState.runner.getSandboxStatus() call -
producing 'Cannot read properties of null' errors.
Fix: capture runner reference before the await gap so
getSandboxStatus() always has a valid non-null reference.
root causes of Docker Desktop crash + E2E failures: 1. docker-compose unosim-server occupied port 3000 (restart: unless-stopped). lsof kill only removed docker-proxy, container kept running/restarting. 2. stale exited sandbox containers piled up across runs (8 found). cleanup only filtered by current ancestor image, missing old image IDs. 3. no container cleanup between Docker tests (74s) and E2E server start. Docker Desktop became overloaded and temporarily unresponsive. fixes: - add pre-flight section: checks node, docker, sonarqube, port 3000 - stop docker-compose unosim-server before tests (port 3000 conflict) - find_sandbox_containers() helper: name + command-based matching catches containers from any image version (including unnamed/old-ID ones) - clean stale containers in pre-flight and after Docker tests - export FORCE_DOCKER=1 (not just inline) for reliable propagation - docker recovery retry loop only when docker was available initially proven: ./run-tests.sh passes all 7 steps + sonarqube quality gate 1402 unit tests, 32 docker tests, 16 E2E tests, 0 issues
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.
No description provided.