From dd9a72f043321fab7eede5744f3c710dc0f94a27 Mon Sep 17 00:00:00 2001 From: sergei Trofimov Date: Tue, 1 May 2018 09:15:17 +0100 Subject: [PATCH] fw/config: union augmentation aliases, rather than merge If more then one of augmentation entries ("augmentations", "instrumenatation", "output_processors") is specified in the same config they were being merged into a single entry. This can cause issues with '~~' (drop everything glyph) being "resolved" during this merge and therefore not actually used to drop all previous augmentations. Union'ing, instead of merging, configs at the same level avoids that. Note that this is semantically correct, as we're not enforcing precedence at the same level of config, so merge semantics do not apply. --- wa/framework/configuration/parsers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wa/framework/configuration/parsers.py b/wa/framework/configuration/parsers.py index 0de2eab7..0af445c5 100644 --- a/wa/framework/configuration/parsers.py +++ b/wa/framework/configuration/parsers.py @@ -265,7 +265,7 @@ def merge_augmentations(raw): raise ConfigError(msg.format(check_entry, e, conflict_string)) if entries: - raw['augmentations'] = reduce(lambda x, y: x.merge_with(y), entries) + raw['augmentations'] = reduce(lambda x, y: x.union(y), entries) def _pop_aliased(d, names, entry_id):