Open edwardpeek-crown-public opened 3 months ago
Per https://github.com/compose-spec/compose-spec/blob/master/13-merge.md#unique-resources
Applies to the ports, volumes, secrets and configs services attributes. While these types are modeled in a Compose file as a sequence, they have special uniqueness requirements: Attribute Unique key volumes target secrets source configs source ports {ip, target, published, protocol}
Applies to the ports, volumes, secrets and configs services attributes. While these types are modeled in a Compose file as a sequence, they have special uniqueness requirements:
Attribute Unique key volumes target secrets source configs source ports {ip, target, published, protocol}
But current behaviour is to merge based on target instead, as demonstrated by https://github.com/compose-spec/compose-go/blob/main/override/merge_mounts_test.go :
services: test: image: foo secrets: - foo - bar - zot
merged with
services: test: image: foo secrets: - source: zot target: /run/secrets/foo
results in
services: test: image: foo secrets: - source: zot target: /run/secrets/foo - bar - zot
Per compose spec the output should be
services: test: image: foo secrets: - foo - bar - source: zot target: /run/secrets/foo
that's indeed a mistake writing the spec, thanks for reporting
Per https://github.com/compose-spec/compose-spec/blob/master/13-merge.md#unique-resources
But current behaviour is to merge based on target instead, as demonstrated by https://github.com/compose-spec/compose-go/blob/main/override/merge_mounts_test.go :
merged with
results in
Per compose spec the output should be