Repository navigation
fix: keep DDEV_DEBUG output readable by quieting compose progress and router port messages - #8953
Conversation
b0e9224 to
bc82e52
Compare
|
Download this PR's build for your OS and architecture with: ddev utility download-ddev --pr 8953Or download the artifact for your OS and architecture directly:
See Testing a PR. |
229ae6f to
eafac4f
Compare
stasadev
left a comment
There was a problem hiding this comment.
Looks good overall. Claude Code built the branch and ran DDEV_NONINTERACTIVE=true DDEV_DEBUG=true ddev start and ddev stop, and the consolidated Container Started: ... output reads well. Checking compose's Run() confirms Done() is always called, so pending lines can't be lost.
Should fix:
- containers.go:309:
ContainerWait(singular) got the new "Status changes are routine (DDEV_VERBOSE)" comment, but its status-change line is stillutil.Debug. Either switch it toutil.Verboseor keep the old comment. docs/content/users/usage/database-management.md:113anddocs/content/users/extend/customizing-images.md:339still quote the old "With a large database this may take a long time." message.
To consider:
- The custom configuration warning now disappears entirely under
DDEV_NONINTERACTIVE, which users also set outside CI, and in a failing CI run it's often the useful clue. Wouldutil.Verbosein the noninteractive case work instead, matching the other moves in this PR? - In
AddHostsEntriesIfNeeded(), the noise came from theIsInteractive()check running before the loop decides whether any hostname needs adding, so it fired even for resolvable*.ddev.sitenames. Moving the check into the loop just beforeElevateToAddHostEntry()and keeping it aWarningwould drop the noise while still telling a user why a custom hostname doesn't resolve.
Minor: ddev stop prints Container Stopped: ... twice, once from the stop and once from the down, which is pre-existing but easier to see now.
🤖 Developed with assistance from Claude Code
eafac4f to
0c0e0e0
Compare
|
Good suggestions, thanks. All implemented. |
stasadev
left a comment
There was a problem hiding this comment.
Looks good to me.
One small thing in the test below.
… router port messages [skip buildkite] CI logs, which always run with `DDEV_DEBUG=true`, no longer show every image layer download tick, and compose results like "Container Stopped" now print as one line per kind instead of one line per container per state. `DDEV_DEBUG=true` switched compose to its plain progress display, which prints every layer's download and extract progress, so a single test log reached about 50,000 lines and the real error was buried. Routine `GetAvailableRouterPort()` messages added more noise on every start. - Per-layer compose progress without a terminal now needs `DDEV_VERBOSE`, so `DDEV_DEBUG` uses the existing quiet event processor. - The quiet processor prints errors and warnings at once, and collects finished resources into one line per kind and status when each compose operation ends, for example `Container Stopped: ddev-p-web, ddev-p-db`. It also no longer hides a container's `Started` line after its `Created` line. - The three routine `GetAvailableRouterPort()` messages move from `DDEV_DEBUG` to `DDEV_VERBOSE`. The error and port-substitution messages stay at `DDEV_DEBUG`. ```bash ddev utility download-ddev --pr 8953 export PATH="$HOME/tmp/ddev-download-ddev/pr-8953:$PATH" mkdir ~/tmp/quietpull && cd ~/tmp/quietpull ddev config --project-type=php --database=postgres:17 docker rmi postgres:17 DDEV_DEBUG=true ddev start 2>&1 | cat DDEV_DEBUG=true ddev stop 2>&1 | cat DDEV_VERBOSE=true ddev restart 2>&1 | cat ``` `TestQuietEventProcessorSuppressesSubEvents` is updated for the consolidated format, and the new `TestQuietEventProcessorConsolidates` covers grouping and multiple final states for one resource. Anyone who used `DDEV_DEBUG` to see per-layer pull progress in non-interactive output now needs `DDEV_VERBOSE`. 🤖 Developed with assistance from [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…CI-only warnings TestDdevAllDatabases produced about 10,600 log lines in CI, and most were DDEV_DEBUG messages repeated on every one of its 136 starts. Routine per-start and per-delete messages such as Traefik labels per service, ContainersWait status changes, lock acquisition, volume creation, and cert copies now need DDEV_VERBOSE. Messages that point at a problem stay at DDEV_DEBUG: ContainersWait "still waiting", lock release timing, and host.docker.internal, which the step-debugging docs tell users to check. With DDEV_NONINTERACTIVE, `ddev start` no longer prints the custom configuration warning, and the hosts-file skip notice moves to DDEV_VERBOSE, since nobody reads either one in CI. `ddev utility check-custom-config` still reports custom configuration. "ddev-router already running" moves to DDEV_DEBUG, and the three-line snapshot timeout notice becomes one line. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`ddev start` no longer prints the custom configuration warning under DDEV_NONINTERACTIVE, which CI sets, so the test now checks the result of CheckCustomConfig() after start instead of the start output. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- `ContainerWait` status changes move to DDEV_VERBOSE like `ContainersWait`. - Under DDEV_NONINTERACTIVE, `ddev start` prints the custom configuration warning with DDEV_VERBOSE instead of dropping it, because people set DDEV_NONINTERACTIVE outside CI too. - The DDEV_NONINTERACTIVE hosts-file check now runs only for a hostname that needs a hosts entry and stays a warning, so it explains why a custom hostname doesn't resolve without firing for `*.ddev.site`. - Compose down stops containers that `ddev stop` already stopped, so the quiet event processor no longer prints "Stopped" for a resource the same operation also removed. - Docs quote the new one-line seed timeout notice. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: Stanislav Zhuk <[email protected]>
Since the start timing change, "ddev-router already running, pushing new config" is a StartWaitSince() line in normal output, which appends its own "...", so the extra dots from the rebase printed six. The router tests check for that line again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
eeeff68 to
e460c9e
Compare
Short Summary (TL;DR)
CI logs, which always run with
DDEV_DEBUG=true, no longer show every image layer download tick or routine per-start debug messages, and compose results like "Container Stopped" now print as one line per kind instead of one line per container per state.The Issue
DDEV_DEBUG=trueswitched compose to its plain progress display, which prints every layer's download and extract progress. In this failed all-project-types-cmd job the log reached about 50,000 lines, so the actual cause, a transient 404 from archive.debian.org during the postgres:9-11 image builds, was hard to find. RoutineGetAvailableRouterPort()messages added more noise on every start.How This PR Solves The Issue
DDEV_VERBOSE, soDDEV_DEBUGuses the existing quiet event processor.Container Stopped: ddev-p-web, ddev-p-db. It also no longer hides a container'sStartedline after itsCreatedline. It skipsStoppedfor a container the same operation removed, because compose down stops containers again afterddev stopalready stopped them.GetAvailableRouterPort()messages move fromDDEV_DEBUGtoDDEV_VERBOSE. The error and port-substitution messages stay atDDEV_DEBUG.DDEV_VERBOSE. ContainersWait "still waiting", lock release timing, andhost.docker.internalstay atDDEV_DEBUGbecause they point at problems, and the docs tell users to checkhost.docker.internalthat way.DDEV_NONINTERACTIVE,ddev startprints the custom configuration warning only withDDEV_VERBOSE, and warns about the hosts file only for a hostname that doesn't resolve, instead of on every start.Manual Testing Instructions
Automated Testing Overview
TestQuietEventProcessorSuppressesSubEventsis updated for the consolidated format, and the newTestQuietEventProcessorConsolidatescovers grouping and multiple final states for one resource.Release/Deployment Notes
Anyone who used
DDEV_DEBUGto see per-layer pull progress in non-interactive output now needsDDEV_VERBOSE. The same goes for the routine start and delete messages listed above.🤖 Generated with Claude Code