Skip to content

Commit

Permalink
Merge pull request #39850 from vlimant/rerun_failed_matrix_from_report
Browse files Browse the repository at this point in the history
simple option to rerun failed workflows from a matrix report
  • Loading branch information
cmsbuild committed Oct 31, 2022
2 parents d624d70 + f608af1 commit 447a8dc
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Configuration/PyReleaseValidation/scripts/runTheMatrix.py
Expand Up @@ -181,7 +181,12 @@ def runSelected(opt):
help='Comma separated list of workflow to be shown or ran. Possible keys are also '+str(predefinedSet.keys())+'. and wild card like muon, or mc',
dest='testList',
default=None)


parser.add_argument('-f','--failed-from',
help='Provide a matrix report to specify the workflows to be run again. Augments the -l option if specified already',
dest='failed_from',
default=None)

parser.add_argument('-r','--raw',
help='Temporary dump the .txt needed for prodAgent interface. To be discontinued soon. Argument must be the name of the set (standard, pileup,...)',
dest='raw')
Expand Down Expand Up @@ -377,6 +382,18 @@ def runSelected(opt):
opt = parser.parse_args()
if opt.command: opt.command = ' '.join(opt.command)
os.environ["CMSSW_DAS_QUERY_SITES"]=opt.dasSites
if opt.failed_from:
rerunthese=[]
with open(opt.failed_from,'r') as report:
for report_line in report:
if 'FAILED' in report_line:
to_run,_=report_line.split('_',1)
rerunthese.append(to_run)
if opt.testList:
opt.testList+=','.join(['']+rerunthese)
else:
opt.testList = ','.join(rerunthese)

if opt.IBEos:
from subprocess import getstatusoutput as run_cmd

Expand Down

0 comments on commit 447a8dc

Please sign in to comment.