Repository navigation
fix(router): skip TestRouterNotRebuiltOnHostnameChange on Windows, fixes #8644 (#8649) [skip ci] - #8649
Merged
Conversation
|
Download the artifacts for this pull request:
See Testing a PR. |
rfay
marked this pull request as ready for review
August 1, 2026 23:03
#8644 ## The Issue - Fixes #8644 `ddev-windows-mutagen` hung for the full 6h `go test -timeout` in three consecutive runs (6418, 6419, 6421), always inside `TestRouterNotRebuiltOnHostnameChange`, blocked writing a debug log line to stdout. #8644 mitigated the symptom by capping the pipeline's timeout at 4h, attributing the hangs to a Docker Desktop 4.84.0 backend regression on the Windows runner (cross-referencing docker/desktop-feedback#560). The test wraps `app2.Start()`/`app2.Restart()` in `util.CaptureUserOut()`. That helper redirects output to an `os.Pipe()` that isn't drained until `getOutput()` is called - i.e. only after `Start()`/`Restart()` returns. With `DDEV_DEBUG=true` (set for all CI runs), a full `app.Start()` can emit enough debug output to fill that pipe before it returns, deadlocking the write. This is a known, longstanding Windows limitation of `CaptureUserOut()`: `TestDdevLogs` has skipped Windows for the identical reason since 2018. `TestRouterNotRebuiltOnHostnameChange` (added in 6e7e416, merged 2026-07-30) just reintroduced the same hazard without a Windows guard. ## How This PR Solves The Issue - `pkg/ddevapp/router_test.go`: skip `TestRouterNotRebuiltOnHostnameChange` on Windows, following the same pattern (and referencing the same root cause) as the existing `TestDdevLogs` Windows skip. ## Manual Testing Instructions 1. On Windows, run `go test -v -run TestRouterNotRebuiltOnHostnameChange ./pkg/ddevapp/...` and confirm it's skipped rather than hanging. 2. `make staticrequired` passes. ## Automated Testing Overview No new tests added; `TestRouterNotRebuiltOnHostnameChange` is now skipped on Windows where `CaptureUserOut()` remains unsafe around a full `Start()`/`Restart()`. ## Release/Deployment Notes No user-facing behavior change; the skip only affects CI. Co-Authored-By: Claude Sonnet 5 <[email protected]>
rfay
force-pushed
the
20260801_rfay_fix_router_race_windows_hang
branch
from
August 2, 2026 17:26
260f15f to
edf5fcf
Compare
rfay
added a commit
to rfay/ddev
that referenced
this pull request
Aug 2, 2026
…n Windows `TestRouterPortSubstitutionPersistsAcrossProjects` wraps `app2.Start()` in `util.CaptureUserOut()`, the exact pattern ddev#8649 identified as unsafe on Windows: the helper redirects output to an `os.Pipe()` that isn't drained until `getOutput()` is called, so a full `Start()` emitting enough `DDEV_DEBUG` output before returning can deadlock the write. Same root cause as the existing `TestDdevLogs` and `TestRouterNotRebuiltOnHostnameChange` Windows skips; this test needs the identical guard. Co-Authored-By: Claude Fable 5 <[email protected]>
rfay
added a commit
to rfay/ddev
that referenced
this pull request
Aug 8, 2026
…n Windows `TestRouterPortSubstitutionPersistsAcrossProjects` wraps `app2.Start()` in `util.CaptureUserOut()`, the exact pattern ddev#8649 identified as unsafe on Windows: the helper redirects output to an `os.Pipe()` that isn't drained until `getOutput()` is called, so a full `Start()` emitting enough `DDEV_DEBUG` output before returning can deadlock the write. Same root cause as the existing `TestDdevLogs` and `TestRouterNotRebuiltOnHostnameChange` Windows skips; this test needs the identical guard. Co-Authored-By: Claude Fable 5 <[email protected]>
rfay
added a commit
to rfay/ddev
that referenced
this pull request
Aug 11, 2026
…n Windows `TestRouterPortSubstitutionPersistsAcrossProjects` wraps `app2.Start()` in `util.CaptureUserOut()`, the exact pattern ddev#8649 identified as unsafe on Windows: the helper redirects output to an `os.Pipe()` that isn't drained until `getOutput()` is called, so a full `Start()` emitting enough `DDEV_DEBUG` output before returning can deadlock the write. Same root cause as the existing `TestDdevLogs` and `TestRouterNotRebuiltOnHostnameChange` Windows skips; this test needs the identical guard. Co-Authored-By: Claude Fable 5 <[email protected]>
rfay
added a commit
to rfay/ddev
that referenced
this pull request
Aug 13, 2026
…n Windows `TestRouterPortSubstitutionPersistsAcrossProjects` wraps `app2.Start()` in `util.CaptureUserOut()`, the exact pattern ddev#8649 identified as unsafe on Windows: the helper redirects output to an `os.Pipe()` that isn't drained until `getOutput()` is called, so a full `Start()` emitting enough `DDEV_DEBUG` output before returning can deadlock the write. Same root cause as the existing `TestDdevLogs` and `TestRouterNotRebuiltOnHostnameChange` Windows skips; this test needs the identical guard. Co-Authored-By: Claude Fable 5 <[email protected]>
rfay
added a commit
to rfay/ddev
that referenced
this pull request
Aug 13, 2026
…n Windows `TestRouterPortSubstitutionPersistsAcrossProjects` wraps `app2.Start()` in `util.CaptureUserOut()`, the exact pattern ddev#8649 identified as unsafe on Windows: the helper redirects output to an `os.Pipe()` that isn't drained until `getOutput()` is called, so a full `Start()` emitting enough `DDEV_DEBUG` output before returning can deadlock the write. Same root cause as the existing `TestDdevLogs` and `TestRouterNotRebuiltOnHostnameChange` Windows skips; this test needs the identical guard. Co-Authored-By: Claude Fable 5 <[email protected]>
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.
The Issue
ddev-windows-mutagenhung for the full 6hgo test -timeoutin threeconsecutive runs (6418, 6419, 6421), always inside
TestRouterNotRebuiltOnHostnameChange, blocked writing a debug log line tostdout. #8644 mitigated the symptom by capping the pipeline's timeout at 4h,
attributing the hangs to a Docker Desktop 4.84.0 backend regression on the
Windows runner.
The test wraps
app2.Start()/app2.Restart()inutil.CaptureUserOut().That helper redirects output to an
os.Pipe()that isn't drained untilgetOutput()is called - i.e. only afterStart()/Restart()returns. WithDDEV_DEBUG=true(set for all CI runs), a fullapp.Start()can emit enoughdebug output to fill that pipe before it returns, deadlocking the write. This
is a known, longstanding Windows limitation of
CaptureUserOut():TestDdevLogshas skipped Windows for the identical reason since 2018. Thenew test (added in 6e7e416, merged 2026-07-30) just reintroduced the same
hazard without a Windows guard.
How This PR Solves The Issue
pkg/ddevapp/router_test.go: skipTestRouterNotRebuiltOnHostnameChangeon Windows, following the same pattern (and referencing the same root
cause) as the existing
TestDdevLogsWindows skip.Manual Testing Instructions
go test -v -run TestRouterNotRebuiltOnHostnameChange ./pkg/ddevapp/...and confirm it's skipped rather than hanging.
make staticrequiredpasses.Automated Testing Overview
No new tests added;
TestRouterNotRebuiltOnHostnameChangeis now skipped onWindows where
CaptureUserOut()remains unsafe around a fullStart()/Restart().Release/Deployment Notes
No user-facing behavior change; the skip only affects CI.