8567: Use Docker image repo+tag name instead of PDH so that API server can select...
[arvados.git] / sdk / cwl / arvados_cwl / arvdocker.py
index f83add9379c176d5cb9ad472c0778c68174058b5..4fc8b8e7229783117b747c468919a786010d599a 100644 (file)
@@ -27,7 +27,7 @@ def arv_docker_get_image(api_client, dockerRequirement, pull_image, project_uuid
     global cached_lookups_lock
     with cached_lookups_lock:
         if dockerRequirement["dockerImageId"] in cached_lookups:
-            return cached_lookups[dockerRequirement["dockerImageId"]]
+            return dockerRequirement["dockerImageId"]
 
     with SourceLine(dockerRequirement, "dockerImageId", WorkflowException):
         sp = dockerRequirement["dockerImageId"].split(":")
@@ -63,12 +63,10 @@ def arv_docker_get_image(api_client, dockerRequirement, pull_image, project_uuid
         if not images:
             raise WorkflowException("Could not find Docker image %s:%s" % (image_name, image_tag))
 
-        pdh = api_client.collections().get(uuid=images[0][0]).execute()["portable_data_hash"]
-
         with cached_lookups_lock:
-            cached_lookups[dockerRequirement["dockerImageId"]] = pdh
+            cached_lookups[dockerRequirement["dockerImageId"]] = True
 
-        return pdh
+    return dockerRequirement["dockerImageId"]
 
 def arv_docker_clear_cache():
     global cached_lookups