-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from PanDAWMS/next
3.2.4.16
- Loading branch information
Showing
16 changed files
with
206 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.2.3.27 | ||
3.2.4.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,12 @@ | |
# Authors: | ||
# - Paul Nilsson, [email protected], 2017-2021 | ||
# - Tobias Wegner, [email protected], 2018 | ||
# - David Cameron, [email protected], 2018-2019 | ||
# - David Cameron, [email protected], 2018-2022 | ||
|
||
import os | ||
import re | ||
|
||
from pilot.common.exception import StageInFailure, StageOutFailure, ErrorCodes, PilotException | ||
from pilot.common.exception import StageInFailure, StageOutFailure, ErrorCodes | ||
from pilot.util.container import execute | ||
|
||
import logging | ||
|
@@ -22,16 +22,11 @@ | |
check_availablespace = False # indicate whether space check should be applied before stage-in transfers using given copytool | ||
|
||
|
||
def create_output_list(files, init_dir, ddmconf): | ||
def create_output_list(files, init_dir): | ||
""" | ||
Add files to the output list which tells ARC CE which files to upload | ||
""" | ||
|
||
if not ddmconf: | ||
raise PilotException("copy_out() failed to resolve ddmconf from function arguments", | ||
code=ErrorCodes.STAGEOUTFAILED, | ||
state='COPY_ERROR') | ||
|
||
for fspec in files: | ||
arcturl = fspec.turl | ||
if arcturl.startswith('s3://'): | ||
|
@@ -45,12 +40,6 @@ def create_output_list(files, init_dir, ddmconf): | |
else: | ||
# Add ARC options to TURL | ||
checksumtype, checksum = list(fspec.checksum.items())[0] # Python 2/3 | ||
# resolve token value from fspec.ddmendpoint | ||
token = ddmconf.get(fspec.ddmendpoint).token | ||
if not token: | ||
logger.info('No space token info for %s', fspec.ddmendpoint) | ||
else: | ||
arcturl = re.sub(r'((:\d+)/)', r'\2;autodir=no;spacetoken=%s/' % token, arcturl) | ||
arcturl += ':checksumtype=%s:checksumvalue=%s' % (checksumtype, checksum) | ||
|
||
logger.info('Adding to output.list: %s %s', fspec.lfn, arcturl) | ||
|
@@ -127,7 +116,7 @@ def copy_out(files, copy_type="mv", **kwargs): | |
logger.debug('init_dir for output.list=%s', os.path.dirname(kwargs.get('workdir'))) | ||
output_dir = kwargs.get('output_dir', '') | ||
if not output_dir: | ||
create_output_list(files, os.path.dirname(kwargs.get('workdir')), kwargs.get('ddmconf', None)) | ||
create_output_list(files, os.path.dirname(kwargs.get('workdir'))) | ||
|
||
return files | ||
|
||
|
Oops, something went wrong.