Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning if WF name will be too long for submission #29621

Merged
merged 2 commits into from
May 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Configuration/PyReleaseValidation/python/MatrixInjector.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import time
import re

MAXWORKFLOWLENGTH = 81

def performInjectionOptionTest(opt):
if opt.show:
print('Not injecting to wmagent in --show mode. Need to run the worklfows.')
Expand Down Expand Up @@ -83,7 +85,7 @@ def __init__(self,opt,mode='init',options=''):
self.speciallabel=''
if opt.label:
self.speciallabel= '_'+opt.label

self.longWFName = []

if not os.getenv('WMCORE_ROOT'):
print('\n\twmclient is not setup properly. Will not be able to upload or submit requests.\n')
Expand Down Expand Up @@ -477,6 +479,10 @@ def prepare(self,mReader, directories, mode='init'):
chainDict['RequestString']='RV'+chainDict['CMSSWVersion']+s[1].split('+')[0]
if processStrPrefix or thisLabel:
chainDict['RequestString']+='_'+processStrPrefix+thisLabel
#check candidate WF name
self.candidateWFName = self.user+'_'+chainDict['RequestString']
if (len(self.candidateWFName)>MAXWORKFLOWLENGTH):
self.longWFName.append(self.candidateWFName)

### PrepID
chainDict['PrepID'] = chainDict['CMSSWVersion']+'__'+self.batchTime+'-'+s[1].split('+')[0]
Expand Down Expand Up @@ -647,6 +653,6 @@ def submit(self):
workFlow=makeRequest(self.wmagent,d,encodeDict=True)
print("...........",n,"submitted")
random_sleep()


if self.testMode and len(self.longWFName)>0:
print("\n*** WARNING: "+str(len(self.longWFName))+" workflows have too long names for submission (>"+str(MAXWORKFLOWLENGTH)+ "characters) ***")
print('\n'.join(self.longWFName))