feat: use docker-compose library, optionally download docker-buildx, fixes #7915, for #8295 - #8234
Conversation
|
Download the artifacts for this pull request:
See Testing a PR. |
5c26179 to
25b59e4
Compare
25b59e4 to
dc7e9aa
Compare
dc7e9aa to
aa23000
Compare
|
Rebased, trivial merge conflict. |
This comment was marked as outdated.
This comment was marked as outdated.
67f6a57 to
cfd2454
Compare
360c0ec to
e33b31d
Compare
bc5efef to
0beedc7
Compare
0beedc7 to
d5baad2
Compare
|
About the new private Reason: all IDEs run Docker containers in one way or another, and they won't see our privately stored I'm also a bit worried that when you run Docker Desktop, buildx shows a version like We also don't see reports of issues with the |
1c01bee to
61070f2
Compare
And I know I'm late to the party on |
|
Wow, it just all seems so fast and so smooth. All the manual testing is just lovely. Is it really as much faster and smoother as it seems? New |
In my opinion, showing a spinner and a stopwatch for all |
rfay
left a comment
There was a problem hiding this comment.
It sure seems beautiful and smooth. It should go in when you're ready, and of course there will always be more details that can be handled in followups. I looked through the diffs and saw no red flags, but of course that doesn't mean much. I did the manual testing and it was lovely.
ddev config global --docker-buildx-version=0.16.0 is possible, which is odd, but an offbeat thing to do and not worth protecting against. But it's a quick way to see the failure when buildx version constraint not met.
|
Don't forget to queue up an update to the buildx blog, https://ddev.com/blog/docker-buildx-requirement-v1-25-1/ |
Post-start hook hangs (often minutes) on
|
pkg/tui import |
Hook elapsed |
|---|---|
| present | 5.43s (this run; usually much longer) |
| removed | 0.45s |
Possible fixes
- A. Set
TERM=dumbon the hook subprocess viacmd.EnvinExecHostTask.Execute(). termenv skips the OSC probe fordumb/screen/tmux(termenv_unix.go:237-240). ~10-line fix, but the script seesTERM=dumb. - B. Stop importing
pkg/tuifrom the always-loaded path — launch the TUI as a separateddev tuiprocess or behind an interface shim. The architectural fix. - C. Upgrade bubbletea to v2 (the probe is gone there). Big vendor diff.
Recommendation: ship A now, file an issue for B.
Side note: when a hung child is killed, the TTY is left in ICANON=false ECHO=false — termenv's deferred raw-mode restore doesn't run on signal. Worth fixing separately.
|
I wonder if upgrading to 2.0 of bubbletea would affect this. |
I'm going to update it to v2 since it should be the fastest option. I don't want to add Edit: it's resolved, bubbletea v2 doesn't have this problem. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cb2b171 to
8085dd3
Compare
|
So far, so good. Rebased and waiting for tests. |
rfay
left a comment
There was a problem hiding this comment.
Awesome and amazing, it will be great to get it in. Pull when you're happy. Or tell me to if you go to bed waiting for tests.
#8431) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
The Issue
ddev powerofftakes longer than it should, seems to hang after each project is stopped #8295Related:
How This PR Solves The Issue
We added a requirement for
docker-buildxin #8149. Docker Compose has required this since v2.40.2, but the requirement was only triggered when installing extra packages or using EOL PHP versions like 7.4.This PR replaces the bundled
docker-composebinary with the Docker Compose SDK and adds optional download ofdocker-buildxto$HOME/.ddev/bin.Docker Compose (SDK)
docker-composebinary to the Docker Compose Go librarycliPluginsExtraDirsis set to$HOME/.ddev/binindocker_manager.goso plugins stored there are found automatically (this only works with the SDK, not the standalone binary)docker-compose pullinddev start- the concurrent output was corrupted on first run when no Docker images were present, caused by the performance optimizations in perf: combined startup time optimizations, for #8096 #8145Docker Buildx (optional download)
docker-buildx(avoids overriding Docker Desktop's patched builds and keeps IDE compatibility)--docker-buildx-versionflag toddev config globalto optionally download a specific buildx version to$HOME/.ddev/bin/docker-buildxddev config global --docker-buildx-version=or--docker-buildx-version=systemresets to the system buildxroot.go; buildx is now checked/downloaded only inddev start,ddev version,ddev utility rebuild, andddev utility dockercheckddev utility dockercheckshows a warning when a specific buildx version is configured (useful for support requests)Other changes
ddev versionnow works when Docker is completely broken - shows all version details, reports the Docker error at the endddev confignow works without a working Docker (allows configuring a project or setting--docker-buildx-versioninddev config global)ddev poweroffoutput is significantly improved - previously showed no output while waiting, reported inddev powerofftakes longer than it should, seems to hang after each project is stopped #8295ddev utility dockerchecknow usesdockerutil.RunCLIPluginCommandinstead of callingdocker buildxdirectlyManual Testing Instructions
Buildx:
Compose:
Compare with DDEV HEAD, use
--no-cachedue to #8145 output differences):Compare
ddev poweroffoutput on DDEV HEAD vs this PR - output should now show progress instead of silence.Run Craft CMS quickstart https://docs.ddev.com/en/stable/users/quickstart/#craft-cms, it should show the usual output for
composer installand ask interactive questions, see the comment below why this is important.Automated Testing Overview
pkg/dockerutil/docker_buildx.gowith tests indocker_buildx_test.gopkg/dockerutil/docker_compose_internal_test.gofor internal compose logicdocker_compose_test.goanddocker_manager_test.gostdin_dup.go/stdin_dup_windows.gowith tests (stdin duplication for SDK integration)Release/Deployment Notes
docker-composeis no longer downloaded to$HOME/.ddev/bin- existing binaries there are ignored (I didn't add any cleanup for$HOME/.ddev/bin/docker-compose)docker-buildx-versionin~/.ddev/global_config.yamlddev start,ddev version,ddev utility rebuild,ddev utility dockercheck