Skip to content

fix: keep DDEV_DEBUG output readable by quieting compose progress and router port messages - #8953

Merged
rfay merged 6 commits into
ddev:mainfrom
rfay:20261015_rfay_quiet_pull
Oct 21, 2026
Merged

rfay merged 6 commits into
ddev:mainfrom
rfay:20261015_rfay_quiet_pull

Conversation

@rfay

@rfay rfay commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

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=true switched 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. Routine GetAvailableRouterPort() messages added more noise on every start.

How This PR Solves The Issue

  • 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. It skips Stopped for a container the same operation removed, because compose down stops containers again after ddev stop already stopped them.
  • The three routine GetAvailableRouterPort() messages move from DDEV_DEBUG to DDEV_VERBOSE. The error and port-substitution messages stay at DDEV_DEBUG.
  • Other routine start and delete messages, such as Traefik labels per service, ContainersWait status changes, lock acquisition, volume creation, and cert copies, also move to DDEV_VERBOSE. ContainersWait "still waiting", lock release timing, and host.docker.internal stay at DDEV_DEBUG because they point at problems, and the docs tell users to check host.docker.internal that way.
  • With DDEV_NONINTERACTIVE, ddev start prints the custom configuration warning only with DDEV_VERBOSE, and warns about the hosts file only for a hostname that doesn't resolve, instead of on every start.
  • The snapshot timeout notice is now one line.

Manual Testing Instructions

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_NONINTERACTIVE=true DDEV_DEBUG=true ddev start 2>&1 | cat
# Expect "Image Pulled: postgres:17" with no layer lines,
# "Container Started: ddev-quietpull-web, ddev-quietpull-db",
# no GetAvailableRouterPort(), ContainersWait status, or HTTP_EXPOSE lines,
# and no "Custom configuration detected" warning
DDEV_DEBUG=true ddev stop 2>&1 | cat
# Expect one "Container Stopped: ..." line, then "Container Removed: ...", with no "Stopping" lines
DDEV_VERBOSE=true ddev restart 2>&1 | cat
# Expect the full per-resource progress again

Automated Testing Overview

TestQuietEventProcessorSuppressesSubEvents is updated for the consolidated format, and the new TestQuietEventProcessorConsolidates covers grouping and multiple final states for one resource.

Release/Deployment Notes

Anyone who used DDEV_DEBUG to see per-layer pull progress in non-interactive output now needs DDEV_VERBOSE. The same goes for the routine start and delete messages listed above.

🤖 Generated with Claude Code

@rfay
rfay requested a review from a team as a code owner October 15, 2026 13:48
@rfay
rfay force-pushed the 20261015_rfay_quiet_pull branch from b0e9224 to bc82e52 Compare October 15, 2026 13:49
@rfay rfay changed the title fix: keep DDEV_DEBUG output readable by quieting compose progress and router port messages [skip buildkite] fix: keep DDEV_DEBUG output readable by quieting compose progress and router port messages Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Download this PR's build for your OS and architecture with:

ddev utility download-ddev --pr 8953

Or download the artifact for your OS and architecture directly:

See Testing a PR.

Open in GitHub Codespaces

@rfay
rfay force-pushed the 20261015_rfay_quiet_pull branch from 229ae6f to eafac4f Compare October 15, 2026 23:38

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. containers.go:309: ContainerWait (singular) got the new "Status changes are routine (DDEV_VERBOSE)" comment, but its status-change line is still util.Debug. Either switch it to util.Verbose or keep the old comment.
  2. docs/content/users/usage/database-management.md:113 and docs/content/users/extend/customizing-images.md:339 still quote the old "With a large database this may take a long time." message.

To consider:

  1. 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. Would util.Verbose in the noninteractive case work instead, matching the other moves in this PR?
  2. In AddHostsEntriesIfNeeded(), the noise came from the IsInteractive() check running before the loop decides whether any hostname needs adding, so it fired even for resolvable *.ddev.site names. Moving the check into the loop just before ElevateToAddHostEntry() and keeping it a Warning would 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

@rfay
rfay force-pushed the 20261015_rfay_quiet_pull branch from eafac4f to 0c0e0e0 Compare October 18, 2026 14:31
@rfay
rfay requested a review from a team as a code owner October 18, 2026 14:31
@rfay

rfay commented Oct 18, 2026

Copy link
Copy Markdown
Member Author

Good suggestions, thanks. All implemented.

@rfay
rfay requested a review from stasadev October 20, 2026 14:07

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

One small thing in the test below.

rfay and others added 6 commits October 20, 2026 18:05
… 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]>
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]>
@rfay
rfay force-pushed the 20261015_rfay_quiet_pull branch from eeeff68 to e460c9e Compare October 21, 2026 00:32
@rfay
rfay merged commit eea391d into ddev:main Oct 21, 2026
47 checks passed
@rfay
rfay deleted the 20261015_rfay_quiet_pull branch October 21, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants