compose/pkg/e2e/testdata/TestPreStartHookVolumesFrom
Nicolas De Loof 80cae9a7a5 pre_start: consume the load-time-resolved hook specification
compose-go resolves each hook against its service at load time: the
model itself carries the full container specification a hook runs with,
and the runtime consumes it as-is through the standard create path —
the runtime-side merge helper goes away.

Consuming the full spec means honoring ALL of it:
- service references it may carry — volumes_from entries, and
  service:-scoped network_mode/ipc/pid, inherited or declared — resolve
  to live container IDs exactly like the service create path does; the
  daemon knows nothing about service names and rejected them, failing
  up for any service combining volumes_from with a pre_start hook
  (locked by an e2e scenario).
- hook labels — declared or inherited — merge into the container's
  labels, the runtime identification set winning on conflicts.
- the <API 1.44 network-connect fallback joins the HOOK's networks,
  not the parent service's: a hook overriding networks was connected
  to the wrong ones.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-09-21 16:35:20 +02:00
..
compose.yaml pre_start: consume the load-time-resolved hook specification 2026-09-21 16:35:20 +02:00