compose/cmd/compose
Guillaume Lours 89e818966a fix(stats): bound the sampling and keep going when a container fails
Sampling a container takes about a second on the daemon side, and one
goroutine was started per container on every refresh: with all the
projects of a busy host that is hundreds of concurrent calls. Bound
them to 32.

A container that cannot be sampled is now shown without usage, like a
stopped one, instead of aborting the refresh of all the others. An
interrupted command is still reported as such, not rendered as
containers without usage.

Point containerUsage to the docker/cli helpers it follows, and cover
the --no-stream path of runStatsProjects.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
2026-10-15 06:41:29 +02:00
..
alpha.go chore: remove duplicate 'publish' registration under 'alpha' 2026-09-30 14:47:12 +02:00
attach.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
backend.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
bridge.go fix(bridge): reject --dry-run on bridge commands 2026-10-08 16:49:40 +02:00
bridge_test.go fix(bridge): reject --dry-run on bridge commands 2026-10-08 16:49:40 +02:00
build.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
build_test.go fix(build): hand unresolved 'auto' progress mode to bake 2026-09-07 14:11:12 +02:00
commit.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
completion.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
compose.go refactor(api): split Compose into focused interfaces 2026-10-12 12:03:29 +02:00
compose_oci_test.go Fix invalid path error when using OCI artifacts on Windows 2026-02-09 09:15:37 +01:00
compose_progress_test.go refactor(display): rebuild the TTY progress renderer on a model/layout/screen split 2026-09-09 16:50:05 +02:00
compose_test.go fix(compose): move the job-target refusal into projectOrName itself 2026-09-21 16:35:20 +02:00
config.go refactor(api): split Compose into focused interfaces 2026-10-12 12:03:29 +02:00
config_test.go test(cmd/compose): update TestResolveImageDigests for compose-go#929 2026-09-21 18:01:16 +02:00
cp.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
create.go fix(create, start): clear error when targeting a job by name 2026-09-21 16:35:20 +02:00
down.go api: DownOptions.Images becomes a typed ImagePruneMode, validated upfront 2026-10-06 11:31:22 +02:00
events.go fix(events): validate service names before subscribing to events 2026-08-18 10:48:59 +02:00
exec.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
export.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
generate.go golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
hooks.go feat: pre-filter Desktop Logs view by Compose project 2026-05-18 17:28:03 +02:00
hooks_test.go feat: pre-filter Desktop Logs view by Compose project 2026-05-18 17:28:03 +02:00
images.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
kill.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
list.go chore: inline needless single-use helpers 2026-08-14 22:49:53 +02:00
logs.go docs: compose logs: add more links for flag descriptions 2026-06-10 09:36:31 +02:00
options.go cmd/prompt: remove uses of github.com/AlecAivazis/survey/v2 2026-09-11 15:30:07 +02:00
options_test.go build(deps): adopt compose-go jobs and the container-spec layering 2026-09-21 16:35:20 +02:00
pause.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
port.go fix(port): preserve tie order for dual-stack port publishers 2026-09-14 10:48:03 +02:00
ps.go fix(ps): honor psFormat from Docker CLI config when no --format flag given 2026-08-20 14:05:34 +02:00
publish.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
pull.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
pullOptions_test.go build(deps): adopt compose-go jobs and the container-spec layering 2026-09-21 16:35:20 +02:00
push.go feat(push): add --ignore-missing to skip images not available locally 2026-10-14 21:34:38 +02:00
remove.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
restart.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
run.go feat(run): --no-recreate reuses existing dependencies as-is 2026-10-14 09:34:19 +02:00
run_test.go fix(run): correlate jobTargetErr against the specific failing name 2026-09-21 16:35:20 +02:00
scale.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
start.go fix(compose): move the job-target refusal into projectOrName itself 2026-09-21 16:35:20 +02:00
stats.go feat(stats): add --all-projects and --aggregate flags 2026-10-15 06:41:29 +02:00
stats_projects.go fix(stats): bound the sampling and keep going when a container fails 2026-10-15 06:41:29 +02:00
stats_projects_test.go fix(stats): bound the sampling and keep going when a container fails 2026-10-15 06:41:29 +02:00
stop.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
top.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
top_test.go fix mixed assertion libraries in tests 2026-03-31 17:32:51 +02:00
unsupported_attributes.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
unsupported_attributes_test.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
up.go run: execute jobs exactly like services 2026-09-21 16:35:20 +02:00
up_test.go run: execute jobs exactly like services 2026-09-21 16:35:20 +02:00
version.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
version_test.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
viz.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
viz_test.go fix mixed assertion libraries in tests 2026-03-31 17:32:51 +02:00
volumes.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
wait.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
watch.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00