Skip to content

Commit

Permalink
1.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaeno committed Mar 1, 2022
1 parent d78b44c commit 6d00bdc
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
** Release Notes

1.5.7
* added --vo, --prodSourceLabel, and --workingGroup to pchain

1.5.6
* added PANDACACHE_URL

Expand Down
8 changes: 4 additions & 4 deletions pandaclient/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,10 +757,10 @@ def putFile(file,verbose=False,useCacheSrv=False,reuseSandbox=False):
# return reusable filename
return 0,"NewFileName:%s" % reuseFileName
# execute
if useCacheSrv:
url = baseURLCSRVSSL + '/putFile'
else:
url = baseURLSSL + '/putFile'
if not useCacheSrv:
global baseURLCSRVSSL
baseURLCSRVSSL = baseURLSSL
url = baseURLCSRVSSL + '/putFile'
data = {'file':file}
s,o = curl.put(url,data)
return s, str_decode(o)
Expand Down
2 changes: 1 addition & 1 deletion pandaclient/PandaToolsPkgInfo.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
release_version = "1.5.6"
release_version = "1.5.7"
20 changes: 19 additions & 1 deletion pandaclient/PchainScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@ def main():
group_build.add_argument('--useAthenaPackages', action='store_const', const=True, dest='useAthenaPackages',
default=False,
help='One or more tasks in the workflow uses locally-built Athena packages')
group_build.add_argument('--vo', action='store', dest='vo', default=None,
help="virtual organization name")

group_output.add_argument('--outDS', action='store', dest='outDS', default=None, required=True,
help='Name of the dataset for output and log files')
group_output.add_argument('--official', action='store_const', const=True, dest='official', default=False,
help='Produce official dataset')

group_submit.add_argument('--noSubmit', action='store_const', const=True, dest='noSubmit', default=False,
help="Dry-run")
group_submit.add_argument("-3", action="store_true", dest="python3", default=False,
Expand All @@ -75,6 +78,10 @@ def main():
"e.g., atlas:/atlas/ca/Role=production,atlas:/atlas/fr/Role=pilot")
group_submit.add_argument('--noEmail', action='store_const', const=True, dest='noEmail', default=False,
help='Suppress email notification')
group_submit.add_argument('--prodSourceLabel', action='store', dest='prodSourceLabel', default='',
help="set prodSourceLabel")
group_submit.add_argument('--workingGroup', action='store', dest='workingGroup', default=None,
help="set workingGroup")

group_expert.add_argument('--intrSrv', action='store_const', const=True, dest='intrSrv', default=False,
help="Please don't use this option. Only for developers to use the intr panda server")
Expand Down Expand Up @@ -131,8 +138,12 @@ def _onExit(dir, del_command):

if not options.noSubmit:
tmpLog.info("uploading workflow sandbox")
if options.vo:
use_cache_srv = False
else:
use_cache_srv = True
os.chdir(tmpDir)
status, out = Client.putFile(archiveName, options.verbose, useCacheSrv=True, reuseSandbox=True)
status, out = Client.putFile(archiveName, options.verbose, useCacheSrv=use_cache_srv, reuseSandbox=True)
os.chdir(curDir)
if out.startswith('NewFileName:'):
# found the same input sandbox to reuse
Expand Down Expand Up @@ -166,10 +177,17 @@ def _onExit(dir, del_command):
prun_exec_str += ' --noSubmit'
if options.verbose:
prun_exec_str += ' -v'
if options.vo:
prun_exec_str += ' --vo {0}'.format(options.vo)
if options.prodSourceLabel:
prun_exec_str += ' --prodSourceLabel {0}'.format(options.prodSourceLabel)
if options.workingGroup:
prun_exec_str += ' --workingGroup {0}'.format(options.workingGroup)
arg_dict = {'get_taskparams': True,
'ext_args': shlex.split(prun_exec_str)}
if options.checkOnly:
arg_dict['dry_mode'] = True

taskParamMap = PrunScript.main(**arg_dict)
del taskParamMap['noInput']
del taskParamMap['nEvents']
Expand Down

0 comments on commit 6d00bdc

Please sign in to comment.