Skip to content

Commit

Permalink
Merge pull request #10774 from amaltaro/fix-10653-152
Browse files Browse the repository at this point in the history
JobAccountant workaround for StepChain jobs with duplicate files - wmagent branch
  • Loading branch information
amaltaro authored Aug 25, 2021
2 parents c2fa70a + 712565b commit 2be9734
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/python/WMComponent/JobAccountant/AccountantWorker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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"])
Expand Down

0 comments on commit 2be9734

Please sign in to comment.