Skip to content

fix(merge): ensure unique default values for each key in convertIntoMapping#664

Merged
ndeloof merged 1 commit intocompose-spec:mainfrom
idsulik:fix-issue-11993
Jul 22, 2024
Merged

fix(merge): ensure unique default values for each key in convertIntoMapping#664
ndeloof merged 1 commit intocompose-spec:mainfrom
idsulik:fix-issue-11993

Conversation

@idsulik
Copy link
Copy Markdown
Contributor

@idsulik idsulik commented Jul 20, 2024

Fix for this issue docker/compose#11993.

The issue is that we're assigning the same defaultValue map for all keys.

Maps in Go are reference types. If you assign the same map to multiple keys, all keys will point to the same underlying map. Changes to one key will be reflected in all other keys.

@idsulik idsulik requested a review from ndeloof as a code owner July 20, 2024 08:06
…apping

Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
@ndeloof ndeloof merged commit c69a570 into compose-spec:main Jul 22, 2024
@idsulik idsulik deleted the fix-issue-11993 branch July 22, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants