diff --git a/src/python/WMComponent/WorkflowUpdater/WorkflowUpdaterPoller.py b/src/python/WMComponent/WorkflowUpdater/WorkflowUpdaterPoller.py index da61c69f8a..1df1540927 100644 --- a/src/python/WMComponent/WorkflowUpdater/WorkflowUpdaterPoller.py +++ b/src/python/WMComponent/WorkflowUpdater/WorkflowUpdaterPoller.py @@ -271,9 +271,15 @@ def algorithm(self, parameters=None): with CodeTimer("Rucio block resolution", logger=logging): self.findRucioBlocks(uniqueActivePU, msPileupList) - # loop over existing pileup names and + # loop over existing pileup names and compose list of ones we need to adjust + pileupList = [] + for rec in puWflows: + for spec in msPileupList: + if spec['pileupName'] == rec['name']: + pileupList.append(spec) # find the json files in the spec/sandbox area and tweak them - self.adjustJSONSpec(msPileupList) + self.adjustJSONSpec(pileupList) +# self.adjustJSONSpec(msPileupList) except Exception as ex: msg = f"Caught unexpected exception in WorkflowUpdater. Details:\n{str(ex)}" logging.exception(msg) @@ -309,6 +315,9 @@ def adjustJSONSpec(self, msPileupList): # construct jdict={"path-to-json1": jdoc1, "path-to-json2": jdoc2} jdict = {} + # TODO: verify that we do not overdo this for all pileup conf files + # please see Alans' concern here: + # https://github.com/dmwm/WMCore/pull/11884#discussion_r1479196670 for fname in pileupConfFiles: jdoc = extractPileupconf(tfile, fname) bdict = blockLocations(jdoc) @@ -320,7 +329,7 @@ def adjustJSONSpec(self, msPileupList): continue self.logger.info("Update pileup configureation file %s", fname) - updateBlockInfo(jdoc, rdict, bdict) + jdoc = updateBlockInfo(jdoc, rdict, bdict) jdict[fname] = jdoc # replace pileupconf.json files within tarball