projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
12568: Reduce min_entries
[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 f42e6d8c9c356cfcee7c165d554359cdec40623b..e59903f2dc33b3d69406ee1fbc92751bd78e9623 100644
(file)
--- a/
sdk/cwl/arvados_cwl/arvdocker.py
+++ b/
sdk/cwl/arvados_cwl/arvdocker.py
@@
-33,10
+33,10
@@
def arv_docker_get_image(api_client, dockerRequirement, pull_image, project_uuid
if dockerRequirement["dockerImageId"] in cached_lookups:
return dockerRequirement["dockerImageId"]
if dockerRequirement["dockerImageId"] in cached_lookups:
return dockerRequirement["dockerImageId"]
- with SourceLine(dockerRequirement, "dockerImageId", WorkflowException):
+ with SourceLine(dockerRequirement, "dockerImageId", WorkflowException
, logger.isEnabledFor(logging.DEBUG)
):
sp = dockerRequirement["dockerImageId"].split(":")
image_name = sp[0]
sp = dockerRequirement["dockerImageId"].split(":")
image_name = sp[0]
- image_tag = sp[1] if len(sp) > 1 else
None
+ image_tag = sp[1] if len(sp) > 1 else
"latest"
images = arvados.commands.keepdocker.list_images_in_arv(api_client, 3,
image_name=image_name,
images = arvados.commands.keepdocker.list_images_in_arv(api_client, 3,
image_name=image_name,
@@
-44,16
+44,18
@@
def arv_docker_get_image(api_client, dockerRequirement, pull_image, project_uuid
if not images:
# Fetch Docker image if necessary.
if not images:
# Fetch Docker image if necessary.
- cwltool.docker.get_image(dockerRequirement, pull_image)
+ try:
+ cwltool.docker.get_image(dockerRequirement, pull_image)
+ except OSError as e:
+ raise WorkflowException("While trying to get Docker image '%s', failed to execute 'docker': %s" % (dockerRequirement["dockerImageId"], e))
# Upload image to Arvados
args = []
if project_uuid:
args.append("--project-uuid="+project_uuid)
args.append(image_name)
# Upload image to Arvados
args = []
if project_uuid:
args.append("--project-uuid="+project_uuid)
args.append(image_name)
- if image_tag:
- args.append(image_tag)
- logger.info("Uploading Docker image %s", ":".join(args[1:]))
+ args.append(image_tag)
+ logger.info("Uploading Docker image %s:%s", image_name, image_tag)
try:
arvados.commands.keepdocker.main(args, stdout=sys.stderr)
except SystemExit as e:
try:
arvados.commands.keepdocker.main(args, stdout=sys.stderr)
except SystemExit as e: