The general algorithm is:
-# Visit the container request that produced this collection (via "output_uuid" or "log_uuid")
-# Visit the input collections to that container request (via "mounts", or "container_image")
+# Visit the container request that produced this collection (via "output_uuid" or "log_uuid" attributes of the container request)
+# Visit the input collections to that container request (via "mounts" and "container_image" of the container request)
# Iterate until there are no more objects to visit
Arguments:
The general algorithm is:
-# Visit containers that take this collection as input (via "mounts", or "container_image")
-# Visit collections produced by those containers (via "output" or "log")
+# Visit containers that take this collection as input (via "mounts" or "container_image" of the container)
+# Visit collections produced by those containers (via "output" or "log" of the container)
# Iterate until there are no more objects to visit
Arguments:
if direction == :search_up
visited[c.uuid] = c.as_api_response
+ if !Rails.configuration.API.DisabledAPIs.include?("jobs.list")
+ Job.readable_by(*@read_users).where(output: c.portable_data_hash).each do |job|
+ search_edges(visited, job.uuid, :search_up)
+ end
+
+ Job.readable_by(*@read_users).where(log: c.portable_data_hash).each do |job|
+ search_edges(visited, job.uuid, :search_up)
+ end
+ end
+
ContainerRequest.readable_by(*@read_users).where(output_uuid: uuid).each do |cr|
search_edges(visited, cr.uuid, :search_up)
end