projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
18336: Pins upper version limit for httplib2 dependency on PySDK.
[arvados.git]
/
sdk
/
cwl
/
arvados_cwl
/
arvdocker.py
diff --git
a/sdk/cwl/arvados_cwl/arvdocker.py
b/sdk/cwl/arvados_cwl/arvdocker.py
index 84006b47d2a8ba86fd97f88b63772a53e3d711f6..26408317cbe6d0cdb5382f38c1455b0bd7b5db2a 100644
(file)
--- a/
sdk/cwl/arvados_cwl/arvdocker.py
+++ b/
sdk/cwl/arvados_cwl/arvdocker.py
@@
-18,7
+18,8
@@
logger = logging.getLogger('arvados.cwl-runner')
cached_lookups = {}
cached_lookups_lock = threading.Lock()
cached_lookups = {}
cached_lookups_lock = threading.Lock()
-def arv_docker_get_image(api_client, dockerRequirement, pull_image, project_uuid):
+def arv_docker_get_image(api_client, dockerRequirement, pull_image, project_uuid,
+ force_pull, tmp_outdir_prefix):
"""Check if a Docker image is available in Keep, if not, upload it using arv-keepdocker."""
if "http://arvados.org/cwl#dockerCollectionPDH" in dockerRequirement:
"""Check if a Docker image is available in Keep, if not, upload it using arv-keepdocker."""
if "http://arvados.org/cwl#dockerCollectionPDH" in dockerRequirement:
@@
-48,7
+49,10
@@
def arv_docker_get_image(api_client, dockerRequirement, pull_image, project_uuid
if not images:
# Fetch Docker image if necessary.
try:
if not images:
# Fetch Docker image if necessary.
try:
- cwltool.docker.DockerCommandLineJob.get_image(dockerRequirement, pull_image)
+ result = cwltool.docker.DockerCommandLineJob.get_image(dockerRequirement, pull_image,
+ force_pull, tmp_outdir_prefix)
+ if not result:
+ raise WorkflowException("Docker image '%s' not available" % dockerRequirement["dockerImageId"])
except OSError as e:
raise WorkflowException("While trying to get Docker image '%s', failed to execute 'docker': %s" % (dockerRequirement["dockerImageId"], e))
except OSError as e:
raise WorkflowException("While trying to get Docker image '%s', failed to execute 'docker': %s" % (dockerRequirement["dockerImageId"], e))
@@
-63,6
+67,7
@@
def arv_docker_get_image(api_client, dockerRequirement, pull_image, project_uuid
arvados.commands.put.api_client = api_client
arvados.commands.keepdocker.main(args, stdout=sys.stderr, install_sig_handlers=False, api=api_client)
except SystemExit as e:
arvados.commands.put.api_client = api_client
arvados.commands.keepdocker.main(args, stdout=sys.stderr, install_sig_handlers=False, api=api_client)
except SystemExit as e:
+ # If e.code is None or zero, then keepdocker exited normally and we can continue
if e.code:
raise WorkflowException("keepdocker exited with code %s" % e.code)
if e.code:
raise WorkflowException("keepdocker exited with code %s" % e.code)