serviceHashWithResolvedRefs mirrors what the executor persists at create time: service references (network_mode/ipc/pid: service:X, volumes_from) are resolved against the observed containers snapshot before hashing. On resolution failure (e.g. referenced parent absent) the raw form is hashed — it ca
(svc types.ServiceConfig, containers map[string]Containers)
| 592 | // svc.Networks (a map) is left shared because resolveServiceReferences does |
| 593 | // not touch it; revisit if that changes. |
| 594 | func serviceHashWithResolvedRefs(svc types.ServiceConfig, containers map[string]Containers) (string, error) { |
| 595 | resolved := svc |
| 596 | resolved.VolumesFrom = slices.Clone(svc.VolumesFrom) |
| 597 | _ = resolveServiceReferences(&resolved, containers) |
| 598 | return ServiceHash(resolved) |
| 599 | } |
| 600 | |
| 601 | // hasNetworkMismatch checks if the container is not connected to all expected networks. |
| 602 | func (r *reconciler) hasNetworkMismatch(expected types.ServiceConfig, oc ObservedContainer) bool { |