X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/04897299db36ce0e467fe09bc0e4e25d8a932ff8..8e7c30852f1cf244ae3c58e93acea705739e8625:/services/api/test/fixtures/container_requests.yml diff --git a/services/api/test/fixtures/container_requests.yml b/services/api/test/fixtures/container_requests.yml index 22d745195e..5d3531eead 100644 --- a/services/api/test/fixtures/container_requests.yml +++ b/services/api/test/fixtures/container_requests.yml @@ -1,12 +1,16 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + queued: uuid: zzzzz-xvhdp-cr4queuedcontnr owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz name: queued state: Committed priority: 1 - created_at: 2016-01-11 11:11:11.111111111 Z - updated_at: 2016-01-11 11:11:11.111111111 Z - modified_at: 2016-01-11 11:11:11.111111111 Z + created_at: <%= 2.minute.ago.to_s(:db) %> + updated_at: <%= 1.minute.ago.to_s(:db) %> + modified_at: <%= 1.minute.ago.to_s(:db) %> modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz container_image: test cwd: test @@ -22,10 +26,10 @@ running: owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz name: running state: Committed - priority: 1 - created_at: 2016-01-11 11:11:11.111111111 Z - updated_at: 2016-01-11 11:11:11.111111111 Z - modified_at: 2016-01-11 11:11:11.111111111 Z + priority: 501 + created_at: <%= 2.minute.ago.to_s(:db) %> + updated_at: <%= 1.minute.ago.to_s(:db) %> + modified_at: <%= 1.minute.ago.to_s(:db) %> modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz container_image: test cwd: test @@ -36,7 +40,27 @@ running: vcpus: 1 ram: 123 -running-older: +requester_for_running: + uuid: zzzzz-xvhdp-req4runningcntr + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: requester_for_running_cr + state: Committed + priority: 1 + created_at: <%= 2.minute.ago.to_s(:db) %> + updated_at: <%= 2.minute.ago.to_s(:db) %> + modified_at: <%= 2.minute.ago.to_s(:db) %> + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + container_image: test + cwd: test + output_path: test + command: ["echo", "hello"] + container_uuid: zzzzz-dz642-logscontainer03 + requesting_container_uuid: zzzzz-dz642-runningcontainr + runtime_constraints: + vcpus: 1 + ram: 123 + +running_older: uuid: zzzzz-xvhdp-cr4runningcntn2 owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz name: running @@ -70,6 +94,8 @@ completed: output_path: test command: ["echo", "hello"] container_uuid: zzzzz-dz642-compltcontainer + log_uuid: zzzzz-4zz18-y9vne9npefyxh8g + output_uuid: zzzzz-4zz18-znfnqtbbv4spc3w runtime_constraints: vcpus: 1 ram: 123 @@ -80,19 +106,38 @@ completed-older: name: completed state: Final priority: 1 - created_at: 2016-01-11 11:11:11.111111111 Z + created_at: <%= 30.minute.ago.to_s(:db) %> updated_at: 2016-01-11 11:11:11.111111111 Z modified_at: 2016-01-11 11:11:11.111111111 Z modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz container_image: test cwd: test output_path: test - command: ["echo", "hello"] + command: ["arvados-cwl-runner", "echo", "hello"] container_uuid: zzzzz-dz642-compltcontainr2 runtime_constraints: vcpus: 1 ram: 123 +requester: + uuid: zzzzz-xvhdp-9zacv3o1xw6sxz5 + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: requester + state: Committed + priority: 1 + created_at: 2016-01-11 11:11:11.111111111 Z + updated_at: 2016-01-11 11:11:11.111111111 Z + modified_at: 2016-01-11 11:11:11.111111111 Z + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + container_image: test + cwd: / + output_path: /output + command: ["request-another-container", "echo", "hello"] + container_uuid: zzzzz-dz642-requestingcntnr + runtime_constraints: + vcpus: 1 + ram: 123 + cr_for_requester: uuid: zzzzz-xvhdp-cr4requestercnt owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz @@ -119,7 +164,7 @@ cr_for_requester2: name: requester_cr2 state: Final priority: 1 - created_at: 2016-01-11 11:11:11.111111111 Z + created_at: <%= 30.minute.ago.to_s(:db) %> updated_at: 2016-01-11 11:11:11.111111111 Z modified_at: 2016-01-11 11:11:11.111111111 Z modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz @@ -151,10 +196,261 @@ running_anonymous_accessible: vcpus: 1 ram: 123 +cr_for_failed: + uuid: zzzzz-xvhdp-cr4failedcontnr + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: cr for container exit code not 0 + state: Committed + priority: 1 + created_at: 2016-01-11 11:11:11.111111111 Z + updated_at: 2016-01-11 11:11:11.111111111 Z + modified_at: 2016-01-11 11:11:11.111111111 Z + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + container_image: test + cwd: test + output_path: test + command: ["echo", "hello"] + container_uuid: zzzzz-dz642-failedcontainr1 + runtime_constraints: + vcpus: 1 + ram: 123 + +canceled_with_queued_container: + uuid: zzzzz-xvhdp-canceledqueuedc + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: canceled with queued container + state: Final + priority: 0 + created_at: 2016-01-11 11:11:11.111111111 Z + updated_at: 2016-01-11 11:11:11.111111111 Z + modified_at: 2016-01-11 11:11:11.111111111 Z + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + container_image: test + cwd: test + output_path: test + command: ["echo", "hello"] + container_uuid: zzzzz-dz642-queuedcontainer + runtime_constraints: + vcpus: 1 + ram: 123 + +canceled_with_locked_container: + uuid: zzzzz-xvhdp-canceledlocekdc + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: canceled with locked container + state: Final + priority: 0 + created_at: 2016-01-11 11:11:11.111111111 Z + updated_at: 2016-01-11 11:11:11.111111111 Z + modified_at: 2016-01-11 11:11:11.111111111 Z + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + container_image: test + cwd: test + output_path: test + command: ["echo", "hello"] + container_uuid: zzzzz-dz642-lockedcontainer + runtime_constraints: + vcpus: 1 + ram: 123 + +canceled_with_running_container: + uuid: zzzzz-xvhdp-canceledrunning + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: canceled with running container + state: Committed + priority: 0 + created_at: 2016-01-11 11:11:11.111111111 Z + updated_at: 2016-01-11 11:11:11.111111111 Z + modified_at: 2016-01-11 11:11:11.111111111 Z + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + container_image: test + cwd: test + output_path: test + command: ["echo", "hello"] + container_uuid: zzzzz-dz642-runningcontainr + runtime_constraints: + vcpus: 1 + ram: 123 + +running_to_be_deleted: + uuid: zzzzz-xvhdp-cr5runningcntnr + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: running to be deleted + state: Committed + priority: 1 + created_at: <%= 2.days.ago.to_s(:db) %> + updated_at: <%= 1.days.ago.to_s(:db) %> + modified_at: <%= 1.days.ago.to_s(:db) %> + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + container_image: test + cwd: test + output_path: test + command: ["echo", "hello"] + container_uuid: zzzzz-dz642-runnincntrtodel + runtime_constraints: + vcpus: 1 + ram: 123 + +completed_with_input_mounts: + uuid: zzzzz-xvhdp-crwithinputmnts + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: completed container request + state: Final + priority: 1 + created_at: <%= 24.hour.ago.to_s(:db) %> + updated_at: <%= 24.hour.ago.to_s(:db) %> + modified_at: <%= 24.hour.ago.to_s(:db) %> + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + container_image: test + cwd: test + output_path: test + command: ["echo", "hello", "/bin/sh", "-c", "'cat' '/keep/fa7aeb5140e2848d39b416daeef4ffc5+45/foobar' '/keep/fa7aeb5140e2848d39b416daeef4ffc5+45/baz' '|' 'gzip' '>' '/dev/null'"] + runtime_constraints: + vcpus: 1 + ram: 123 + container_uuid: zzzzz-dz642-compltcontainer + log_uuid: zzzzz-4zz18-y9vne9npefyxh8g + output_uuid: zzzzz-4zz18-znfnqtbbv4spc3w + mounts: + /var/lib/cwl/cwl.input.json: + content: + input1: + basename: foo + class: File + location: "keep:fa7aeb5140e2848d39b416daeef4ffc5+45/foo" + input2: + basename: bar + class: File + location: "keep:fa7aeb5140e2848d39b416daeef4ffc5+45/bar" + /var/lib/cwl/workflow.json: "keep:1fd08fc162a5c6413070a8bd0bffc818+150" + uncommitted: uuid: zzzzz-xvhdp-cr4uncommittedc owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz name: uncommitted + created_at: <%= 2.minute.ago.to_s(:db) %> + updated_at: <%= 1.minute.ago.to_s(:db) %> + modified_at: <%= 1.minute.ago.to_s(:db) %> + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + command: ["arvados-cwl-runner", "--local", "--api=containers", + "/var/lib/cwl/workflow.json", "/var/lib/cwl/cwl.input.json"] + output_path: "/var/spool/cwl" + cwd: "/var/spool/cwl" + priority: 1 + state: "Uncommitted" + container_image: arvados/jobs + mounts: { + "/var/lib/cwl/workflow.json": { + "kind": "json", + "content": { + "cwlVersion": "v1.0", + "$graph": [{ + "id": "#main", + "class": "CommandLineTool", + "baseCommand": ["echo"], + "inputs": [ + { + "doc": "a longer documentation string for this parameter (optional)", + "type": "boolean", + "id": "ex_boolean", + "label": "a short label for this parameter (optional)", + "inputBinding": {"position": 1} + }, + { + "type": ["null", "boolean"], + "id": "ex_boolean_opt", + "inputBinding": {"position": 1} + }, + { + "doc": "directory selection should present the workbench collection picker", + "type": "Directory", + "id": "ex_dir", + "inputBinding": {"position": 1} + }, + { + "type": "double", + "id": "ex_double", + "inputBinding": {"position": 1} + }, + { + "doc": "file selection should present the workbench file picker", + "type": "File", + "id": "ex_file", + "inputBinding": {"position": 1} + }, + { + "type": "float", + "id": "ex_float", + "inputBinding": {"position": 1} + }, + { + "type": "int", + "id": "ex_int", + "inputBinding": {"position": 1} + }, + { + "type": ["null", "int"], + "id": "ex_int_opt", + "inputBinding": {"position": 1} + }, + { + "type": "long", + "id": "ex_long", + "inputBinding": {"position": 1} + }, + { + "type": "string", + "id": "ex_string", + "inputBinding": {"position": 1} + }, + { + "type": ["null", "string"], + "id": "ex_string_opt", + "inputBinding": {"position": 1} + }, + { + "type": { + "type": "enum", + "symbols": ["a", "b", "c"] + }, + "id": "ex_enum", + "inputBinding": {"position": 1} + }, + { + "type": ["null", { + "type": "enum", + "symbols": ["a", "b", "c"] + }], + "id": "ex_enum_opt", + "inputBinding": {"position": 1} + } + ], + "outputs": [] + }] + } + }, + "/var/lib/cwl/cwl.input.json": { + "kind": "json", + "content": {} + }, + "stdout": { + "kind": "file", + "path": "/var/spool/cwl/cwl.output.json" + }, + "/var/spool/cwl": { + "kind": "collection", + "writable": true + } + } + runtime_constraints: + vcpus: 1 + ram: 256000000 + API: true + +uncommitted_ready_to_run: + uuid: zzzzz-xvhdp-cr4uncommittedd + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: uncommitted_ready_to_run created_at: 2016-01-11 11:11:11.111111111 Z updated_at: 2016-01-11 11:11:11.111111111 Z modified_at: 2016-01-11 11:11:11.111111111 Z @@ -167,97 +463,307 @@ uncommitted: state: "Uncommitted" container_image: arvados/jobs mounts: { - "/var/lib/cwl/workflow.json": { - "kind": "json", - "content": { - "cwlVersion": "v1.0", - "class": "CommandLineTool", - "inputs": [ - { - "doc": "a longer documentation string for this parameter (optional)", - "type": "boolean", - "id": "ex_boolean", - "label": "a short label for this parameter (optional)" + "/var/lib/cwl/workflow.json": { + "kind": "json", + "content": { + "cwlVersion": "v1.0", + "class": "CommandLineTool", + "baseCommand": ["echo"], + "inputs": [ + { + "doc": "a longer documentation string for this parameter (optional)", + "type": "boolean", + "id": "ex_boolean", + "label": "a short label for this parameter (optional)", + "inputBinding": {"position": 1} + }, + { + "type": ["null", "boolean"], + "id": "ex_boolean_opt", + "inputBinding": {"position": 1} + }, + { + "doc": "directory selection should present the workbench collection picker", + "type": "Directory", + "id": "ex_dir", + "inputBinding": {"position": 1} + }, + { + "type": "double", + "id": "ex_double", + "inputBinding": {"position": 1} + }, + { + "doc": "file selection should present the workbench file picker", + "type": "File", + "id": "ex_file", + "inputBinding": {"position": 1} + }, + { + "type": "float", + "id": "ex_float", + "inputBinding": {"position": 1} + }, + { + "type": "int", + "id": "ex_int", + "inputBinding": {"position": 1} + }, + { + "type": ["null", "int"], + "id": "ex_int_opt", + "inputBinding": {"position": 1} + }, + { + "type": "long", + "id": "ex_long", + "inputBinding": {"position": 1} + }, + { + "type": "string", + "id": "ex_string", + "inputBinding": {"position": 1} + }, + { + "type": ["null", "string"], + "id": "ex_string_opt", + "inputBinding": {"position": 1} + }, + { + "type": { + "type": "enum", + "symbols": ["a", "b", "c"] + }, + "id": "ex_enum", + "inputBinding": {"position": 1} + }, + { + "type": ["null", { + "type": "enum", + "symbols": ["a", "b", "c"] + }], + "id": "ex_enum_opt", + "inputBinding": {"position": 1} + } + ], + "outputs": [] + } + }, + "/var/lib/cwl/cwl.input.json": { + "kind": "json", + "content": { + "ex_string_opt": null, + "ex_int_opt": null, + "ex_boolean": false, + "ex_boolean_opt": true, + "ex_dir": { + "class": "Directory", + "location": "keep:1f4b0bc7583c2a7f9102c395f4ffc5e3+45", + "arv:collection": "zzzzz-4zz18-znfnqtbbv4spc3w" + }, + "ex_double": 66.0, + "ex_file": { + "class": "File", + "location": "keep:1f4b0bc7583c2a7f9102c395f4ffc5e3+45/foo", + "arv:collection": "zzzzz-4zz18-znfnqtbbv4spc3w/foo" + }, + "ex_float": 55.0, + "ex_int": 55, + "ex_long": 22, + "ex_string": "qq", + "ex_enum": "a" + } }, - { - "doc": "directory selection should present the workbench collection picker", - "type": "Directory", - "id": "ex_dir" + "stdout": { + "kind": "file", + "path": "/var/spool/cwl/cwl.output.json" }, - { - "type": "double", - "id": "ex_double" + "/var/spool/cwl": { + "kind": "collection", + "writable": true + } + } + runtime_constraints: + vcpus: 1 + ram: 256000000 + API: true + +uncommitted-with-directory-input: + uuid: zzzzz-xvhdp-cr4uncommitted2 + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: uncommitted with directory input + created_at: 2016-01-11 11:11:11.111111111 Z + updated_at: 2016-01-11 11:11:11.111111111 Z + modified_at: 2016-01-11 11:11:11.111111111 Z + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + command: ["arvados-cwl-runner", "--local", "--api=containers", + "/var/lib/cwl/workflow.json", "/var/lib/cwl/cwl.input.json"] + output_path: "/var/spool/cwl" + cwd: "/var/spool/cwl" + priority: 1 + state: Uncommitted + container_image: fa3c1a9cb6783f85f2ecda037e07b8c3+167 + mounts: { + "/var/lib/cwl/workflow.json": { + "kind": "json", + "content": { + "cwlVersion": "v1.0", + "class": "CommandLineTool", + "baseCommand": ["echo"], + "inputs": [ + { + "type": "Directory", + "id": "directory_type", + "inputBinding": {"position": 1} + } + ], + "outputs": [] + } }, - { - "doc": "file selection should present the workbench file picker", - "type": "File", - "id": "ex_file" + "/var/lib/cwl/cwl.input.json": { + "kind": "json", + "content": {} }, - { - "doc": "any parameter can be turned into an array with {\"type\": \"array\", \"items\": \"the_type\"}\n", - "type": { - "items": "File", - "type": "array" - }, - "id": "ex_file_array" + "stdout": { + "kind": "file", + "path": "/var/spool/cwl/cwl.output.json" }, - { - "type": "float", - "id": "ex_float" + "/var/spool/cwl": { + "kind": "collection", + "writable": true + } + } + runtime_constraints: + vcpus: 1 + ram: 256000000 + API: true + +uncommitted-with-file-input: + uuid: zzzzz-xvhdp-cr4uncommittedf + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: uncommitted with directory input + created_at: 2016-01-11 11:11:11.111111111 Z + updated_at: 2016-01-11 11:11:11.111111111 Z + modified_at: 2016-01-11 11:11:11.111111111 Z + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + command: ["arvados-cwl-runner", "--local", "--api=containers", + "/var/lib/cwl/workflow.json", "/var/lib/cwl/cwl.input.json"] + output_path: "/var/spool/cwl" + cwd: "/var/spool/cwl" + priority: 1 + state: Uncommitted + container_image: fa3c1a9cb6783f85f2ecda037e07b8c3+167 + mounts: { + "/var/lib/cwl/workflow.json": { + "kind": "json", + "content": { + "cwlVersion": "v1.0", + "class": "CommandLineTool", + "baseCommand": ["echo"], + "inputs": [ + { + "type": "File", + "id": "file_type", + "inputBinding": {"position": 1} + } + ], + "outputs": [] + } }, - { - "type": "int", - "id": "ex_int" + "/var/lib/cwl/cwl.input.json": { + "kind": "json", + "content": {} }, - { - "type": "long", - "id": "ex_long" + "stdout": { + "kind": "file", + "path": "/var/spool/cwl/cwl.output.json" }, - { - "doc": "any parameter can be turned into an optional array with [\"null\", {\"type\": \"array\", \"items\": \"the_type\"}\n", - "type": [ - "null", - { - "items": "File", - "type": "array" + "/var/spool/cwl": { + "kind": "collection", + "writable": true + } + } + runtime_constraints: + vcpus: 1 + ram: 256000000 + API: true + +uncommitted-with-required-and-optional-inputs: + uuid: zzzzz-xvhdp-cr4uncommitted3 + owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz + name: uncommitted with required and optional inputs + created_at: 2016-01-11 11:11:11.111111111 Z + updated_at: 2016-01-11 11:11:11.111111111 Z + modified_at: 2016-01-11 11:11:11.111111111 Z + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + command: ["arvados-cwl-runner", "--local", "--api=containers", + "/var/lib/cwl/workflow.json", "/var/lib/cwl/cwl.input.json"] + output_path: "/var/spool/cwl" + cwd: "/var/spool/cwl" + priority: 1 + state: Uncommitted + container_image: fa3c1a9cb6783f85f2ecda037e07b8c3+167 + mounts: { + "/var/lib/cwl/workflow.json": { + "kind": "json", + "content": { + "cwlVersion": "v1.0", + "class": "CommandLineTool", + "baseCommand": ["echo"], + "inputs": [ + { + "type": "int", + "id": "int_required", + "inputBinding": {"position": 1} + }, + { + "type": ["null", "int"], + "id": "int_optional", + "inputBinding": {"position": 1} + } + ], + "outputs": [] } - ], - "id": "ex_opt_file_array" }, - { - "doc": "any parameter can be made optional by providing a union of [\"null\", \"the_type\"]\n", - "type": [ - "null", - "string" - ], - "id": "ex_opt_string" + "/var/lib/cwl/cwl.input.json": { + "kind": "json", + "content": {} }, - { - "type": "string", - "id": "ex_string" + "stdout": { + "kind": "file", + "path": "/var/spool/cwl/cwl.output.json" + }, + "/var/spool/cwl": { + "kind": "collection", + "writable": true } - ], - "outputs": [] - }, - }, - "/var/lib/cwl/cwl.input.json": { - "kind": "json", - "content": {} - }, - "stdout": { - "kind": "file", - "path": "/var/spool/cwl/cwl.output.json" - }, - "/var/spool/cwl": { - "kind": "collection", - "writable": True } - } runtime_constraints: vcpus: 1 ram: 256000000 API: true +cr_in_trashed_project: + uuid: zzzzz-xvhdp-cr5trashedcontr + owner_uuid: zzzzz-j7d0g-trashedproject1 + name: completed container request + state: Final + priority: 1 + created_at: <%= 2.minute.ago.to_s(:db) %> + updated_at: <%= 1.minute.ago.to_s(:db) %> + modified_at: <%= 1.minute.ago.to_s(:db) %> + modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz + container_image: test + cwd: test + output_path: test + command: ["echo", "hello"] + container_uuid: zzzzz-dz642-compltcontainer + log_uuid: zzzzz-4zz18-y9vne9npefyxh8g + output_uuid: zzzzz-4zz18-znfnqtbbv4spc3w + runtime_constraints: + vcpus: 1 + ram: 123 + # Test Helper trims the rest of the file