diff --git a/Configuration/PyReleaseValidation/python/MatrixUtil.py b/Configuration/PyReleaseValidation/python/MatrixUtil.py index 1988efd672466..6e8e4834c8902 100644 --- a/Configuration/PyReleaseValidation/python/MatrixUtil.py +++ b/Configuration/PyReleaseValidation/python/MatrixUtil.py @@ -266,4 +266,8 @@ def genvalid(fragment,d,suffix='all',fi='',dataSet=''): c['cfg']=fragment return c - +def check_dups(input): + seen = set() + dups = set(x for x in input if x in seen or seen.add(x)) + + return dups diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index 85c512b721783..564a5d60c3a5a 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -1,6 +1,6 @@ from copy import copy, deepcopy from collections import OrderedDict -from .MatrixUtil import merge, Kby, Mby +from .MatrixUtil import merge, Kby, Mby, check_dups import re U2000by1={'--relval': '2000,1'} @@ -2819,13 +2819,18 @@ def condition(self, fragment, stepList, key, hasHarvest): offset = 0.9001, ) -# check for duplicate offsets -offsets = [specialWF.offset for specialType,specialWF in upgradeWFs.items()] -seen = set() -dups = set(x for x in offsets if x in seen or seen.add(x)) +# check for duplicates in offsets or suffixes +offsets = [specialWF.offset for specialType,specialWF in upgradeWFs.items()] +suffixes = [specialWF.suffix for specialType,specialWF in upgradeWFs.items()] + +dups = check_dups(offsets) if len(dups)>0: raise ValueError("Duplicate special workflow offsets not allowed: "+','.join([str(x) for x in dups])) +dups = check_dups(suffixes) +if len(dups)>0: + raise ValueError("Duplicate special workflow suffixes not allowed: "+','.join([str(x) for x in dups])) + upgradeProperties = {} upgradeProperties[2017] = {