compose/internal
Nicolas De Loof c1b1739f1c fix(plan): run the pre_stop hooks as an operation of the plan
The stop of the reconciliation plan runs the pre_stop hooks itself, in the
executor, since docker/compose#14477, except the stop of a recreate: the
replacement is created under a temporary name before the old container is
stopped, and a failing hook would leave it behind for the next up to trip on.
So a container that `up` replaces still goes without its hooks.

The hooks are now an operation of the plan, RunPreStop, that the stop depends
on. Every stop the plan makes has it: a recreated container, a scale down, the
containers of a recreated network or volume, the dependents restarted with a
recreated dependency, a service that moves to a provider. A container that has
no process to run them in skips them and is stopped all the same, as for
restart and down; a hook that fails fails the plan and leaves the container
running. A container stopped for two reasons is stopped once, and its hooks
run once.

A recreation runs the hooks before it creates the replacement: one that fails
then leaves nothing behind, and no stop has to skip them any more.

The plans of services without pre_stop hooks are unchanged.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-27 14:08:01 +01:00
..
build refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
concurrency refactor(compose): share the bounded per-container fan-out 2026-10-29 11:59:43 +01:00
confighash refactor: move the config-hash helpers to internal/confighash 2026-10-29 08:20:15 +01:00
containerops refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
depgraph refactor(compose): move the dependency graph to internal/depgraph 2026-11-05 11:42:19 +01:00
desktop refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
devwatch refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
e2e fix(plan): run the pre_stop hooks as an operation of the plan 2026-11-27 14:08:01 +01:00
engine refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
envresolver refactor(compose): move the image build to internal/build 2026-11-16 15:11:08 +01:00
experimental next release will be major version v5.x 2025-11-13 09:32:43 +01:00
images refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
inspect refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
jobsapi jobs: add the engine's jobs API contract and its gRPC client 2026-11-17 13:48:57 +01:00
locker build(deps): adopt compose-go jobs and the container-spec layering 2026-09-21 16:35:20 +02:00
logstream refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
memnet golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
naming refactor(compose): filter the containers of a service in one place 2026-10-29 11:59:43 +01:00
oci fix(oci): verify the manifests fetched against their digest 2026-11-11 08:52:55 +01:00
paths use go-compose instead Signed-off-by: tensorworker <tensorworker@proton.me> 2026-01-15 08:24:20 +01:00
pidfile use new moby/moby modules instead of docker/docker dependency 2026-04-08 08:50:50 +02:00
planning fix(plan): run the pre_stop hooks as an operation of the plan 2026-11-27 14:08:01 +01:00
progress refactor(compose): move the image build to internal/build 2026-11-16 15:11:08 +01:00
projectloader refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
provider refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
publish refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
registry refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
relay refactor: give each component only the engine families it uses 2026-11-27 10:10:21 +01:00
sync fix(watch): delete a large batch of synced paths in several execs 2026-11-18 08:23:13 +01:00
tracing refactor(compose): collect map keys with the standard library 2026-10-29 11:59:43 +01:00
variables.go format code with gofumpt 2024-12-17 16:50:14 +01:00