compose/pkg/e2e
ibrahim yapar 56ab28aef3 compose: recreate container when mounted image digest changes
Until now, mustRecreate logic only checked for divergence in TypeVolume
mounts but ignored TypeImage mounts. This inconsistency caused containers
to erroneously retain stale images even after the source image was rebuilt.
This commit updates ensureImagesExists to resolve image volume sources to
their digests using the official reference package. This enables ServiceHash
(config hash) to naturally detect underlying image digest changes,
triggering recreation via the standard convergence logic.
An E2E test case is added to verify this behavior.
Fixes #13547

Signed-off-by: ibrahim yapar <74625807+ibrahimypr@users.noreply.github.com>
2026-01-26 15:55:44 +01:00
..
fixtures compose: recreate container when mounted image digest changes 2026-01-26 15:55:44 +01:00
assert.go refactor: replace interface{} with any for clarity and modernization 2025-12-02 08:41:49 +01:00
bridge_test.go use fixed version of compose bridge transformer images 2025-10-14 09:21:59 +02:00
build_test.go drop support for internal buildkit builder 2025-11-04 11:36:40 +01:00
cancel_test.go test: replace context.Background()/context.TODO() with t.Context() 2026-01-20 11:34:11 +01:00
cascade_test.go fix linting issues 2025-11-16 14:54:58 +01:00
commit_test.go fix: commit tests 2024-11-27 07:39:46 +01:00
compose_environment_test.go empty env variable with no value must be unset in container 2024-07-10 14:23:34 +02:00
compose_exec_test.go be sure everything has been cleanup at the end of each tests 2024-12-04 15:28:16 +01:00
compose_run_build_once_test.go fixes 2025-11-06 08:02:59 +01:00
compose_run_test.go distinguish event (short) status text and details 2025-11-04 10:18:55 +01:00
compose_test.go introduce config --lock-image-digests 2025-05-19 13:53:01 +02:00
compose_up_test.go fix various linting issues 2025-10-31 17:44:38 +01:00
config_test.go e2e: add tests 2025-05-06 22:33:52 +02:00
configs_test.go be sure everything has been cleanup at the end of each tests 2024-12-04 15:28:16 +01:00
container_name_test.go fix linting issues 2025-11-16 14:54:58 +01:00
cp_test.go align --format flag and UX with docker cli 2022-12-14 22:53:43 +01:00
e2e_config_plugin.go chore(e2e): fix flaky test & standalone behavior (#11382) 2024-01-30 10:49:53 -05:00
e2e_config_standalone.go Use build tags for selecting e2e test mode 2021-12-09 10:52:18 +01:00
env_file_test.go Add e2e test to verify docker compose down works even when env file is missing 2025-08-25 10:03:55 +02:00
exec_test.go prefer application container vs one-off running exec without index 2025-09-07 14:41:34 +02:00
export_test.go fix: lint 2024-10-02 21:15:59 +02:00
expose_test.go Fix support for port range 2025-11-16 20:38:54 +01:00
framework.go next release will be major version v5.x 2025-11-13 09:32:43 +01:00
healthcheck_test.go fix various linting issues 2025-10-31 17:44:38 +01:00
hooks_test.go make sure the post_start hooks fails 2025-06-30 12:37:58 +02:00
ipc_test.go e2e: fix subtests and block parallel unsafe tests 2022-06-15 16:27:30 -04:00
logs_test.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
main_test.go Use build tags for selecting e2e test mode 2021-12-09 10:52:18 +01:00
model_test.go run docker model configure 2025-06-30 19:22:35 +02:00
networks_test.go fix: emit container status events after network reconnection 2026-01-21 09:40:05 +01:00
noDeps_test.go fix linting issues 2025-11-16 14:54:58 +01:00
orphans_test.go be sure everything has been cleanup at the end of each tests 2024-12-04 15:28:16 +01:00
pause_test.go Remove COMPOSE_MENU env from e2e tests 2024-07-01 16:31:12 +01:00
profiles_test.go COMPOSE_PROFILES can be set by .env file 2024-05-30 07:40:01 +02:00
providers_test.go fix provider concurrent environment map accesses 2025-06-30 19:07:10 +02:00
ps_test.go next release will be major version v5.x 2025-11-13 09:32:43 +01:00
publish_test.go only check for env_file 2025-11-28 09:48:55 +01:00
pull_test.go distinguish event (short) status text and details 2025-11-04 10:18:55 +01:00
recreate_no_deps_test.go up/start/run: don't wait for disabled service 2022-08-17 12:32:10 -05:00
restart_test.go distinguish event (short) status text and details 2025-11-04 10:18:55 +01:00
scale_test.go refactor: replace Split in loops with more efficient SplitSeq 2025-11-25 11:37:03 +01:00
secrets_test.go Compose can't create a tar with adequate uid:gid ownership 2025-10-20 09:51:58 +02:00
start_stop_test.go distinguish event (short) status text and details 2025-11-04 10:18:55 +01:00
up_test.go test: replace context.Background()/context.TODO() with t.Context() 2026-01-20 11:34:11 +01:00
volumes_test.go compose: recreate container when mounted image digest changes 2026-01-26 15:55:44 +01:00
wait_test.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
watch_test.go add deprecation warning for x-initialSync + e2e test 2025-09-18 11:06:44 +02:00