buildx/commands
Jonathan A. Sternberg e785cc4bf7
progress: ensure bake waits for progress to finish printing on error conditions
Some minor fixes to the printer and how bake invokes it. Bake previously
had a race condition that could result in the display not updating on an
error condition, but it was much rarer because the channel communication
was much closer. The refactor added a proxy for the status channel so
there was more of an opportunity to surface the race condition.

When bake exits with an error when reading the bakefiles, it doesn't
wait for the printer to finish so it is possible for the printer to
update the display after an error is printed. This adds an extra `Wait`
in a defer to make sure the printer is finished.

`Wait` has also been fixed to allow it to be called multiple times and
have the same behavior. Previously, it only waited for the done channel
once so only the first wait would block.

The `onclose` method is now called every time the display is paused or
stopped. That was the previous behavior and it's been restored here.

The display only gets refreshed if we aren't exiting. There's no point
in initializing another display if we're about to exit.

The metric writer attached to the printer was erroneously removed. It is
now assigned properly.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
(cherry picked from commit 7660acf9c7)
2025-06-16 13:45:30 -07:00
..
debug monitor: move remaining controller functionality into monitor 2025-06-04 15:27:24 -05:00
history history: slsa v1 support 2025-06-16 13:44:48 -07:00
imagetools lint: modernize fix 2025-05-13 20:44:57 +02:00
bake.go progress: ensure bake waits for progress to finish printing on error conditions 2025-06-16 13:45:30 -07:00
build.go build: change build handler to evaluate instead of onresult 2025-06-10 11:48:41 -05:00
create.go driver: make buildkitd "config" and "flags" names consistent 2024-02-22 10:26:18 +01:00
dial_stdio.go update golangci-lint to v2.1.5 2025-05-13 16:54:43 +02:00
diskusage.go lint: apply x/tools/modernize fixes 2025-03-07 16:37:24 -08:00
inspect.go update golangci-lint to v2.1.5 2025-05-13 16:54:43 +02:00
install.go lint: gopls fixes 2024-04-24 17:58:17 -07:00
ls.go Merge pull request #3179 from tonistiigi/ls-format-json-current 2025-05-13 14:27:36 -07:00
ls_test.go lint: modernize fix 2025-05-13 20:44:57 +02:00
prune.go commands: update deprecation notice for keep-storage 2025-06-02 09:35:39 -05:00
rm.go Merge pull request #3181 from crazy-max/golangci-lint-v2 2025-05-13 17:17:17 +02:00
root.go controller: remove controller grpc service 2025-04-30 13:46:58 -05:00
stop.go simplify signal handling for cobra context 2024-01-19 17:18:42 -08:00
uninstall.go lint: gopls fixes 2024-04-24 17:58:17 -07:00
use.go lint: enable linters from buildkit 2024-11-19 17:51:24 -08:00
util.go vendor: github.com/docker/docker and github.com/docker/cli v26.0.0 2024-04-01 13:05:55 -05:00
version.go lint: gopls fixes 2024-04-24 17:58:17 -07:00