compose/pkg/e2e/fixtures
Guillaume Lours 9d444a667a
Some checks failed
ci / validate (lint) (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 / binary (push) Has been cancelled
ci / bin-image-test (push) Has been cancelled
ci / test (push) Has been cancelled
ci / e2e (plugin, oldstable) (push) Has been cancelled
ci / e2e (standalone, oldstable) (push) Has been cancelled
ci / e2e (plugin, stable) (push) Has been cancelled
ci / e2e (standalone, stable) (push) Has been cancelled
merge / bin-image-prepare (push) Has been cancelled
merge / module-image (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
ci / binary-finalize (push) Has been cancelled
ci / coverage (push) Has been cancelled
ci / release (push) Has been cancelled
merge / bin-image (push) Has been cancelled
merge / desktop-edge-test (push) Has been cancelled
pre_start: support pre_start lifecycle hooks
runPreStart executes a service's pre_start hooks sequentially as
ephemeral containers that share the first non-running replica's
volumes via VolumesFrom and attach to the same networks. A non-zero
hook exit gates service start.

per_replica: false is the only currently supported mode; per_replica:
true is rejected up front. The donor replica is the lowest-numbered
one so the choice is deterministic. ContainerWait uses
WaitConditionNextExit, and the wait loop deterministically handles
the daemon's clean-close (nil on Error + exit code on Result) and
transport-error races to avoid spurious hook failures.

The log stream is opened before ContainerStart to avoid racing
AutoRemove on fast-exiting hooks, and runs under a derived context
so a daemon that keeps the connection open cannot deadlock the call.
Hook containers carry project/service/version labels; the two
cleanup paths force-remove the never-started container explicitly
and warn when removal fails.

pre_start runs once per service when no replica is already running
(initial up, force-recreate or spec change), and is skipped on
scale-up so additional replicas don't re-trigger the hooks.

Coverage: 11 unit tests (including scheduler-race stress) with
goroutine-leak verification via goleak, plus 10 E2E tests (success
path, hook failure gating start, build-image inheritance, idempotent
re-up, spec change, force-recreate, mid-sequence failure, ordering,
scale-up, scaled service).

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
2026-06-30 10:49:04 +02:00
..
attach-restart
bridge fix the helm bridge e2e tests after the latest update of the templates 2025-07-16 16:04:52 +02:00
build-dependencies build dependent service images when required 2025-06-02 12:28:43 +02:00
build-infinite
build-test bake only interpolates ${*} 2025-10-13 10:40:19 +02:00
cascade chore(e2e): fix flaky cascade failure test 2024-04-24 11:03:27 +02:00
commit feat: add commit command 2024-11-27 07:39:46 +01:00
compose-pull
config fix compose config --format json 2024-03-18 08:09:54 +01:00
configs
container_name check container_name is not in use by another service we will create 2024-04-16 17:26:50 +02:00
cp-test
dependencies test: Set stop_signal to SIGTERM 2025-09-19 10:31:20 +02:00
dotenv add support for raw env_file format 2024-10-08 18:33:54 +02:00
env-secret Compose can't create a tar with adequate uid:gid ownership 2025-10-20 09:51:58 +02:00
env_file run only loads required service env_file and ignores others 2025-03-18 09:39:15 +01:00
environment empty env variable with no value must be unset in container 2024-07-10 14:23:34 +02:00
exec prefer application container vs one-off running exec without index 2025-09-07 14:41:34 +02:00
export feat: add export command 2024-10-02 21:15:59 +02:00
external exclude unnecessary resources after services have been selected 2024-07-09 15:12:27 +02:00
hooks make sure the post_start hooks fails 2025-06-30 12:37:58 +02:00
image-volume-recreate compose: recreate container when mounted image digest changes 2026-01-26 15:55:44 +01:00
init-container
ipam
ipc-test
links
logging-driver stop dependent containers before recreating diverged service 2024-09-16 10:14:54 +02:00
logs-test
model introduce support for models 2025-06-30 19:22:35 +02:00
nested allow a local .env file to override compose.yaml sibling .env 2024-05-21 16:01:29 +02:00
network-alias
network-interface-name introduce networks.interface_name 2025-04-24 12:06:17 +02:00
network-links
network-recreate end-to-end test 2025-06-02 18:57:07 +02:00
network-test fix support for service.mac_address 2024-12-10 15:59:26 +01:00
no-deps
orphans restore setEnvWithDotEnv 2024-07-11 10:25:04 +02:00
pause
port-range run ContainerStart sequentially 2025-05-20 09:47:58 +02:00
pre_start pre_start: support pre_start lifecycle hooks 2026-06-30 10:49:04 +02:00
profiles Add profile e2e test case to document in compose 2024-10-30 16:00:41 +01:00
project-volume-bind-test
providers Fix rawsetenv nil-pointer guard for inherit-from-shell env vars 2026-06-23 15:01:33 +02:00
ps-test
publish pkg/e2e: fix malformed JWT in fixtures 2026-06-19 16:07:02 +02:00
recreate-volumes e2e test to prevent future regression 2024-12-16 15:46:47 +01:00
resources e2e test for --all-resources 2024-04-09 15:30:42 +02:00
restart-test test: Set stop_signal to SIGTERM 2025-09-19 10:31:20 +02:00
run-test fixes 2025-11-06 08:02:59 +01:00
scale remove obsolete containers first on scale down 2024-11-12 09:47:36 +01:00
sentences
simple-build-test
simple-composefile image can be set to a local ID, that isn't a valid docker ref 2025-01-09 09:55:30 +01:00
start-fail
start-stop
start_interval e2e test for start_interval 2025-04-30 11:08:09 +02:00
stdout-stderr
stop keep containers attached on stop to capture termination logs 2025-07-15 11:26:44 +02:00
switch-volumes e2e test for recreate volume 2024-12-13 09:52:22 +01:00
ups-deps-stop
volume-test
volumes introduce volume.type=image 2025-04-09 16:59:42 +02:00
wait
watch watch: do not rebuild depends_on services on file change 2026-06-19 11:23:50 +02:00
wrong-composefile