Skip to content

fix(e2e): unblock Tier 2 parallel runs (#56) - #60

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/56-tier2-parallel
Jun 5, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/56-tier2-parallel

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Fixes #56. Full Tier 2 went from 3/24 passing (systemic 10-min timeouts) to 17/24 in 316s against real AWS (spore-host-dev).

Root cause (the real one)

waitForRunning/waitForState/terminateByName/instanceState parsed spawn list -o json via CombinedOutput(), which prepends stderr (Searching region us-east-1...) to the JSON → json.Unmarshal failed on every poll → every instance-launching test silently looped until its 10-min deadline with last state: <empty>. The instances were fine; the harness just never parsed the list. New spawnStdout() captures stdout only.

Also fixed (real product bugs found en route)

  1. DNS registration ignored --wait-for-ssh — launch SSHed into the instance to register DNS even with --wait-for-ssh=false, blocking on an SSH that isn't ready. Now gated on waitForSSH (+ a 'register later' hint when skipped). Normal launches unchanged (flag defaults true).
  2. spawn hijacked the user's SSH ControlMaster — connect + registerDNS now pass ControlMaster=no/ControlPath=none so parallel SSH doesn't serialize on one shared socket.
  3. Harness: launchSem caps the launch burst at 6 (not via -parallel); running/assertion phases stay parallel. Reaper/TTL/Cleanup untouched.

Remaining 7 failures — separate, triaged

Not the harness timeout. Will file/handle individually: FSx test uses a fake fs-id; hibernate (×2) spawn hibernate exit 1; IAM-policy propagation timing; pre-stop / command SSH timing; #313 name-resolution.

Scope note

#58 still tracks real N-way concurrent-launch infra scaling — the semaphore caps test concurrency, it doesn't validate it.

Verification

3-test subset green (PublicIP 33s, ConnectSSH 45s, ConnectAutoStart 93s — the stop→connect→wake cycle). Full suite 17/24 in 316s. Cost control verified: 0 e2e instances remain across regions after each run.

Full Tier 2 went from 3/24 passing (systemic 10-min timeouts) to 17/24 in
316s. Four fixes, in order of impact:

1. (THE root cause) waitForRunning/waitForState/terminateByName/instanceState
   parsed spawn list via CombinedOutput(), which prepends stderr ('Searching
   region ...') to the JSON → json.Unmarshal failed on every poll → every
   instance-launching test silently timed out with 'last state: <empty>'.
   New spawnStdout() captures stdout only; the four JSON pollers use it.

2. (product) launch registered DNS by SSHing into the instance even with
   --wait-for-ssh=false — blocking on an SSH that isn't ready yet. Gate DNS
   registration on waitForSSH; print a notice + 'spawn dns register' hint when
   skipped. Normal launches (--wait-for-ssh defaults true) are unchanged.

3. (product) connect + registerDNS SSH now pass ControlMaster=no /
   ControlPath=none so spawn never piggybacks the user's ~/.ssh ControlMaster
   socket — parallel SSH no longer serializes on one shared socket.

4. (harness) launchSem caps the launch burst at 6 concurrent (not via
   go test -parallel) to smooth the AWS API storm; running/assertion phases
   stay fully parallel. Reaper/TTL/Cleanup untouched — cost control intact.

The remaining 7 failures are separate product/test issues (FSx fake-id,
hibernate, IAM-policy propagation, pre-stop/command SSH timing, #313 name
resolution), NOT the harness timeout — triaged separately. #58 still tracks
real N-way concurrent-launch scaling (the semaphore caps test concurrency,
doesn't validate it).

Fixes #56
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 35 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/launch.go 0.00% 18 Missing ⚠️
test/e2e/helpers.go 0.00% 15 Missing ⚠️
cmd/connect.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 4733d28 into main Jun 5, 2026
2 of 3 checks passed
@scttfrdmn
scttfrdmn deleted the fix/56-tier2-parallel branch June 5, 2026 20:54
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.

e2e Tier 2 harness can't run ~22 launches in parallel — waitForRunning times out, SSH ControlMaster contention

1 participant