diff --git a/wa/commands/run.py b/wa/commands/run.py index dd4fb430..791b1ade 100644 --- a/wa/commands/run.py +++ b/wa/commands/run.py @@ -92,7 +92,7 @@ class RunCommand(Command): self.logger.debug('Version: {}'.format(get_wa_version())) self.logger.debug('Command Line: {}'.format(' '.join(sys.argv))) - disabled_augmentations = toggle_set(["~{}".format(i) + disabled_augmentations = toggle_set([i != '~~' and "~{}".format(i) or i for i in args.augmentations_to_disable]) config.jobs_config.disable_augmentations(disabled_augmentations) config.jobs_config.only_run_ids(args.only_run_ids) diff --git a/wa/framework/configuration/core.py b/wa/framework/configuration/core.py index e335d829..391e09fe 100644 --- a/wa/framework/configuration/core.py +++ b/wa/framework/configuration/core.py @@ -957,6 +957,8 @@ class JobGenerator(object): def disable_augmentations(self, augmentations): for entry in augmentations: + if entry == '~~': + continue if entry.startswith('~'): entry = entry[1:] try: diff --git a/wa/framework/configuration/parsers.py b/wa/framework/configuration/parsers.py index 3360c8fa..0de2eab7 100644 --- a/wa/framework/configuration/parsers.py +++ b/wa/framework/configuration/parsers.py @@ -306,7 +306,10 @@ def _construct_valid_entry(raw, seen_ids, prefix, jobs_config): workload_entry[name] = value if "augmentations" in workload_entry: - jobs_config.update_augmentations(workload_entry["augmentations"]) + if '~~' in workload_entry['augmentations']: + msg = '"~~" can only be specfied in top-level config, and not for individual workloads/sections' + raise ConfigError(msg) + jobs_config.update_augmentations(workload_entry['augmentations']) # error if there are unknown workload_entry if raw: diff --git a/wa/utils/types.py b/wa/utils/types.py index ef6c7bd7..f24c5e0b 100644 --- a/wa/utils/types.py +++ b/wa/utils/types.py @@ -370,6 +370,9 @@ class toggle_set(set): @staticmethod def merge(source, dest): + if '~~' in dest: + dest.remove('~~') + return dest for item in source: if item not in dest: #Disable previously enabled item