Skip to content

Commit

Permalink
Merge pull request #121 from FredHutch/create-pull-request/rewrite-ca…
Browse files Browse the repository at this point in the history
…ssettes

Update vcr cassettes
  • Loading branch information
sckott authored Feb 27, 2025
2 parents fb99a6d + 89dca5a commit 4204a9b
Show file tree
Hide file tree
Showing 17 changed files with 6,933 additions and 2,689 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,54 @@
interactions:
- request:
body: "--a140cd8d08d737fbd07610f0ad944f32\r\nContent-Disposition: form-data; name=\"workflowSource\";
body: "--397e6661ac49a36ef69277156bedaa63\r\nContent-Disposition: form-data; name=\"workflowSource\";
filename=\"helloDockerHostname.wdl\"\r\nContent-Type: application/octet-stream\r\n\r\nversion
1.0\n## This is a test workflow that returns the hostname of the node \n## the
job is submitted to as a test for Docker functionality on Gizmo.\n\n#### WORKFLOW
DEFINITION\n\nworkflow HelloDockerHostname {\n call Hostname {\n }\n\n output
{\n File stdout = Hostname.out\n }\n\n parameter_meta {\n stdout: \"hostname
of the node the job was submitted to\"\n }\n}\n\n#### TASK DEFINITIONS\n\ntask
Hostname {\n command <<<\n echo $(hostname)\n >>>\n\n output {\n File
out = stdout()\n }\n\n runtime {\n cpu: 1\n memory: \"1 GB\"\n docker:
\"ubuntu:latest\"\n }\n\n parameter_meta {\n out: \"hostname of the node
the job was submitted to\"\n }\n}\n\r\n--a140cd8d08d737fbd07610f0ad944f32\r\nContent-Disposition:
1.0\n## This is a test workflow that returns the Docker image name and tag\n##
and measures execution time of the Hostname task.\n\n#### WORKFLOW DEFINITION\n\nworkflow
HelloDockerHostname {\n input {\n String docker_image = \"ubuntu:20.04\"
\ # Default value but can be overridden\n }\n\n call GetStartTime\n\n call
Hostname {\n input:\n expected_image = docker_image,\n start_time
= GetStartTime.timestamp # Add dependency on start time\n }\n\n call GetEndTime
{\n input:\n hostname_done = Hostname.out # Add dependency on Hostname
completion\n }\n\n call ValidateExecutionTime {\n input:\n start_time
= GetStartTime.timestamp,\n end_time = GetEndTime.timestamp\n }\n\n output
{\n File stdout = Hostname.out\n Float execution_time_seconds = ValidateExecutionTime.duration_seconds\n
\ Boolean within_time_limit = ValidateExecutionTime.within_limit\n }\n\n
\ parameter_meta {\n docker_image: \"Docker image to run the task in (e.g.
ubuntu:latest)\"\n }\n}\n\n#### TASK DEFINITIONS\n\ntask GetStartTime {\n command
<<<\n date +%s.%N\n >>>\n\n output {\n Float timestamp = read_float(stdout())\n
\ }\n\n runtime {\n docker: \"ubuntu:20.04\"\n cpu: 1\n memory: \"1
GB\"\n }\n}\n\ntask GetEndTime {\n input {\n File hostname_done # Add
dependency on Hostname completion\n }\n\n command <<<\n date +%s.%N\n >>>\n\n
\ output {\n Float timestamp = read_float(stdout())\n }\n\n runtime {\n
\ docker: \"ubuntu:20.04\"\n cpu: 1\n memory: \"1 GB\"\n }\n}\n\ntask
ValidateExecutionTime {\n input {\n Float start_time\n Float end_time\n
\ }\n\n command <<<\n # Calculate duration using awk for floating point
arithmetic\n duration=$(awk \"BEGIN {print ~{end_time} - ~{start_time}}\")\n
\ echo \"$duration\" > duration.txt\n \n # Check if duration is less
than 120 seconds (2 minutes)\n awk -v dur=\"$duration\" 'BEGIN {if (dur <
120) exit 0; exit 1}'\n if [ $? -eq 0 ]; then\n echo \"true\" > within_limit.txt\n
\ else\n echo \"false\" > within_limit.txt\n fi\n >>>\n\n output
{\n Float duration_seconds = read_float(\"duration.txt\")\n Boolean within_limit
= read_boolean(\"within_limit.txt\")\n }\n\n runtime {\n docker: \"ubuntu:20.04\"\n
\ cpu: 1\n memory: \"1 GB\"\n }\n}\n\ntask Hostname {\n input {\n String
expected_image\n Float start_time # Add start_time as input to create dependency\n
\ }\n\n command <<<\n # Split expected image into name and tag\n EXPECTED_IMAGE_NAME=$(echo
\"~{expected_image}\" | cut -d':' -f1)\n EXPECTED_TAG=$(echo \"~{expected_image}\"
| cut -d':' -f2)\n\n # Get current image info\n CURRENT_IMAGE=$(grep \"ID=\"
/etc/os-release | head -n1 | cut -d'=' -f2)\n CURRENT_VERSION=$(grep \"VERSION_ID=\"
/etc/os-release | cut -d'\"' -f2)\n\n # Compare image name\n if [[ \"$CURRENT_IMAGE\"
!= \"$EXPECTED_IMAGE_NAME\" ]]; then\n echo \"Error: Expected Docker image
$EXPECTED_IMAGE_NAME but got: $CURRENT_IMAGE\"\n exit 1\n fi\n\n #
Compare version/tag\n if [[ \"$CURRENT_VERSION\" != \"$EXPECTED_TAG\" ]];
then\n echo \"Error: Expected version $EXPECTED_TAG but got: $CURRENT_VERSION\"\n
\ exit 1\n fi\n\n echo \"Verified Docker Image: $CURRENT_IMAGE:$CURRENT_VERSION\"\n
\ echo \"Expected Image: ~{expected_image}\"\n echo \"Hostname: $(hostname)\"\n
\ >>>\n\n output {\n File out = stdout()\n }\n\n runtime {\n cpu: 1\n
\ memory: \"1 GB\"\n docker: \"~{expected_image}\"\n }\n\n parameter_meta
{\n expected_image: \"Docker image that should be running this task\"\n }\n}\n\r\n--397e6661ac49a36ef69277156bedaa63\r\nContent-Disposition:
form-data; name=\"workflowOptions\"; filename=\"options.json\"\r\nContent-Type:
application/json\r\n\r\n{\n \"workflow_failure_mode\": \"ContinueWhilePossible\",\n
\ \"write_to_cache\": false,\n \"read_from_cache\": false\n}\n\r\n--a140cd8d08d737fbd07610f0ad944f32--\r\n"
\ \"write_to_cache\": false,\n \"read_from_cache\": false\n}\n\r\n--397e6661ac49a36ef69277156bedaa63--\r\n"
headers:
accept:
- '*/*'
Expand All @@ -22,18 +57,18 @@ interactions:
connection:
- keep-alive
content-length:
- '1120'
- '3904'
content-type:
- multipart/form-data; boundary=a140cd8d08d737fbd07610f0ad944f32
- multipart/form-data; boundary=397e6661ac49a36ef69277156bedaa63
host:
- gizmok96.fhcrc.org:38031
- gizmok92.fhcrc.org:38409
user-agent:
- python-httpx/0.28.1
method: POST
uri: https://gizmok96.fhcrc.org:38031/api/workflows/v1
uri: https://gizmok92.fhcrc.org:38409/api/workflows/v1
response:
body:
string: '{"id":"8c838f7b-f771-4cc5-94bc-a509f26dbcf0","status":"Submitted"}'
string: '{"id":"7253aa1c-0570-4bc9-8f0f-0739c610769c","status":"Submitted"}'
headers:
Connection:
- keep-alive
Expand All @@ -42,7 +77,7 @@ interactions:
Content-Type:
- application/json
Date:
- Tue, 28 Jan 2025 19:20:42 GMT
- Wed, 26 Feb 2025 22:22:24 GMT
Server:
- nginx/1.25.3
status:
Expand All @@ -60,14 +95,14 @@ interactions:
content-length:
- '0'
host:
- gizmok96.fhcrc.org:38031
- gizmok92.fhcrc.org:38409
user-agent:
- python-httpx/0.28.1
method: POST
uri: https://gizmok96.fhcrc.org:38031/api/workflows/v1/8c838f7b-f771-4cc5-94bc-a509f26dbcf0/abort
uri: https://gizmok92.fhcrc.org:38409/api/workflows/v1/7253aa1c-0570-4bc9-8f0f-0739c610769c/abort
response:
body:
string: '{"id":"8c838f7b-f771-4cc5-94bc-a509f26dbcf0","status":"Aborted"}'
string: '{"id":"7253aa1c-0570-4bc9-8f0f-0739c610769c","status":"Aborted"}'
headers:
Connection:
- keep-alive
Expand All @@ -76,7 +111,7 @@ interactions:
Content-Type:
- application/json
Date:
- Tue, 28 Jan 2025 19:20:42 GMT
- Wed, 26 Feb 2025 22:22:24 GMT
Server:
- nginx/1.25.3
status:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: "--35d29ba0213e6a30bee8707a58c65735\r\nContent-Disposition: form-data; name=\"workflowSource\";
body: "--9f6edb399e3f110030bc48b85f81c30e\r\nContent-Disposition: form-data; name=\"workflowSource\";
filename=\"helloHostname.wdl\"\r\nContent-Type: application/octet-stream\r\n\r\nversion
1.0\n## This is a test workflow that returns the hostname of the node \n## the
job is submitted to as a test for the Gizmo backend. \n\n#### WORKFLOW DEFINITION\n\nworkflow
Expand All @@ -9,10 +9,10 @@ interactions:
to\"\n }\n}\n\n#### TASK DEFINITIONS\n\ntask Hostname {\n command <<<\n echo
$(hostname)\n >>>\n\n output {\n File out = stdout()\n }\n \n runtime
{\n cpu: 1\n memory: \"1 GB\"\n }\n\n parameter_meta {\n out: \"hostname
of the node the job was submitted to\"\n }\n}\n\r\n--35d29ba0213e6a30bee8707a58c65735\r\nContent-Disposition:
of the node the job was submitted to\"\n }\n}\n\r\n--9f6edb399e3f110030bc48b85f81c30e\r\nContent-Disposition:
form-data; name=\"workflowOptions\"; filename=\"options.json\"\r\nContent-Type:
application/json\r\n\r\n{\n \"workflow_failure_mode\": \"ContinueWhilePossible\",\n
\ \"write_to_cache\": false,\n \"read_from_cache\": false\n}\n\r\n--35d29ba0213e6a30bee8707a58c65735--\r\n"
\ \"write_to_cache\": false,\n \"read_from_cache\": false\n}\n\r\n--9f6edb399e3f110030bc48b85f81c30e--\r\n"
headers:
accept:
- '*/*'
Expand All @@ -23,16 +23,16 @@ interactions:
content-length:
- '1071'
content-type:
- multipart/form-data; boundary=35d29ba0213e6a30bee8707a58c65735
- multipart/form-data; boundary=9f6edb399e3f110030bc48b85f81c30e
host:
- gizmok96.fhcrc.org:38031
- gizmok92.fhcrc.org:38409
user-agent:
- python-httpx/0.28.1
method: POST
uri: https://gizmok96.fhcrc.org:38031/api/workflows/v1
uri: https://gizmok92.fhcrc.org:38409/api/workflows/v1
response:
body:
string: '{"id":"ec04a1f3-7ae5-4ab9-9b96-44ccd289d02e","status":"Submitted"}'
string: '{"id":"b981a95e-26bf-438b-9f73-18de960295b2","status":"Submitted"}'
headers:
Connection:
- keep-alive
Expand All @@ -41,7 +41,7 @@ interactions:
Content-Type:
- application/json
Date:
- Tue, 28 Jan 2025 19:20:42 GMT
- Wed, 26 Feb 2025 22:22:24 GMT
Server:
- nginx/1.25.3
status:
Expand All @@ -59,14 +59,14 @@ interactions:
content-length:
- '0'
host:
- gizmok96.fhcrc.org:38031
- gizmok92.fhcrc.org:38409
user-agent:
- python-httpx/0.28.1
method: POST
uri: https://gizmok96.fhcrc.org:38031/api/workflows/v1/ec04a1f3-7ae5-4ab9-9b96-44ccd289d02e/abort
uri: https://gizmok92.fhcrc.org:38409/api/workflows/v1/b981a95e-26bf-438b-9f73-18de960295b2/abort
response:
body:
string: '{"id":"ec04a1f3-7ae5-4ab9-9b96-44ccd289d02e","status":"Aborted"}'
string: '{"id":"b981a95e-26bf-438b-9f73-18de960295b2","status":"Aborted"}'
headers:
Connection:
- keep-alive
Expand All @@ -75,7 +75,7 @@ interactions:
Content-Type:
- application/json
Date:
- Tue, 28 Jan 2025 19:20:42 GMT
- Wed, 26 Feb 2025 22:22:24 GMT
Server:
- nginx/1.25.3
status:
Expand Down
Loading

0 comments on commit 4204a9b

Please sign in to comment.