Commit graph

6415 commits

Author SHA1 Message Date
Nicolas De Loof
2a7b5db6fe test(up): report the hook write error from the test goroutine
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-04 12:36:11 +01:00
Nicolas De Loof
e4640feba3 test(up): close the late-starter race and the pipe in the test harness
Close the started channel before the start event is emitted, so that a late
starter stopped in reaction to it always finds the container started, and
close both ends of the pipe the hook logs test hands to the session.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-04 12:36:11 +01:00
Nicolas De Loof
d3ac4164da test(restart): lock the dependency wait and the timeout unit
Pin that restart waits for a restart:true dependency to hold its condition
again before restarting its dependent, and that its timeout reaches the
daemon in whole seconds.

Part of #14081.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-04 12:36:11 +01:00
Nicolas De Loof
de79d41519 test(up): lock what an interactive and a detached up leave to the plan
Extend the interactive-up daemon fake and pin the behaviors mutation checks
of the interactive-up switchover found unlocked: the monitor's Services
scope, a Start-phase error while terminated, the cleanup when attaching
fails, signal handling starting only after the Create phase, late starters
stopped after the teardown sweep, hook logs reaching the session, the wait
timeout translation, --exit-code-from and the Running events. Add the
wiring of detached up (with its --wait verification), scale, the rebuild of
watch and the dependencies of run onto the plan.

Part of #14081.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-04 12:36:11 +01:00
Nicolas De Loof
129768d3ae test(executor): lock the start-phase executor's guarantees
Pin that every ContainerStart holds startMx, that the start, pre_start,
post_start and hook-runner nodes do nothing once the context is canceled,
that a failure relays untouched down a replica's chain, that the node
bookkeeping records cancellations as failures, that the phase returns the
originating error, that an invalid plan is refused, that a concurrency cap
cannot deadlock the node goroutines, that Starting is reported when the
container starts (not during pre_start), that the hook runner targets the
lowest-numbered replica, and that stop timeouts reach the daemon in whole
seconds.

Part of #14081.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-04 12:36:11 +01:00
Nicolas De Loof
2b7c826bfd test(wait): lock the depends_on gate, health statuses and wait events
Pin which dependencies are worth a wait (shouldWaitForDependency), how each
container state reads for service_healthy and
service_completed_successfully (required and optional, dry-run), the
Waiting/Healthy rows of a wait outside a plan, and that the end of a wait's
context wins over a ready tick. Add the plan shapes for a wait following its
dependency's start, a project of scale: 0 services, and the Start phase
covering every service of the project (the current behavior of scale, whose
change would be a decision of its own).

Part of #14081.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-04 12:36:11 +01:00
Nicolas De Loof
c72ec92640 test(start): lock compose start's --wait, project rebuild and replica order
Pin what compose start does around its plan: the --wait verification (ready
or not, timeout message, one-shot services satisfied by their completion),
the project rebuilt from the project's non-one-off containers when no
compose file is given, only the selected services started, and the replicas
started in numeric order.

Part of #14081.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-04 12:36:11 +01:00
Nicolas De Loof
c06bf9e82a test(monitor): lock which containers the monitor follows
The monitor ends with the application it follows: pin that its initial
listing and its event subscription are scoped to the project's own
containers (no one-offs, no hook runners without a config hash), and that a
provider's relay, which never terminates, is not waited for, whether it is
there at the start or created later.

