diff --git a/src/python/WMComponent/JobAccountant/AccountantWorker.py b/src/python/WMComponent/JobAccountant/AccountantWorker.py index 943cf90ca7..820392a29c 100644 --- a/src/python/WMComponent/JobAccountant/AccountantWorker.py +++ b/src/python/WMComponent/JobAccountant/AccountantWorker.py @@ -495,19 +495,16 @@ def handleJob(self, jobID, fwkJobReport): else: fileList = fwkJobReport.getAllFilesFromStep(step='logArch1') - # Make sure every file has a valid location - # see https://github.com/dmwm/WMCore/issues/9353 - newList = [] + # Workaround: make sure every file has a valid location. See: + # https://github.com/dmwm/WMCore/issues/9353 and https://github.com/dmwm/WMCore/issues/12092 for fwjrFile in fileList: # T0 has analysis file without any location, see: # https://github.com/dmwm/WMCore/issues/9497 if not fwjrFile.get("locations") and fwjrFile.get("lfn", "").endswith(".root"): logging.warning("The following file does not have any location: %s", fwjrFile) jobSuccess = False - else: - newList.append(fwjrFile) - # save the new list free of ill files (without any location) - fileList = newList + fileList = fwkJobReport.getAllFilesFromStep(step='logArch1') + break if jobSuccess: logging.info("Job %d , handle successful job", jobID) diff --git a/src/python/WMCore/WorkQueue/Policy/Start/StartPolicyInterface.py b/src/python/WMCore/WorkQueue/Policy/Start/StartPolicyInterface.py index 2b5a5aa94a..f894a44377 100644 --- a/src/python/WMCore/WorkQueue/Policy/Start/StartPolicyInterface.py +++ b/src/python/WMCore/WorkQueue/Policy/Start/StartPolicyInterface.py @@ -294,7 +294,7 @@ def getDatasetLocationsFromMSPileup(self, datasetsWithDbsURL): self.logger.debug(f'Retrieved MSPileup document: {doc}') if len(currentRSEs) == 0: self.logger.warning(f'No RSE has a copy of the desired pileup dataset. Expected RSEs: {doc["expectedRSEs"]}') - result[dataset] = doc['currentRSEs'] + result[dataset] = currentRSEs except IndexError: self.logger.warning('Did not find any pileup document for query: %s', queryDict['query']) result[dataset] = []