Skip to content

Commit

Permalink
Jobs that failed in JobAccountant only persist logArch1 output
Browse files Browse the repository at this point in the history
  • Loading branch information
amaltaro committed Sep 5, 2024
1 parent 2131894 commit 022ca78
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/python/WMComponent/JobAccountant/AccountantWorker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 022ca78

Please sign in to comment.