From 712565b2c4e7c709f8f506ac298f70999453250c Mon Sep 17 00:00:00 2001 From: Alan Malta Rodrigues Date: Thu, 13 May 2021 08:51:10 +0200 Subject: [PATCH] JobAccountant workaround for StepChain jobs with duplicate files - wmagent branch --- src/python/WMComponent/JobAccountant/AccountantWorker.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/python/WMComponent/JobAccountant/AccountantWorker.py b/src/python/WMComponent/JobAccountant/AccountantWorker.py index 59ade7ab3a..a77ac7f32d 100644 --- a/src/python/WMComponent/JobAccountant/AccountantWorker.py +++ b/src/python/WMComponent/JobAccountant/AccountantWorker.py @@ -454,6 +454,8 @@ def handleJob(self, jobID, fwkJobReport): conn=self.getDBConn(), transaction=self.existingTransaction()) + # FIXME: temporary workaround for: https://github.com/dmwm/WMCore/issues/9633 + skipOutputFiles = False if jobSuccess: fileList = fwkJobReport.getAllFiles() @@ -504,6 +506,7 @@ def handleJob(self, jobID, fwkJobReport): if not fwjrFile.get("locations") and fwjrFile.get("lfn", "").endswith(".root"): logging.warning("The following file doesn't have any location: %s", fwjrFile) jobSuccess = False + skipOutputFiles = True break else: fileList = fwkJobReport.getAllFilesFromStep(step='logArch1') @@ -548,6 +551,12 @@ def handleJob(self, jobID, fwkJobReport): else: wmbsJob["outcome"] = "failure" + # FIXME: BAD HACK to avoid crashing the component + if skipOutputFiles: + logging.warning("Skipping output file registration for failed job: %d", jobID) + self.listOfJobsToFail.append(wmbsJob) + return jobSuccess + for fwjrFile in fileList: logging.debug("Job %d , register output %s", jobID, fwjrFile["lfn"])