Skip to content

bake: keep unset target attributes across override files - #4108

Open
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/bake-override-tags
Open

locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/bake-override-tags

Conversation

@locker95

Copy link
Copy Markdown

An override file that only sets args was wiping the rest of the target. target.tgt1.tags[0] came back null, while the same change via --set worked, because --set is applied after parsing.

Later blocks now only replace attributes they actually set. Maps (args, labels, contexts) still merge by key, and an explicit tags = [...] still replaces the list.

Fixes #3173

A later target block was stored as a whole new object, so attributes
it did not set (tags, for example) became null for anything that
referenced them. Merge non-null attributes instead, and merge maps
by key.

Signed-off-by: Dean Chen <862469039@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bake: target override using file breaks references to its tags list from other target

1 participant