Part of #14081.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-04 12:36:11 +01:00
Nicolas De Loof
d36b80e00b refactor(compose): move logs and attach to internal/logstream
Some checks are pending
ci / validate (lint) (push) Waiting to run
ci / validate (relay-lint) (push) Waiting to run
ci / validate (relay-test) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / validate (validate-mocks) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / relay-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable, graphdriver) (push) Waiting to run
ci / e2e (standalone, oldstable, graphdriver) (push) Waiting to run
ci / e2e (plugin, stable, containerd) (push) Waiting to run
ci / e2e (plugin, stable, graphdriver) (push) Waiting to run
ci / e2e (standalone, stable, containerd) (push) Waiting to run
ci / e2e (standalone, stable, graphdriver) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / ci-ok (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / relay-image (push) Waiting to run
merge / module-image (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
zizmor / zizmor (push) Waiting to run
logs, attach, the container event monitor they follow and the log
printer move to internal/logstream. The package declares what it needs
from the engine as a small Backend interface; composeService implements
it and keeps one-line forwarders, so `up` and the other callers are
unchanged. Behavior is unchanged: the tests that exercise the moved code
keep their assertions.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-04 09:40:04 +01:00
dependabot[bot]
91316c8e42 build(deps): bump google.golang.org/grpc from 1.84.0 to 1.85.0
Some checks are pending
ci / validate (lint) (push) Waiting to run
ci / validate (relay-lint) (push) Waiting to run
ci / validate (relay-test) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / validate (validate-mocks) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / relay-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable, graphdriver) (push) Waiting to run
ci / e2e (standalone, oldstable, graphdriver) (push) Waiting to run
ci / e2e (plugin, stable, containerd) (push) Waiting to run
ci / e2e (plugin, stable, graphdriver) (push) Waiting to run
ci / e2e (standalone, stable, containerd) (push) Waiting to run
ci / e2e (standalone, stable, graphdriver) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / ci-ok (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / relay-image (push) Waiting to run
merge / module-image (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
zizmor / zizmor (push) Waiting to run
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.84.0 to 1.85.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.84.0...v1.85.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.85.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-03 17:02:48 +01:00
Nicolas De Loof
cc5c4ef50f test(e2e): migrate start/stop legacy tests to scenarios
TestStartAlreadyRunning, TestStopAlreadyStopped, TestStartStopMultipleServices
and TestStartStopMultipleFiles now state their intent and observe container
state (running/exited, not recreated) instead of matching progress lines.
The shared fixtures/start-stop had no other user and is removed.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-03 15:01:50 +01:00
Nicolas De Loof
3b2f42df17 test(e2e): migrate TestUnusedMissingEnvFile to a scenario
State what the test locks (a missing env_file only breaks the commands that
need the service referencing it) as a sequence of steps, and observe the
containers (running, scaled, not created) rather than only exit codes.
Completion is covered in both plugin and standalone modes through CompleteCmd.
The fixtures/env_file directory had no other user and is removed.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-03 15:01:50 +01:00
Nicolas De Loof
813238a7c7 test(e2e): migrate TestEventsUnknownService to a scenario
Express the intent (events refuses a service outside the project) with the
Scenario DSL; the project now lives in testdata/TestEventsUnknownService.
The shared fixtures/simple-composefile is still used by another test.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-03 15:01:50 +01:00
Nicolas De Loof
783cd10211 test(e2e): add CompleteCmd action to scenarios
Shell completion is reached through a different entry point in plugin mode
(docker __complete compose) and in standalone mode (docker-compose
__complete). Expose it as an action so that scenarios can cover completion
in both modes, as the legacy tests did by hand.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-03 15:01:50 +01:00
Nicolas De Loof
79bd3ca73e test(e2e): add StdoutEmpty check
A command that is a no-op (e.g. start on an already running service) must
stay silent on stdout. The legacy tests asserted it by hand; expose it as a
generic observable of the scenario vocabulary.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-03 15:01:50 +01:00
Zhuoming Wang
ac8b2cd44e test(events): use t.Context() in stream error tests
forbidigo rejects context.Background() in tests; t.Context() is the
intended replacement and carries the test's cancellation.

Signed-off-by: Zhuoming Wang <zhuomingwang0901@outlook.com>
2026-11-03 14:25:45 +01:00
Zhuoming Wang
a74e89a7cc fix(events): treat io.EOF as a normal end of a bounded stream
The Engine client sends io.EOF over EventsResult.Err once the stream has
been read completely, which is what happens when `events --until` reaches
its deadline. Service.Events returned that error verbatim, so the command
printed "EOF" and exited 1 even though every event had been delivered.

Return nil for io.EOF and keep propagating real stream errors.

Signed-off-by: Zhuoming Wang <zhuomingwang0901@outlook.com>
2026-11-03 14:25:45 +01:00
Nicolas De Loof
5bceecf985 fix(use_api_socket): give each service its own credentials file mode
Some checks are pending
ci / validate (lint) (push) Waiting to run
ci / validate (relay-lint) (push) Waiting to run
ci / validate (relay-test) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / validate (validate-mocks) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / relay-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable, graphdriver) (push) Waiting to run
ci / e2e (standalone, oldstable, graphdriver) (push) Waiting to run
ci / e2e (plugin, stable, containerd) (push) Waiting to run
ci / e2e (plugin, stable, graphdriver) (push) Waiting to run
ci / e2e (standalone, stable, containerd) (push) Waiting to run
ci / e2e (standalone, stable, graphdriver) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / ci-ok (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / relay-image (push) Waiting to run
merge / module-image (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
zizmor / zizmor (push) Waiting to run
The mode of the injected config file was declared once for the whole
project, so every service that received the credentials held a pointer to
the same value, and changing it for one would have changed it for all of
them. Nothing does that today, but the sharing is easy to trip on.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-02 15:41:36 +01:00
Nicolas De Loof
82d8bcb288 fix(use_api_socket): hand the registry credentials over like docker run does
Align the credentials use_api_socket gives a service with what
`docker run --use-api-socket` does in the Docker CLI:

- the config file is created with mode 0600 instead of the 0444 default
  of a config file, so that only the container's root reads it;
- a service which sets DOCKER_CONFIG itself gets the socket but no
  credentials, as the comment of the function always said;
- nothing is injected, and DOCKER_CONFIG is not set, when the host has no
  registry credentials, and they are not looked up when no service is to
  get them.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-02 15:41:36 +01:00
Nicolas De loof
57751f3996
Merge pull request #14425 from ahbaqdadi/codex/fix-watch-bind-path
Some checks failed
ci / validate (lint) (push) Has been cancelled
ci / validate (relay-lint) (push) Has been cancelled
ci / validate (relay-test) (push) Has been cancelled
ci / validate (validate-docs) (push) Has been cancelled
ci / validate (validate-go-mod) (push) Has been cancelled
ci / validate (validate-headers) (push) Has been cancelled
ci / validate (validate-mocks) (push) Has been cancelled
ci / binary (push) Has been cancelled
ci / bin-image-test (push) Has been cancelled
ci / relay-image-test (push) Has been cancelled
ci / test (push) Has been cancelled
ci / e2e (plugin, oldstable, graphdriver) (push) Has been cancelled
ci / e2e (standalone, oldstable, graphdriver) (push) Has been cancelled
ci / e2e (plugin, stable, containerd) (push) Has been cancelled
ci / e2e (plugin, stable, graphdriver) (push) Has been cancelled
ci / e2e (standalone, stable, containerd) (push) Has been cancelled
ci / e2e (standalone, stable, graphdriver) (push) Has been cancelled
merge / bin-image-prepare (push) Has been cancelled
merge / relay-image (push) Has been cancelled
merge / module-image (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
zizmor / zizmor (push) Has been cancelled
ci / binary-finalize (push) Has been cancelled
ci / coverage (push) Has been cancelled
ci / ci-ok (push) Has been cancelled
ci / release (push) Has been cancelled
merge / bin-image (push) Has been cancelled
fix(watch): recognize bind-mounted paths starting with two dots
2026-10-30 10:06:46 +01:00
Amir Baqdadi
5b925a78e0 fix(watch): recognize bind-mounted paths starting with two dots
Signed-off-by: Amir Baqdadi <ahbaqdadi@gmail.com>
2026-10-29 14:17:40 +01:00
Nicolas De Loof
ed976f1cd4 build(lint): enable the dupl linter
Some checks are pending
ci / validate (lint) (push) Waiting to run
ci / validate (relay-lint) (push) Waiting to run
ci / validate (relay-test) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / validate (validate-mocks) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / relay-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable, graphdriver) (push) Waiting to run
ci / e2e (standalone, oldstable, graphdriver) (push) Waiting to run
ci / e2e (plugin, stable, containerd) (push) Waiting to run
ci / e2e (plugin, stable, graphdriver) (push) Waiting to run
ci / e2e (standalone, stable, containerd) (push) Waiting to run
ci / e2e (standalone, stable, graphdriver) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / ci-ok (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / relay-image (push) Waiting to run
merge / module-image (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
zizmor / zizmor (push) Waiting to run
dupl reports blocks of syntax that are the same up to a renaming of identifiers and literals, which is the kind of copy this series removed; it does not see semantic equivalents such as reordered operands, which stay a matter for review. The threshold is 80 tokens; tests and the e2e DSL are excluded, and the few remaining pairs (declarative cobra commands, mirrored event and lookup functions) carry a targeted nolint with the reason.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
7e83d8015d refactor(oci): build the compose and env file layer descriptors from one helper
DescriptorForComposeFile and DescriptorForEnvFile only differed by their media type and annotation key.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
38cf61fcda refactor(compose): load the project of the config subcommands in one place
Eight config subcommands created a Compose service and loaded the project with the same four lines. Move them to a helper of configOptions.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
16b59a1348 refactor(compose): share the --y flag normalization of create and up
create and up each carried the same normalization function mapping the mistaken --y spelling to --yes.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
a7c1d94f15 refactor(compose): keep the depends_on label codec in one place
The service depends_on was written to a container label in create.go and read back in compose.go, each side knowing the other's format only by convention. Put the encoder and decoder side by side, with a round-trip test; the label content is unchanged.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
cc04eb384f refactor(compose): convert blkio throttle devices with one helper
The four throttle device lists of the blkio configuration were converted by four identical loops.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
ee84ed3549 refactor(compose): run a plan scope through one helper
create and createAndStart prepared, announced and executed their plan identically, differing only by scope.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
ef67b3599e refactor(compose): gate the down operations on the limiter in one place
The volume, network and relay link network removals of down each spelled out the same acquire/release of the shared limiter. Wrap them with a helper built on internal/concurrency.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
76241905dc refactor(formatter): open the Desktop links through one helper
The four menu shortcuts that open a Docker Desktop view repeated the same background span, open and error reporting. Only the link and the error wording differ.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
450cdb28ee refactor(transform): load the service node once for the yaml replacements
ReplaceExtendsFile and ReplaceEnvFile started with the same parsing and lookup of the service node. Move it to a helper.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
cb05b553d5 refactor(desktop): fetch the Desktop API answers with one generic helper
Ping and FeatureFlags issued the same GET and decoded the same way. Share the request, status check and decoding in get[T].

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
b0e295189c refactor(compose): share the pause/unpause and project-resolution preambles
pause and unpause listed and filtered their containers identically, and down, kill, stop and restart each re-spelled how to fall back to the project rebuilt from the engine. Each now has a single helper.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
954807414f refactor(compose): collect map keys with the standard library
Several places copied the keys of a map into a slice and sorted it by hand, some through their own generic helper. Use slices.Sorted(maps.Keys(m)), keeping the sorted order of the output.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
0b5eb38f4e refactor(compose): share the pull and push progress stream decoding
pull and push decoded the daemon's JSON message stream with the same loop and computed the completion percentage the same way. Move both to helpers.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
619ad27cd3 refactor(compose): use a single event processor that discards events
The quiet display, pkg/compose and three test files each defined an api.EventProcessor doing nothing. Provide it once as internal/progress.Noop.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
117374692c refactor(compose): share the bounded per-container fan-out
internal/containerops and pkg/compose both had a copy of forEachContainerConcurrent. Provide it once, generic, in internal/concurrency.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
ec76487628 refactor(compose): filter the containers of a service in one place
images and volumes each looped over the project containers to keep those of the selected services, as internal/inspect already did for ps and top. Use one helper for all four.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
be245666e4 refactor(compose): state the engine of the extracted packages once
internal/inspect and internal/containerops declared the same engine methods and one-off enum, and pkg/compose adapted them twice. Declare them in internal/engine, embed them in both Backend interfaces and keep a single adapter.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
15553d9604 refactor(compose): share how a container is folded into a service
internal/projectloader and pkg/compose each rebuilt a service definition from the containers of a project with the same bootstrap and replica counting. Keep it in internal/projectloader and call it from both.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
7f7247c952 refactor(compose): share the label filter builders
The label=key=value filter was rebuilt in pkg/compose, internal/inspect, internal/relay, cmd/compose and pkg/bridge. Build it once in internal/naming and use it everywhere.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
1b71636f7c refactor(compose): derive container names with internal/naming
pkg/compose kept private copies of the canonical, default and project-less container name helpers that internal/naming already provides. Use the shared ones, and host the project-prefix stripping that compose.go and monitor.go each implemented.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
019c47f109 refactor(compose): build progress events with internal/progress
pkg/compose carried its own copy of the event constructors that internal/progress already provides. Use the shared ones and move the generic waiting, healthy, exited and skipped events there too.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
80e4a0ae5c refactor: add internal/concurrency for the bounded errgroup helpers
The "errgroup bounded to maxConcurrency, where <= 0 means unlimited" helper was copied in several places (pkg/compose, internal/containerops, internal/inspect, internal/sync), together with the semaphore-based slot helpers used to share one budget across concurrent calls. Gather them in a leaf package so the extractions in progress can import it instead of duplicating it again. Behavior is unchanged.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 10:18:58 +01:00
Nicolas De Loof
fc55a942e7 refactor: move the config-hash helpers to internal/confighash
Some checks are pending
ci / validate (lint) (push) Waiting to run
ci / validate (relay-lint) (push) Waiting to run
ci / validate (relay-test) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / validate (validate-mocks) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / relay-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable, graphdriver) (push) Waiting to run
ci / e2e (standalone, oldstable, graphdriver) (push) Waiting to run
ci / e2e (plugin, stable, containerd) (push) Waiting to run
ci / e2e (plugin, stable, graphdriver) (push) Waiting to run
ci / e2e (standalone, stable, containerd) (push) Waiting to run
ci / e2e (standalone, stable, graphdriver) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / ci-ok (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / relay-image (push) Waiting to run
merge / module-image (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
zizmor / zizmor (push) Waiting to run
ServiceHash, NetworkHash and VolumeHash only serve Compose's own change
detection (the config-hash labels stamped on containers, networks and
volumes); they have no business being part of the exported API of
pkg/compose. Move them, with their tests, to internal/confighash.

The hashes are byte-for-byte unchanged (the golden values test moves with
the code, and `compose config --hash` prints the same output before and
after). The only dependency on the package they came from, a sorted-keys
helper, is replaced by slices.Sorted(maps.Keys(...)).

This removes exported symbols from the /v5 module: compose.ServiceHash,
compose.NetworkHash and compose.VolumeHash.

Part of #14396

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 08:20:15 +01:00
Nicolas De Loof
343bb382d2 build(lint): bump golangci-lint to v2.15.0 and fix what it now reports
Some checks are pending
ci / validate (lint) (push) Waiting to run
ci / validate (relay-lint) (push) Waiting to run
ci / validate (relay-test) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / validate (validate-mocks) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / relay-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable, graphdriver) (push) Waiting to run
ci / e2e (standalone, oldstable, graphdriver) (push) Waiting to run
ci / e2e (plugin, stable, containerd) (push) Waiting to run
ci / e2e (plugin, stable, graphdriver) (push) Waiting to run
ci / e2e (standalone, stable, containerd) (push) Waiting to run
ci / e2e (standalone, stable, graphdriver) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / ci-ok (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / relay-image (push) Waiting to run
merge / module-image (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
zizmor / zizmor (push) Waiting to run
The release updates errcheck (1.20 to 1.30) and gocognit (1.2.1 to 1.3.0).
errcheck now reports the receives from an error channel whose value is dropped
on purpose, in three places: waiting for the attach copy to end after the
context is done, draining the container wait channel of a failed hook, and
waiting for Up to return in a test. Say why on each, rather than handling an
error nobody can act on. gocognit's new count is handled by the previous
commit.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-28 16:31:14 +01:00
Nicolas De Loof
70ec1e62f6 refactor(up): extract the selection of the attached services from runUp
runUp is above the cognitive complexity limit of the linter once gocognit
is updated, because of the nested branches that select the services whose
logs are followed. Move that selection to upOptions.attachedServices, without
changing what it does, and cover its rules (--attach, --no-attach,
--attach-dependencies, attach: false in the Compose file), which no test
exercised.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-28 16:31:14 +01:00
dependabot[bot]
38ec632825 build(deps): bump github/codeql-action/upload-sarif
Some checks failed
ci / validate (lint) (push) Waiting to run
ci / validate (relay-lint) (push) Waiting to run
ci / validate (relay-test) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / validate (validate-mocks) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / relay-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable, graphdriver) (push) Waiting to run
ci / e2e (standalone, oldstable, graphdriver) (push) Waiting to run
ci / e2e (plugin, stable, containerd) (push) Waiting to run
ci / e2e (plugin, stable, graphdriver) (push) Waiting to run
ci / e2e (standalone, stable, containerd) (push) Waiting to run
ci / e2e (standalone, stable, graphdriver) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / ci-ok (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / relay-image (push) Waiting to run
merge / module-image (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
zizmor / zizmor (push) Waiting to run
docs-upstream / docs-yaml (push) Has been cancelled
docs-upstream / validate (push) Has been cancelled
Bumps [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) from 4.39.0 to 4.39.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6f2ac81f5c...9b32540854)

---
updated-dependencies:
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.39.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-28 11:15:28 +01:00
dependabot[bot]
bce138e7dc build(deps): bump docker/github-builder/.github/workflows/bake.yml
Bumps the docker-actions group with 1 update: [docker/github-builder/.github/workflows/bake.yml](https://github.com/docker/github-builder).


Updates `docker/github-builder/.github/workflows/bake.yml` from 1.18.0 to 1.18.1
- [Release notes](https://github.com/docker/github-builder/releases)
- [Commits](4345a1cea1...cbc9d42f8c)

---
updated-dependencies:
- dependency-name: docker/github-builder/.github/workflows/bake.yml
  dependency-version: 1.18.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: docker-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-28 11:15:24 +01:00
Max Proske
4f59d9fdaa feat(build): pass parallel limit to bake as --jobs
Signed-off-by: Max Proske <max@mproske.com>
2026-10-28 09:07:10 +01:00