Skip to content

feat(ddev): browser commands read URLs from ddev describe -j - #50

Merged
steffenmaechtel merged 3 commits into
masterfrom
feature/ddev-launch
Aug 30, 2026
Merged

feat(ddev): browser commands read URLs from ddev describe -j#50
steffenmaechtel merged 3 commits into
masterfrom
feature/ddev-launch

Conversation

@steffenmaechtel

Copy link
Copy Markdown
Owner

Summary

Replaces the DDEV_DEBUG/FULLURL URL transport for ddev browser commands
with the upstream-recommended scripting interface: ddev describe -j
(ddev/ddev#8771).
Our ddev PR #8772 (launch --print-url) becomes obsolete and will be closed
in favor of the existing describe interface.

Why

The old transport ran browser commands as opencode with DDEV_DEBUG=true
and grepped the FULLURL <url> lines the launch script prints under debug.
That coupled the URL extraction to global debug logging — every internal
ddev start on a stopped project arrived as a wall of timestamped debug
output before the URL appeared.

ddev describe -j maintains every URL from the project config — even while
the project is stopped — with no debug logging at all.

What changes

  • ddev-as-opencode.sh — the browser-command arm
    (launch, mailpit, phpmyadmin, adminer, xhgui, conf-registered)
    now computes its URL from ddev describe -j run as opencode:
    • launchraw.primary_url, mirroring the launch script's argument
      forms (path, :<port>, full URL, -m/--mailpit, -p passthrough)
    • mailpitraw.mailpit_https_url (scheme matched to the primary URL)
    • xhguiraw.xhgui_https_url (when xhgui_status is enabled)
    • add-on commands → raw.services.<name>.https_url
  • Launch-script parity kept: a stopped project is started first — now
    plainly, without debug flooding — including the bootstrap and
    hosts-file hints a direct ddev start prints (so the
    opk ddev-hosts-add bridge still shows after ddev phpmyadmin on a
    stopped project)
  • Commands whose URL describe does not carry (built-in phpmyadmin installer
    prompt, custom commands without a matching service) plain-run as
    opencode: output, prompts and exit code pass through; only the browser
    open is skipped
  • JSON parsed with python3 (already a kit prerequisite)
  • sudoers.templateDDEV_DEBUG dropped from env_keep
  • Docsdocs/concepts/ddev-integration.md rewritten for the new
    transport
  • Tests — functional describe→URL mapping cases (17), updated sudoers
    checks, e2e fake ddev implements the describe contract incl. the
    stopped→running start flip and a planted /mnt/c hosts-file fixture
    proving the hint parity

Testing

  • make lint, make check-version
  • make test — full unit suite green
  • make e2e — 243 checks passed (browser arm: URL handover, caller
    identity, start parity, hint parity, plain-run fallback, clean stdout)
  • make e2e-rootless — 42 checks passed

Also bumps VERSION to 0.0.26.

Replaces the DDEV_DEBUG/FULLURL URL transport for the browser-command
class (launch, mailpit, phpmyadmin/adminer add-ons, xhgui) with the
upstream-recommended scripting interface (ddev/ddev#8771): the URL is
read from `ddev describe -j` run as opencode — works for stopped
projects too, no debug-log flooding anymore.

- launch maps to raw.primary_url with the launch script's argument
  forms (path, :<port>, full URL, -m), mailpit/xhgui to their fields,
  add-on commands to raw.services.<name>.https_url
- launch-script parity: a stopped project is started first (plain)
- commands without a describe URL (built-in phpmyadmin installer
  prompt, custom commands without a service) plain-run as opencode
- sudoers env_keep drops DDEV_DEBUG
- unit tests gain functional describe->URL mapping cases; the e2e fake
  ddev implements the describe contract (incl. the stopped->running
  start flip); docs/concepts/ddev-integration.md updated

Closes our ddev PR #8772 in favor of the existing describe interface.
The browser-command arm (launch/mailpit/phpmyadmin/...) starts a
stopped project itself — but the bootstrap and hosts-file hints only
hooked direct `ddev start`/`ddev restart` in the ddev() wrapper, so
`ddev phpmyadmin` on a stopped project never showed the
"opk ddev-hosts-add" bridge for custom-tld domains.

Run _opk_bootstrap_hint before and _opk_hosts_hint after the arm's
internal start, exactly like a direct start. e2e plants a /mnt/c hosts
file + custom-tld fixture to prove the hint fires.

@steffenmaechtel steffenmaechtel left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Reviewed

@steffenmaechtel
steffenmaechtel merged commit 1a720a8 into master Aug 30, 2026
3 checks passed
@steffenmaechtel
steffenmaechtel deleted the feature/ddev-launch branch August 30, 2026 17:45
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.

1 participant