diff --git a/DESCRIPTION b/DESCRIPTION index 53a4e01..f2c575a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: rcromwell Title: Convenience Tools for Managing WDL Workflows via Cromwell -Version: 3.2.5 +Version: 3.3.0 Authors@R: c( person("Amy", "Paguirigan", role = "aut", comment = c(ORCID = "0000-0002-6819-9736")), @@ -12,30 +12,28 @@ URL: https://getwilds.org/rcromwell, https://github.com/getwilds/rcromwell BugReports: https://github.com/getwilds/rcromwell/issues Description: A repo containing a basic R package for using Cromwell with WDL workflows via R. Imports: - httr, jsonlite, dplyr, purrr, tidyr, lubridate, rlang, - glue + glue, + curl, + httr2 License: MIT + file LICENSE -Depends: R (>= 3.6.0) +Depends: R (>= 4.1.0) Roxygen: list(markdown = TRUE, roclets = c("collate", "namespace", "rd", "roxyglobals::global_roclet")) RoxygenNote: 7.3.2 Encoding: UTF-8 Suggests: - curl, knitr, rmarkdown, roxyglobals, testthat (>= 3.0.0), - vcr (>= 0.6.0), - webmockr -Remotes: - ropensci/vcr + vcr (>= 1.6.0), + webmockr (>= 1.0.0) Config/testthat/edition: 3 Config/roxyglobals/filename: globals.R Config/roxyglobals/unique: FALSE diff --git a/NAMESPACE b/NAMESPACE index 9bda273..53a6f97 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -19,18 +19,21 @@ export(cromwell_workflow) export(cw_url) export(workflow_inputs) export(workflow_options) +importFrom(curl,form_file) importFrom(dplyr,"%>%") importFrom(dplyr,any_of) importFrom(dplyr,as_tibble) importFrom(dplyr,relocate) importFrom(dplyr,tibble) importFrom(glue,glue) -importFrom(httr,GET) -importFrom(httr,POST) -importFrom(httr,content) -importFrom(httr,status_code) -importFrom(httr,stop_for_status) -importFrom(httr,upload_file) +importFrom(httr2,req_body_multipart) +importFrom(httr2,req_error) +importFrom(httr2,req_headers) +importFrom(httr2,req_method) +importFrom(httr2,req_perform) +importFrom(httr2,req_url_query) +importFrom(httr2,request) +importFrom(httr2,resp_body_json) importFrom(jsonlite,fromJSON) importFrom(lubridate,now) importFrom(lubridate,with_tz) @@ -43,7 +46,6 @@ importFrom(purrr,map_dfr) importFrom(purrr,pluck) importFrom(purrr,reduce) importFrom(rlang,abort) -importFrom(rlang,caller_env) importFrom(rlang,has_name) importFrom(rlang,is_character) importFrom(rlang,is_logical) diff --git a/NEWS.md b/NEWS.md index 1f2a213..db8e926 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# rcromwell 3.3.0 + +* Swapping `httr` for `httr2` and fixing styling (@sckott in [#48](https://github.com/getwilds/rcromwell/pull/48)) + # rcromwell 3.2.5 * gains new function `cromwell_labels` that hits the `/labels` route (#43) (#45) diff --git a/R/cromwellAbort.R b/R/cromwellAbort.R index 4e16035..dc2220b 100644 --- a/R/cromwellAbort.R +++ b/R/cromwellAbort.R @@ -9,8 +9,10 @@ cromwell_abort <- function(workflow_id, url = cw_url(), token = NULL) { check_url(url) crom_mssg("Aborting job in Cromwell") - http_post(make_url(url, "api/workflows/v1", workflow_id, "abort"), + http_req_post( + url = make_url(url, "api/workflows/v1", workflow_id, "abort"), token = token - ) %>% + ) |> + http_perform() |> dplyr::as_tibble() } diff --git a/R/cromwellBackends.R b/R/cromwellBackends.R index 17ea601..8be0918 100644 --- a/R/cromwellBackends.R +++ b/R/cromwellBackends.R @@ -8,7 +8,11 @@ cromwell_backends <- function(url = cw_url(), token = NULL) { check_url(url) crom_mssg("Getting backend options from Cromwell") - all <- http_get(make_url(url, "api/workflows/v1/backends"), token = token) + all <- http_req_get( + url = make_url(url, "api/workflows/v1/backends"), + token = token + ) |> + http_perform() all$supportedBackends <- unlist(all$supportedBackends) return(all) } diff --git a/R/cromwellCache.R b/R/cromwellCache.R index cd50b21..9b920b2 100644 --- a/R/cromwellCache.R +++ b/R/cromwellCache.R @@ -20,12 +20,12 @@ cromwell_cache <- function(workflow_id, url = cw_url(), token = NULL) { } cromwell_cache_http <- function(workflow_id, url = cw_url(), token = NULL) { - http_get( + http_req_get( url = make_url(url, "api/workflows/v1", workflow_id, "metadata"), - query = list(expandSubWorkflows = "false"), - as = "parsed", token = token - ) + ) |> + req_url_query(expandSubWorkflows = "false") |> + http_perform() } #' @autoglobal @@ -50,7 +50,7 @@ cromwell_cache_process <- function(crommetadata, workflow_id) { # add the shard Index associated b$shardIndex <- shard_data$shardIndex } else { - b <- dplyr::as_tibble("shardIndex" = shard_data$shardIndex) + b <- dplyr::tibble("shardIndex" = shard_data$shardIndex) } b$shardIndex <- as.character(b$shardIndex) b$workflow_id <- workflow_id diff --git a/R/cromwellCall.R b/R/cromwellCall.R index ca3b45d..23deb87 100644 --- a/R/cromwellCall.R +++ b/R/cromwellCall.R @@ -27,12 +27,12 @@ cromwell_call <- function(workflow_id, url = cw_url(), token = NULL) { check_url(url) crom_mssg(glue("Querying for call metadata for workflow id: {workflow_id}")) crommetadata <- - http_get( + http_req_get( url = make_url(url, "api/workflows/v1", workflow_id, "metadata"), - query = list(expandSubWorkflows = "true"), - as = "parsed", token = token - ) + ) |> + req_url_query(expandSubWorkflows = "true") |> + http_perform() # if the response is a character vector, then return it and stop if (is.character(crommetadata)) stop(crommetadata) # if the response is a list, meaning it has some content, continue diff --git a/R/cromwellFailures.R b/R/cromwellFailures.R index 77bccb1..53abe84 100644 --- a/R/cromwellFailures.R +++ b/R/cromwellFailures.R @@ -25,12 +25,12 @@ cromwell_failures <- function(workflow_id, url = cw_url(), token = NULL) { )) response <- - http_get( + http_req_get( url = make_url(url, "api/workflows/v1", workflow_id, "metadata"), - query = list(includeKey = "failures", includeKey = "jobId"), - as = "parsed", token = token - ) + ) |> + req_url_query(includeKey = "failures", includeKey = "jobId") |> + http_perform() cromwell_failures_process(response, workflow_id) } diff --git a/R/cromwellGlob.R b/R/cromwellGlob.R index 98fe943..2f3ed65 100644 --- a/R/cromwellGlob.R +++ b/R/cromwellGlob.R @@ -30,10 +30,7 @@ cromwell_glob <- function( check_url(url) crom_mssg(glue("Querying for metadata for workflow id: {workflow_id}")) url <- make_url(url, "api/workflows/v1", workflow_id, "metadata") - http_get( - url = url, - query = list(expandSubWorkflows = tolower(expand_sub_workflows)), - as = "parsed", - token = token - ) + http_req_get(url = url, token = token) |> + req_url_query(expandSubWorkflows = tolower(expand_sub_workflows)) |> + http_perform() } diff --git a/R/cromwellJobs.R b/R/cromwellJobs.R index 37de511..7f23100 100644 --- a/R/cromwellJobs.R +++ b/R/cromwellJobs.R @@ -34,10 +34,12 @@ cromwell_jobs <- function(days = 1, check_url(url) crom_mssg(glue("Querying cromwell for jobs in the last {days} days")) query <- cromwell_jobs_query(days, workflow_name, workflow_status) - jobs_data <- http_get( - make_url(url, "api/workflows/v1/query"), - query = query, token = token - ) + jobs_data <- http_req_get( + url = make_url(url, "api/workflows/v1/query"), + token = token + ) |> + req_url_query(!!!query) |> + http_perform() cromwell_jobs_process(jobs_data$results) } diff --git a/R/cromwellLogs.R b/R/cromwellLogs.R index 1aaf010..67499db 100644 --- a/R/cromwellLogs.R +++ b/R/cromwellLogs.R @@ -20,16 +20,16 @@ cromwell_logs <- function(workflow_id, url = cw_url(), token = NULL) { } cromwell_logs_query <- function(workflow_id, url = cw_url(), token = NULL) { - http_get( + http_req_get( url = make_url( url, "api/workflows/v1", workflow_id, "logs" ), - as = "parsed", token = token - ) + ) |> + http_perform() } cromwell_logs_process <- function(response, workflow_id) { diff --git a/R/cromwellOutputs.R b/R/cromwellOutputs.R index 124bf84..4315095 100644 --- a/R/cromwellOutputs.R +++ b/R/cromwellOutputs.R @@ -19,7 +19,7 @@ cromwell_outputs <- function(workflow_id, url = cw_url(), token = NULL) { } cromwell_outputs_query <- function(workflow_id, url = cw_url(), token = NULL) { - http_get( + http_req_get( url = make_url( url, @@ -27,9 +27,9 @@ cromwell_outputs_query <- function(workflow_id, url = cw_url(), token = NULL) { workflow_id, "outputs" ), - as = "parsed", token = token - ) + ) |> + http_perform() } #' @autoglobal diff --git a/R/cromwellSubmitBatch.R b/R/cromwellSubmitBatch.R index d5796fc..4f04ed3 100644 --- a/R/cromwellSubmitBatch.R +++ b/R/cromwellSubmitBatch.R @@ -43,7 +43,7 @@ cromwell_submit_batch_query <- function( ) } body <- list( - workflowSource = httr::upload_file(wdl) + workflowSource = curl::form_file(wdl) ) if (!is.null(params) && !is.null(batch)) { @@ -78,10 +78,10 @@ cromwell_submit_batch_query <- function( } cromwell_submit_batch_http <- function(body, url, token) { - http_post( + http_req_post( url = make_url(url, "api/workflows/v1"), - body = body, - encode = "multipart", token = token - ) + ) |> + req_body_multipart(!!!body) |> + http_perform() } diff --git a/R/cromwellTiming.R b/R/cromwellTiming.R index a629509..11cfc07 100644 --- a/R/cromwellTiming.R +++ b/R/cromwellTiming.R @@ -6,19 +6,17 @@ #' supplied set the url as the env var `CROMWELLURL` #' @inheritSection workflow_options Important #' @author Amy Paguirigan, Scott Chamberlain -#' @details Internally this function uses [httr::BROWSE()] which uses -#' [utils::browseURL()] - if a auth header is required you'll have to -#' do that manually +#' @details Internally this function uses [utils::browseURL()] - if an +#' auth header is required you'll have to do that manually #' @return Opens a timing diagram in a browser cromwell_timing <- function(workflow_id, url = cw_url()) { check_url(url) crom_mssg("Getting timing diagram from Cromwell") - httr::BROWSE( - make_url( - url, - "api/workflows/v1", - workflow_id, - "timing" - ) + url <- make_url( + url, + "api/workflows/v1", + workflow_id, + "timing" ) + browse(url) } diff --git a/R/cromwellValidate.R b/R/cromwellValidate.R index cf7a84a..05dcf82 100644 --- a/R/cromwellValidate.R +++ b/R/cromwellValidate.R @@ -15,18 +15,18 @@ cromwell_validate <- function( check_url(url) crom_mssg("Validating a workflow for Cromwell") - body <- list(workflowSource = httr::upload_file(wdl)) + body <- list(workflowSource = curl::form_file(wdl)) if (!is.null(all_inputs)) { body <- c( body, - workflowInputs = list(httr::upload_file(all_inputs)) + workflowInputs = list(curl::form_file(all_inputs)) ) } - http_post( + http_req_post( url = make_url(url, "api/womtool/v1/describe"), - body = body, - encode = "multipart", token = token - ) + ) |> + req_body_multipart(!!!body) |> + http_perform() } diff --git a/R/cromwellVersion.R b/R/cromwellVersion.R index be88094..f41a1eb 100644 --- a/R/cromwellVersion.R +++ b/R/cromwellVersion.R @@ -7,5 +7,6 @@ #' @return (character) the Cromwell version cromwell_version <- function(url = cw_url(), token = NULL) { check_url(url) - http_get(make_url(url, "engine/v1/version"), token = token) + http_req_get(url = make_url(url, "engine/v1/version"), token = token) |> + http_perform() } diff --git a/R/cromwellWorkflow.R b/R/cromwellWorkflow.R index 33b783d..4ef3fc7 100644 --- a/R/cromwellWorkflow.R +++ b/R/cromwellWorkflow.R @@ -27,12 +27,12 @@ cromwell_workflow <- function(workflow_id, url = cw_url(), token = NULL) { } cromwell_workflow_http <- function(workflow_id, url, token) { - http_get( + http_req_get( url = make_url(url, "api/workflows/v1", workflow_id, "metadata"), - query = list(expandSubWorkflows = "false", excludeKey = "calls"), - as = "parsed", token = token - ) + ) |> + req_url_query(expandSubWorkflows = "false", excludeKey = "calls") |> + http_perform() } cromwell_workflow_process <- function(meta, workflow_id) { diff --git a/R/http.R b/R/http.R index 1052558..0130095 100644 --- a/R/http.R +++ b/R/http.R @@ -5,45 +5,35 @@ cw_url <- function() { Sys.getenv("CROMWELLURL") } -con_utf8 <- function(response, as = NULL, ...) { - httr::content(response, as = as, encoding = "utf-8", ...) -} - #' @importFrom rlang has_name -#' @importFrom httr status_code -#' @importFrom rlang abort caller_env -handle_error <- function(response, call = caller_env()) { - status <- httr::status_code(response) - if (status >= 400) { - err <- con_utf8(response, as = "parsed") - if (rlang::has_name(err, "error")) { - mssg <- err$error - } else if (rlang::has_name(err, "message")) { - mssg <- err$message - } else { - httr::stop_for_status(response) - } - abort( - sprintf("(HTTP %s) - %s", as.character(status), mssg), - call = call - ) +error_body <- function(response) { + parsed <- resp_body_json(response) + mssg <- if (rlang::has_name(parsed, "error")) { + parsed$error + } else if (rlang::has_name(parsed, "message")) { + parsed$message + } else { + "None" } + glue::glue("Additional context: {mssg}") } -#' @importFrom httr GET POST stop_for_status content upload_file -#' @noRd -#' @keywords internal -#' @author Scott Chamberlain -http_get <- function(url, as = NULL, token = NULL, call = caller_env(), ...) { - result <- httr::GET(url, try_auth_header(token), ...) - handle_error(result, call) - con_utf8(result, as = as) +http_req_get <- function(url, token = NULL) { + request(url) |> + try_auth_header(token) |> + req_error(body = error_body) +} + +http_req_post <- function(url, token = NULL) { + request(url) |> + req_method("POST") |> + try_auth_header(token) |> + req_error(body = error_body) } -http_post <- function(url, as = NULL, token = NULL, call = caller_env(), ...) { - result <- httr::POST(url, try_auth_header(token), ...) - handle_error(result, call) - con_utf8(result, as = as) +http_perform <- function(request) { + req_perform(request) |> + resp_body_json() } make_url <- function(base_url, ...) { @@ -73,14 +63,17 @@ token_finder <- function(token = NULL) { #' Add Authorization header #' +#' @param .req An `httr2` request #' @param token (character) a Bearer token. optional. if nothing #' passed, we look for the env var PROOF_TOKEN #' @keywords internal -#' @return A `request` S3 class with the HTTP header that can be passed -#' to `httr::GET()`, `httr::POST()`, etc. -try_auth_header <- function(token = NULL) { +#' @return An `httr2_request` S3 class adding an HTTP header for +#' `Authorization` with the value in `token` +try_auth_header <- function(.req, token = NULL) { token <- token_finder(token) if (nzchar(token)) { - httr::add_headers(Authorization = paste0("Bearer ", token)) + req_headers(.req, Authorization = paste0("Bearer ", token)) + } else { + .req } } diff --git a/R/labels.R b/R/labels.R index b8a4899..f54e99c 100644 --- a/R/labels.R +++ b/R/labels.R @@ -3,19 +3,14 @@ #' @export #' @template workflowid #' @template serverdeets -#' @return a named list of workflow labels +#' @return a named list of labels cromwell_labels <- function(workflow_id, url = cw_url(), token = NULL) { check_url(url) - response <- http_get( - url = make_url( - url, - "api/workflows/v1", - workflow_id, - "labels" - ), - as = "parsed", + response <- http_req_get( + url = make_url(url, "api/workflows/v1", workflow_id, "labels"), token = token - ) + ) |> + http_perform() labels <- response$labels names(labels)[grep("cromwell-workflow-id", names(labels))] <- "workflow_id" labels diff --git a/R/rcromwell-package.R b/R/rcromwell-package.R index 8c2d7a3..feb4804 100644 --- a/R/rcromwell-package.R +++ b/R/rcromwell-package.R @@ -3,8 +3,13 @@ ## usethis namespace: start #' @importFrom glue glue +#' @importFrom rlang abort #' @importFrom dplyr as_tibble tibble relocate any_of %>% #' @importFrom lubridate now with_tz ymd_hms #' @importFrom purrr discard flatten keep map map_dfr pluck reduce +#' @importFrom httr2 request req_headers req_perform req_error +#' req_body_multipart req_url_query req_body_multipart req_method +#' resp_body_json +#' @importFrom curl form_file ## usethis namespace: end NULL diff --git a/R/utils.R b/R/utils.R index 9618f8a..90d85f6 100644 --- a/R/utils.R +++ b/R/utils.R @@ -1,3 +1,14 @@ +#' @importFrom curl form_file lst_upload_file <- function(path) { - list(httr::upload_file(path)) + list(curl::form_file(path)) +} + +# copy with changes of code in `httr::BROWSE` +browse <- function(url) { + if (interactive()) { + utils::browseURL(url) + } else { + message("Please point your browser to the following url: ") + message(url) + } } diff --git a/man/cromwell_labels.Rd b/man/cromwell_labels.Rd index a9bc7e3..890861e 100644 --- a/man/cromwell_labels.Rd +++ b/man/cromwell_labels.Rd @@ -18,7 +18,7 @@ token as the env var \code{PROOF_TOKEN} and then passing nothing to this param and we'll find it} } \value{ -a named list of workflow labels +a named list of labels } \description{ Cromwell labels for a workflow diff --git a/man/cromwell_timing.Rd b/man/cromwell_timing.Rd index dd6c476..ba12349 100644 --- a/man/cromwell_timing.Rd +++ b/man/cromwell_timing.Rd @@ -19,9 +19,8 @@ Opens a timing diagram in a browser Get a timing diagram for a Cromwell workflow } \details{ -Internally this function uses \code{\link[httr:BROWSE]{httr::BROWSE()}} which uses -\code{\link[utils:browseURL]{utils::browseURL()}} - if a auth header is required you'll have to -do that manually +Internally this function uses \code{\link[utils:browseURL]{utils::browseURL()}} - if an +auth header is required you'll have to do that manually } \section{Important}{ diff --git a/man/try_auth_header.Rd b/man/try_auth_header.Rd index ec41d42..40da5b7 100644 --- a/man/try_auth_header.Rd +++ b/man/try_auth_header.Rd @@ -4,15 +4,17 @@ \alias{try_auth_header} \title{Add Authorization header} \usage{ -try_auth_header(token = NULL) +try_auth_header(.req, token = NULL) } \arguments{ +\item{.req}{An \code{httr2} request} + \item{token}{(character) a Bearer token. optional. if nothing passed, we look for the env var PROOF_TOKEN} } \value{ -A \code{request} S3 class with the HTTP header that can be passed -to \code{httr::GET()}, \code{httr::POST()}, etc. +An \code{httr2_request} S3 class adding an HTTP header for +\code{Authorization} with the value in \code{token} } \description{ Add Authorization header diff --git a/tests/fixtures/cromwell_abort.yml b/tests/fixtures/cromwell_abort.yml index d0778bb..6f710d1 100644 --- a/tests/fixtures/cromwell_abort.yml +++ b/tests/fixtures/cromwell_abort.yml @@ -4,52 +4,40 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:35:09 GMT - content-type: application/json - content-length: '66' + Date: Fri, 09 Aug 2024 23:00:08 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"2c642b5a-826c-4601-9fa9-cd01b4c92e3b","status":"Submitted"}' - recorded_at: 2024-01-05 16:35:29 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"97c27bcb-e724-4e42-bd8c-abc402af489f","status":"Submitted"}' + recorded_at: 2024-08-09 23:00:28 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 - request: method: post - uri: http://localhost:8000/api/workflows/v1/2c642b5a-826c-4601-9fa9-cd01b4c92e3b/abort + uri: http://localhost:8000/api/workflows/v1/97c27bcb-e724-4e42-bd8c-abc402af489f/abort body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* - Content-Type: '' + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:35:29 GMT - content-type: application/json - content-length: '64' + Date: Fri, 09 Aug 2024 23:00:28 GMT + Content-Type: application/json + Content-Length: '65' body: encoding: '' file: no - string: '{"id":"2c642b5a-826c-4601-9fa9-cd01b4c92e3b","status":"Aborted"}' - recorded_at: 2024-01-05 16:35:29 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"97c27bcb-e724-4e42-bd8c-abc402af489f","status":"Aborting"}' + recorded_at: 2024-08-09 23:00:28 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_backends.yml b/tests/fixtures/cromwell_backends.yml index 990f296..a7bedc1 100644 --- a/tests/fixtures/cromwell_backends.yml +++ b/tests/fixtures/cromwell_backends.yml @@ -5,22 +5,18 @@ http_interactions: body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:36:47 GMT - content-type: application/json - content-length: '56' + Date: Fri, 09 Aug 2024 23:01:10 GMT + Content-Type: application/json + Content-Length: '56' body: encoding: '' file: no string: '{"defaultBackend":"Local","supportedBackends":["Local"]}' - recorded_at: 2024-01-05 16:36:47 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + recorded_at: 2024-08-09 23:01:10 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_cache.yml b/tests/fixtures/cromwell_cache.yml index c4c798a..7d1157c 100644 --- a/tests/fixtures/cromwell_cache.yml +++ b/tests/fixtures/cromwell_cache.yml @@ -1,30 +1,25 @@ http_interactions: - request: method: get - uri: http://localhost:8000/api/workflows/v1/e45a30ed-3674-4ac4-96ba-dc3985aa469d/metadata?expandSubWorkflows=false + uri: http://localhost:8000/api/workflows/v1/0807875b-91cc-4bf1-81ad-69eac301a053/metadata?expandSubWorkflows=false body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - content-encoding: gzip - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:37:25 GMT - transfer-encoding: chunked - content-type: application/json + Content-Encoding: gzip + Date: Fri, 09 Aug 2024 23:02:43 GMT + Transfer-Encoding: chunked + Content-Type: application/json body: encoding: '' file: no - string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-04c89b5","description":"PickedUp","timestamp":"2024-01-05T16:37:17.011Z","cromwellVersion":"86"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task + string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-909b41f","description":"PickedUp","timestamp":"2024-08-09T23:02:31.246Z","cromwellVersion":"87"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task hello {\n String name\n\n command {\n echo ''Hello ${name}!''\n }\n output - {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{"test.hello":[{"executionStatus":"Running","stdout":"/Users/schambe3/github/cromwell/cromwell-executions/test/e45a30ed-3674-4ac4-96ba-dc3985aa469d/call-hello/execution/stdout","commandLine":"echo - ''Hello World!''","shardIndex":-1,"runtimeAttributes":{"maxRetries":"0","failOnStderr":"false","continueOnReturnCode":"0"},"callCaching":{"allowResultReuse":false,"effectiveCallCachingMode":"CallCachingOff"},"inputs":{"name":"World"},"backend":"Local","attempt":1,"start":"2024-01-05T16:37:18.053Z","stderr":"/Users/schambe3/github/cromwell/cromwell-executions/test/e45a30ed-3674-4ac4-96ba-dc3985aa469d/call-hello/execution/stderr","callRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/e45a30ed-3674-4ac4-96ba-dc3985aa469d/call-hello"}]},"outputs":{},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/e45a30ed-3674-4ac4-96ba-dc3985aa469d","actualWorkflowLanguage":"WDL","status":"Running","start":"2024-01-05T16:37:17.012Z","id":"e45a30ed-3674-4ac4-96ba-dc3985aa469d","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-e45a30ed-3674-4ac4-96ba-dc3985aa469d"},"submission":"2024-01-05T16:36:55.936Z"}' - recorded_at: 2024-01-05 16:37:26 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{"test.hello":[{"executionStatus":"QueuedInCromwell","shardIndex":-1,"backend":"Local","attempt":1,"start":"2024-08-09T23:02:32.288Z"}]},"outputs":{},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/0807875b-91cc-4bf1-81ad-69eac301a053","actualWorkflowLanguage":"WDL","status":"Running","start":"2024-08-09T23:02:31.248Z","id":"0807875b-91cc-4bf1-81ad-69eac301a053","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-0807875b-91cc-4bf1-81ad-69eac301a053"},"submission":"2024-08-09T23:02:13.298Z"}' + recorded_at: 2024-08-09 23:02:43 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_cache_http.yml b/tests/fixtures/cromwell_cache_http.yml index 8dd4038..a716db1 100644 --- a/tests/fixtures/cromwell_cache_http.yml +++ b/tests/fixtures/cromwell_cache_http.yml @@ -1,30 +1,26 @@ http_interactions: - request: method: get - uri: http://localhost:8000/api/workflows/v1/92dd16fa-75ec-4d57-9d49-0e446c86506b/metadata?expandSubWorkflows=false + uri: http://localhost:8000/api/workflows/v1/1d4bd515-7696-4062-a516-d1c6ad792785/metadata?expandSubWorkflows=false body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - content-encoding: gzip - server: akka-http/10.1.15 - date: Mon, 18 Mar 2024 16:35:50 GMT - transfer-encoding: chunked - content-type: application/json + Content-Encoding: gzip + Date: Fri, 09 Aug 2024 23:02:13 GMT + Transfer-Encoding: chunked + Content-Type: application/json body: encoding: '' file: no - string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-01b35cf","description":"PickedUp","timestamp":"2024-03-18T16:35:35.495Z","cromwellVersion":"86"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task + string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-909b41f","description":"PickedUp","timestamp":"2024-08-09T23:01:51.184Z","cromwellVersion":"87"},{"cromwellId":"cromid-909b41f","description":"Finished","timestamp":"2024-08-09T23:02:08.553Z","cromwellVersion":"87"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task hello {\n String name\n\n command {\n echo ''Hello ${name}!''\n }\n output - {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{"test.hello":[{"executionStatus":"Running","stdout":"/Users/schambe3/github/cromwell/cromwell-executions/test/92dd16fa-75ec-4d57-9d49-0e446c86506b/call-hello/execution/stdout","commandLine":"echo - ''Hello World!''","shardIndex":-1,"runtimeAttributes":{"maxRetries":"0","failOnStderr":"false","continueOnReturnCode":"0"},"callCaching":{"allowResultReuse":false,"effectiveCallCachingMode":"CallCachingOff"},"inputs":{"name":"World"},"backend":"Local","attempt":1,"start":"2024-03-18T16:35:36.542Z","stderr":"/Users/schambe3/github/cromwell/cromwell-executions/test/92dd16fa-75ec-4d57-9d49-0e446c86506b/call-hello/execution/stderr","callRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/92dd16fa-75ec-4d57-9d49-0e446c86506b/call-hello"}]},"outputs":{},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/92dd16fa-75ec-4d57-9d49-0e446c86506b","actualWorkflowLanguage":"WDL","status":"Running","start":"2024-03-18T16:35:35.497Z","id":"92dd16fa-75ec-4d57-9d49-0e446c86506b","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-92dd16fa-75ec-4d57-9d49-0e446c86506b"},"submission":"2024-03-18T16:35:20.738Z"}' - recorded_at: 2024-03-18 16:35:50 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{"test.hello":[{"executionStatus":"Done","stdout":"/Users/schambe3/github/cromwell/cromwell-executions/test/1d4bd515-7696-4062-a516-d1c6ad792785/call-hello/execution/stdout","backendStatus":"Done","commandLine":"echo + ''Hello World!''","shardIndex":-1,"outputs":{"response":"/Users/schambe3/github/cromwell/cromwell-executions/test/1d4bd515-7696-4062-a516-d1c6ad792785/call-hello/execution/stdout"},"runtimeAttributes":{"maxRetries":"0","failOnStderr":"false","continueOnReturnCode":"0"},"callCaching":{"allowResultReuse":false,"effectiveCallCachingMode":"CallCachingOff"},"inputs":{"name":"World"},"returnCode":0,"jobId":"84322","backend":"Local","end":"2024-08-09T23:02:06.532Z","start":"2024-08-09T23:01:52.229Z","stderr":"/Users/schambe3/github/cromwell/cromwell-executions/test/1d4bd515-7696-4062-a516-d1c6ad792785/call-hello/execution/stderr","callRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/1d4bd515-7696-4062-a516-d1c6ad792785/call-hello","attempt":1,"executionEvents":[{"startTime":"2024-08-09T23:02:05.542Z","description":"UpdatingJobStore","endTime":"2024-08-09T23:02:06.532Z"},{"startTime":"2024-08-09T23:01:52.231Z","description":"RequestingExecutionToken","endTime":"2024-08-09T23:02:00.787Z"},{"startTime":"2024-08-09T23:02:00.789Z","description":"PreparingJob","endTime":"2024-08-09T23:02:00.795Z"},{"startTime":"2024-08-09T23:01:52.230Z","description":"Pending","endTime":"2024-08-09T23:01:52.231Z"},{"startTime":"2024-08-09T23:02:00.795Z","description":"RunningJob","endTime":"2024-08-09T23:02:05.542Z"},{"startTime":"2024-08-09T23:02:00.787Z","description":"WaitingForValueStore","endTime":"2024-08-09T23:02:00.789Z"}]}]},"outputs":{"test.hello.response":"/Users/schambe3/github/cromwell/cromwell-executions/test/1d4bd515-7696-4062-a516-d1c6ad792785/call-hello/execution/stdout"},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/1d4bd515-7696-4062-a516-d1c6ad792785","actualWorkflowLanguage":"WDL","status":"Succeeded","end":"2024-08-09T23:02:08.552Z","start":"2024-08-09T23:01:51.187Z","id":"1d4bd515-7696-4062-a516-d1c6ad792785","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-1d4bd515-7696-4062-a516-d1c6ad792785"},"submission":"2024-08-09T23:01:43.103Z"}' + recorded_at: 2024-08-09 23:02:13 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_cache_http_prep.yml b/tests/fixtures/cromwell_cache_http_prep.yml index 9cf3121..62cb03b 100644 --- a/tests/fixtures/cromwell_cache_http_prep.yml +++ b/tests/fixtures/cromwell_cache_http_prep.yml @@ -4,26 +4,19 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Mon, 18 Mar 2024 16:35:20 GMT - content-type: application/json - content-length: '66' + Date: Fri, 09 Aug 2024 23:01:43 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"92dd16fa-75ec-4d57-9d49-0e446c86506b","status":"Submitted"}' - recorded_at: 2024-03-18 16:35:20 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"1d4bd515-7696-4062-a516-d1c6ad792785","status":"Submitted"}' + recorded_at: 2024-08-09 23:01:43 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_cache_prep.yml b/tests/fixtures/cromwell_cache_prep.yml index 7040a7c..9ab90c3 100644 --- a/tests/fixtures/cromwell_cache_prep.yml +++ b/tests/fixtures/cromwell_cache_prep.yml @@ -4,26 +4,19 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:36:55 GMT - content-type: application/json - content-length: '66' + Date: Fri, 09 Aug 2024 23:02:13 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"e45a30ed-3674-4ac4-96ba-dc3985aa469d","status":"Submitted"}' - recorded_at: 2024-01-05 16:36:55 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"0807875b-91cc-4bf1-81ad-69eac301a053","status":"Submitted"}' + recorded_at: 2024-08-09 23:02:13 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_call.yml b/tests/fixtures/cromwell_call.yml index 64bbab4..f92dbb2 100644 --- a/tests/fixtures/cromwell_call.yml +++ b/tests/fixtures/cromwell_call.yml @@ -1,29 +1,25 @@ http_interactions: - request: method: get - uri: http://localhost:8000/api/workflows/v1/7f953f6c-3e78-457f-95d1-52c3891d0e4f/metadata?expandSubWorkflows=true + uri: http://localhost:8000/api/workflows/v1/c05a0de4-1a6c-4ee7-bf33-d35c077cf5c3/metadata?expandSubWorkflows=true body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - content-encoding: gzip - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:38:50 GMT - transfer-encoding: chunked - content-type: application/json + Content-Encoding: gzip + Date: Fri, 09 Aug 2024 23:06:24 GMT + Transfer-Encoding: chunked + Content-Type: application/json body: encoding: '' file: no - string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-04c89b5","description":"PickedUp","timestamp":"2024-01-05T16:38:37.089Z","cromwellVersion":"86"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task + string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-909b41f","description":"PickedUp","timestamp":"2024-08-09T23:06:11.562Z","cromwellVersion":"87"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task hello {\n String name\n\n command {\n echo ''Hello ${name}!''\n }\n output - {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{"test.hello":[{"executionStatus":"QueuedInCromwell","shardIndex":-1,"backend":"Local","attempt":1,"start":"2024-01-05T16:38:38.125Z"}]},"outputs":{},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/7f953f6c-3e78-457f-95d1-52c3891d0e4f","actualWorkflowLanguage":"WDL","status":"Running","start":"2024-01-05T16:38:37.090Z","id":"7f953f6c-3e78-457f-95d1-52c3891d0e4f","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-7f953f6c-3e78-457f-95d1-52c3891d0e4f"},"submission":"2024-01-05T16:38:20.629Z"}' - recorded_at: 2024-01-05 16:38:50 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{"test.hello":[{"executionStatus":"QueuedInCromwell","shardIndex":-1,"backend":"Local","attempt":1,"start":"2024-08-09T23:06:12.609Z"}]},"outputs":{},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/c05a0de4-1a6c-4ee7-bf33-d35c077cf5c3","actualWorkflowLanguage":"WDL","status":"Running","start":"2024-08-09T23:06:11.564Z","id":"c05a0de4-1a6c-4ee7-bf33-d35c077cf5c3","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-c05a0de4-1a6c-4ee7-bf33-d35c077cf5c3"},"submission":"2024-08-09T23:05:54.776Z"}' + recorded_at: 2024-08-09 23:06:24 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_call_prep.yml b/tests/fixtures/cromwell_call_prep.yml index f4f65d2..733d5e8 100644 --- a/tests/fixtures/cromwell_call_prep.yml +++ b/tests/fixtures/cromwell_call_prep.yml @@ -4,26 +4,19 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:38:20 GMT - content-type: application/json - content-length: '66' + Date: Fri, 09 Aug 2024 23:05:54 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"7f953f6c-3e78-457f-95d1-52c3891d0e4f","status":"Submitted"}' - recorded_at: 2024-01-05 16:38:20 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"c05a0de4-1a6c-4ee7-bf33-d35c077cf5c3","status":"Submitted"}' + recorded_at: 2024-08-09 23:05:54 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_failures.yml b/tests/fixtures/cromwell_failures.yml index bf03db9..f3fff59 100644 --- a/tests/fixtures/cromwell_failures.yml +++ b/tests/fixtures/cromwell_failures.yml @@ -1,29 +1,25 @@ http_interactions: - request: method: get - uri: http://localhost:8000/api/workflows/v1/aab8233b-681c-43d0-aeaa-146d3773a1ff/metadata?includeKey=failures&includeKey=jobId + uri: http://localhost:8000/api/workflows/v1/c4a6e761-2376-4633-8e53-9ca554f28193/metadata?includeKey=failures&includeKey=jobId body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - content-encoding: gzip - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:39:33 GMT - transfer-encoding: chunked - content-type: application/json + Content-Encoding: gzip + Date: Fri, 09 Aug 2024 23:37:15 GMT + Transfer-Encoding: chunked + Content-Type: application/json body: encoding: '' file: no string: '{"failures":[{"causedBy":[{"causedBy":[],"message":"Required workflow input ''test.hello.name'' not specified"}],"message":"Workflow input processing - failed"}],"calls":{},"id":"aab8233b-681c-43d0-aeaa-146d3773a1ff"}' - recorded_at: 2024-01-05 16:39:33 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + failed"}],"calls":{},"id":"c4a6e761-2376-4633-8e53-9ca554f28193"}' + recorded_at: 2024-08-09 23:37:15 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_failures_prep.yml b/tests/fixtures/cromwell_failures_prep.yml index ddf2a38..df125b5 100644 --- a/tests/fixtures/cromwell_failures_prep.yml +++ b/tests/fixtures/cromwell_failures_prep.yml @@ -4,26 +4,19 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs_bad.json", - type = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:39:03 GMT - content-type: application/json - content-length: '66' + Date: Fri, 09 Aug 2024 23:36:44 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"aab8233b-681c-43d0-aeaa-146d3773a1ff","status":"Submitted"}' - recorded_at: 2024-01-05 16:39:03 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"c4a6e761-2376-4633-8e53-9ca554f28193","status":"Submitted"}' + recorded_at: 2024-08-09 23:36:45 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_glob.yml b/tests/fixtures/cromwell_glob.yml index 8bc0371..fb95022 100644 --- a/tests/fixtures/cromwell_glob.yml +++ b/tests/fixtures/cromwell_glob.yml @@ -4,54 +4,43 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Sun, 17 Mar 2024 21:13:28 GMT - content-type: application/json - content-length: '66' + Date: Tue, 13 Aug 2024 16:35:31 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"d09ce70e-bb65-4b3b-ad6d-c92c1e42f599","status":"Submitted"}' - recorded_at: 2024-03-17 21:13:48 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"f1e0a1c0-304a-4e8b-8244-3074f5ee2fc7","status":"Submitted"}' + recorded_at: 2024-08-13 16:35:47 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 - request: method: get - uri: http://localhost:8000/api/workflows/v1/d09ce70e-bb65-4b3b-ad6d-c92c1e42f599/metadata?expandSubWorkflows=false + uri: http://localhost:8000/api/workflows/v1/f1e0a1c0-304a-4e8b-8244-3074f5ee2fc7/metadata?expandSubWorkflows=false body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - content-encoding: gzip - server: akka-http/10.1.15 - date: Sun, 17 Mar 2024 21:13:48 GMT - transfer-encoding: chunked - content-type: application/json + Content-Encoding: gzip + Date: Tue, 13 Aug 2024 16:35:47 GMT + Transfer-Encoding: chunked + Content-Type: application/json body: encoding: '' file: no - string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-01b35cf","description":"PickedUp","timestamp":"2024-03-17T21:13:43.505Z","cromwellVersion":"86"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task + string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-7c918c5","description":"PickedUp","timestamp":"2024-08-13T16:35:41.693Z","cromwellVersion":"87"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task hello {\n String name\n\n command {\n echo ''Hello ${name}!''\n }\n output - {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{"test.hello":[{"executionStatus":"QueuedInCromwell","shardIndex":-1,"backend":"Local","attempt":1,"start":"2024-03-17T21:13:44.550Z"}]},"outputs":{},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/d09ce70e-bb65-4b3b-ad6d-c92c1e42f599","actualWorkflowLanguage":"WDL","status":"Running","start":"2024-03-17T21:13:43.507Z","id":"d09ce70e-bb65-4b3b-ad6d-c92c1e42f599","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-d09ce70e-bb65-4b3b-ad6d-c92c1e42f599"},"submission":"2024-03-17T21:13:28.787Z"}' - recorded_at: 2024-03-17 21:13:48 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{"test.hello":[{"executionStatus":"QueuedInCromwell","shardIndex":-1,"backend":"Local","attempt":1,"start":"2024-08-13T16:35:42.729Z"}]},"outputs":{},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/f1e0a1c0-304a-4e8b-8244-3074f5ee2fc7","actualWorkflowLanguage":"WDL","status":"Running","start":"2024-08-13T16:35:41.694Z","id":"f1e0a1c0-304a-4e8b-8244-3074f5ee2fc7","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-f1e0a1c0-304a-4e8b-8244-3074f5ee2fc7"},"submission":"2024-08-13T16:35:31.976Z"}' + recorded_at: 2024-08-13 16:35:47 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_glob_expanded.yml b/tests/fixtures/cromwell_glob_expanded.yml index c74a629..ca915d7 100644 --- a/tests/fixtures/cromwell_glob_expanded.yml +++ b/tests/fixtures/cromwell_glob_expanded.yml @@ -1,29 +1,25 @@ http_interactions: - request: method: get - uri: http://localhost:8000/api/workflows/v1/d09ce70e-bb65-4b3b-ad6d-c92c1e42f599/metadata?expandSubWorkflows=true + uri: http://localhost:8000/api/workflows/v1/f1e0a1c0-304a-4e8b-8244-3074f5ee2fc7/metadata?expandSubWorkflows=true body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - content-encoding: gzip - server: akka-http/10.1.15 - date: Sun, 17 Mar 2024 21:13:48 GMT - transfer-encoding: chunked - content-type: application/json + Content-Encoding: gzip + Date: Tue, 13 Aug 2024 16:35:47 GMT + Transfer-Encoding: chunked + Content-Type: application/json body: encoding: '' file: no - string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-01b35cf","description":"PickedUp","timestamp":"2024-03-17T21:13:43.505Z","cromwellVersion":"86"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task + string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-7c918c5","description":"PickedUp","timestamp":"2024-08-13T16:35:41.693Z","cromwellVersion":"87"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task hello {\n String name\n\n command {\n echo ''Hello ${name}!''\n }\n output - {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{"test.hello":[{"executionStatus":"QueuedInCromwell","shardIndex":-1,"backend":"Local","attempt":1,"start":"2024-03-17T21:13:44.550Z"}]},"outputs":{},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/d09ce70e-bb65-4b3b-ad6d-c92c1e42f599","actualWorkflowLanguage":"WDL","status":"Running","start":"2024-03-17T21:13:43.507Z","id":"d09ce70e-bb65-4b3b-ad6d-c92c1e42f599","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-d09ce70e-bb65-4b3b-ad6d-c92c1e42f599"},"submission":"2024-03-17T21:13:28.787Z"}' - recorded_at: 2024-03-17 21:13:48 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{"test.hello":[{"executionStatus":"QueuedInCromwell","shardIndex":-1,"backend":"Local","attempt":1,"start":"2024-08-13T16:35:42.729Z"}]},"outputs":{},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/f1e0a1c0-304a-4e8b-8244-3074f5ee2fc7","actualWorkflowLanguage":"WDL","status":"Running","start":"2024-08-13T16:35:41.694Z","id":"f1e0a1c0-304a-4e8b-8244-3074f5ee2fc7","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-f1e0a1c0-304a-4e8b-8244-3074f5ee2fc7"},"submission":"2024-08-13T16:35:31.976Z"}' + recorded_at: 2024-08-13 16:35:47 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_jobs.yml b/tests/fixtures/cromwell_jobs.yml index 5c16810..995b708 100644 --- a/tests/fixtures/cromwell_jobs.yml +++ b/tests/fixtures/cromwell_jobs.yml @@ -1,26 +1,22 @@ http_interactions: - request: method: get - uri: http://localhost:8000/api/workflows/v1/query?submission=2024-01-04T00%3A00Z + uri: http://localhost:8000/api/workflows/v1/query?submission=2024-08-12T00%3A00Z body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:40:22 GMT - content-type: application/json - content-length: '3224' + Date: Tue, 13 Aug 2024 16:36:23 GMT + Content-Type: application/json + Content-Length: '939' body: encoding: '' file: no - string: '{"results":[{"end":"2024-01-05T16:40:14.538Z","id":"d7837f49-412f-4849-be45-ad1d387c39e3","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-01-05T16:39:57.172Z","status":"Succeeded","submission":"2024-01-05T16:39:52.063Z"},{"end":"2024-01-05T16:39:17.136Z","id":"aab8233b-681c-43d0-aeaa-146d3773a1ff","metadataArchiveStatus":"Unarchived","start":"2024-01-05T16:39:17.127Z","status":"Failed","submission":"2024-01-05T16:39:03.372Z"},{"end":"2024-01-05T16:38:55.467Z","id":"7f953f6c-3e78-457f-95d1-52c3891d0e4f","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-01-05T16:38:37.090Z","status":"Succeeded","submission":"2024-01-05T16:38:20.629Z"},{"end":"2024-01-05T16:37:25.195Z","id":"e45a30ed-3674-4ac4-96ba-dc3985aa469d","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-01-05T16:37:17.012Z","status":"Succeeded","submission":"2024-01-05T16:36:55.936Z"},{"id":"2c642b5a-826c-4601-9fa9-cd01b4c92e3b","metadataArchiveStatus":"Unarchived","status":"Aborted","submission":"2024-01-05T16:35:09.567Z"},{"end":"2024-01-05T16:36:05.117Z","id":"0beb2a06-29e3-4da3-8d09-35469703920c","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-01-05T16:35:56.934Z","status":"Succeeded","submission":"2024-01-05T16:34:35.511Z"},{"id":"bfa38643-6dc5-41d7-9543-5370c0c410c5","metadataArchiveStatus":"Unarchived","status":"Aborted","submission":"2024-01-05T16:34:35.154Z"},{"end":"2024-01-05T16:36:45.156Z","id":"289d1d3a-79e8-456a-a8d8-3876cdcfb64b","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-01-05T16:36:36.971Z","status":"Succeeded","submission":"2024-01-05T16:34:35.577Z"},{"end":"2024-01-05T16:36:24.107Z","id":"a0cc879b-ac07-4a9e-a5ac-e951cc2457e9","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-01-05T16:36:16.950Z","status":"Succeeded","submission":"2024-01-05T16:34:35.542Z"},{"end":"2024-01-05T16:35:16.896Z","id":"755c64b0-be95-4899-9853-7b974ac722fe","metadataArchiveStatus":"Unarchived","start":"2024-01-05T16:35:16.884Z","status":"Failed","submission":"2024-01-05T16:34:35.408Z"},{"end":"2024-01-05T16:35:05.046Z","id":"f42f1ee5-f052-4a57-a618-d12c5f5a4811","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-01-05T16:34:56.863Z","status":"Succeeded","submission":"2024-01-05T16:34:35.373Z"},{"end":"2024-01-05T16:34:45.018Z","id":"17d2bec5-4954-41f4-8d5b-72c5514f49bc","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-01-05T16:34:36.837Z","status":"Succeeded","submission":"2024-01-05T16:34:35.326Z"},{"end":"2024-01-05T16:37:04.157Z","id":"e1e036bc-d017-4f9d-aea6-35e2dd98616d","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-01-05T16:36:56.993Z","status":"Succeeded","submission":"2024-01-05T16:34:35.655Z"},{"end":"2024-01-05T16:35:45.087Z","id":"c5ac1653-b673-4ec7-b3b0-536b03f62ebb","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-01-05T16:35:36.910Z","status":"Succeeded","submission":"2024-01-05T16:34:35.445Z"},{"end":"2024-01-04T20:57:20.360Z","id":"c324aa59-081f-4071-83d4-f6f722584c12","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-01-04T20:57:09.107Z","status":"Succeeded","submission":"2024-01-04T20:57:00.117Z"}],"totalResultsCount":15}' - recorded_at: 2024-01-05 16:40:22 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"results":[{"end":"2024-08-13T16:35:58.034Z","id":"f1e0a1c0-304a-4e8b-8244-3074f5ee2fc7","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-08-13T16:35:41.694Z","status":"Succeeded","submission":"2024-08-13T16:35:31.976Z"},{"end":"2024-08-13T16:35:36.991Z","id":"428a138c-5700-495c-aa2d-7779f146ad5c","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-08-13T16:35:21.664Z","status":"Succeeded","submission":"2024-08-13T16:35:00.801Z"},{"end":"2024-08-13T16:35:17.992Z","id":"51b35b88-d4dd-49b0-bc16-7d54c1461a07","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-08-13T16:35:01.646Z","status":"Succeeded","submission":"2024-08-13T16:34:45.240Z"},{"end":"2024-08-13T16:33:38.232Z","id":"4482b03f-388f-4bc1-9a5c-ee511a921da4","metadataArchiveStatus":"Unarchived","name":"test","start":"2024-08-13T16:33:21.518Z","status":"Succeeded","submission":"2024-08-13T16:33:20.830Z"}],"totalResultsCount":4}' + recorded_at: 2024-08-13 16:36:23 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_labels_data.yml b/tests/fixtures/cromwell_labels_data.yml index dba5c23..d9bb1c2 100644 --- a/tests/fixtures/cromwell_labels_data.yml +++ b/tests/fixtures/cromwell_labels_data.yml @@ -1,26 +1,22 @@ http_interactions: - request: method: get - uri: http://localhost:8000/api/workflows/v1/287c7902-abc0-49ab-a6ec-0ce0c097b4d2/labels + uri: http://localhost:8000/api/workflows/v1/cae2303d-802d-45f1-a085-d8f658182094/labels body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - server: akka-http/10.1.15 - date: Fri, 26 Jul 2024 19:26:12 GMT - content-type: application/json - content-length: '200' + Date: Tue, 13 Aug 2024 16:37:31 GMT + Content-Type: application/json + Content-Length: '200' body: encoding: '' file: no - string: '{"id":"287c7902-abc0-49ab-a6ec-0ce0c097b4d2","labels":{"Label":"Apple","secondaryLabel":"Orange","workflowType":"AppSubmission","cromwell-workflow-id":"cromwell-287c7902-abc0-49ab-a6ec-0ce0c097b4d2"}}' - recorded_at: 2024-07-26 19:26:12 GMT + string: '{"id":"cae2303d-802d-45f1-a085-d8f658182094","labels":{"Label":"Apple","secondaryLabel":"Orange","workflowType":"AppSubmission","cromwell-workflow-id":"cromwell-cae2303d-802d-45f1-a085-d8f658182094"}}' + recorded_at: 2024-08-13 16:37:31 GMT recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_labels_submit.yml b/tests/fixtures/cromwell_labels_submit.yml index a639388..c91b9d6 100644 --- a/tests/fixtures/cromwell_labels_submit.yml +++ b/tests/fixtures/cromwell_labels_submit.yml @@ -4,27 +4,19 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL),labels=list(path = "/private/var/folders/qt/fzq1m_bj2yb_7b2jz57s9q7c0000gp/T/Rtmp21huqY/rcromwell_1609933b0cbaf.json", - type = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Fri, 26 Jul 2024 19:25:52 GMT - content-type: application/json - content-length: '66' + Date: Tue, 13 Aug 2024 16:37:11 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"287c7902-abc0-49ab-a6ec-0ce0c097b4d2","status":"Submitted"}' - recorded_at: 2024-07-26 19:25:52 GMT + string: '{"id":"cae2303d-802d-45f1-a085-d8f658182094","status":"Submitted"}' + recorded_at: 2024-08-13 16:37:11 GMT recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_logs_after.yml b/tests/fixtures/cromwell_logs_after.yml index 49535d2..bced80a 100644 --- a/tests/fixtures/cromwell_logs_after.yml +++ b/tests/fixtures/cromwell_logs_after.yml @@ -1,26 +1,22 @@ http_interactions: - request: method: get - uri: http://localhost:8000/api/workflows/v1/ef029101-fd1a-4b1c-8caa-c40c5acdf4de/logs + uri: http://localhost:8000/api/workflows/v1/930ff27a-af5e-4168-a939-757e202b5105/logs body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:41:31 GMT - content-type: application/json - content-length: '366' + Date: Tue, 13 Aug 2024 16:39:02 GMT + Content-Type: application/json + Content-Length: '366' body: encoding: '' file: no - string: '{"calls":{"test.hello":[{"stderr":"/Users/schambe3/github/cromwell/cromwell-executions/test/ef029101-fd1a-4b1c-8caa-c40c5acdf4de/call-hello/execution/stderr","stdout":"/Users/schambe3/github/cromwell/cromwell-executions/test/ef029101-fd1a-4b1c-8caa-c40c5acdf4de/call-hello/execution/stdout","attempt":1,"shardIndex":-1}]},"id":"ef029101-fd1a-4b1c-8caa-c40c5acdf4de"}' - recorded_at: 2024-01-05 16:41:31 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"calls":{"test.hello":[{"stderr":"/Users/schambe3/github/cromwell/cromwell-executions/test/930ff27a-af5e-4168-a939-757e202b5105/call-hello/execution/stderr","stdout":"/Users/schambe3/github/cromwell/cromwell-executions/test/930ff27a-af5e-4168-a939-757e202b5105/call-hello/execution/stdout","attempt":1,"shardIndex":-1}]},"id":"930ff27a-af5e-4168-a939-757e202b5105"}' + recorded_at: 2024-08-13 16:39:02 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_logs_before.yml b/tests/fixtures/cromwell_logs_before.yml index 4f43da5..756df23 100644 --- a/tests/fixtures/cromwell_logs_before.yml +++ b/tests/fixtures/cromwell_logs_before.yml @@ -4,51 +4,40 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:40:36 GMT - content-type: application/json - content-length: '66' + Date: Tue, 13 Aug 2024 16:38:07 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"ef029101-fd1a-4b1c-8caa-c40c5acdf4de","status":"Submitted"}' - recorded_at: 2024-01-05 16:40:46 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"930ff27a-af5e-4168-a939-757e202b5105","status":"Submitted"}' + recorded_at: 2024-08-13 16:38:17 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 - request: method: get - uri: http://localhost:8000/api/workflows/v1/ef029101-fd1a-4b1c-8caa-c40c5acdf4de/logs + uri: http://localhost:8000/api/workflows/v1/930ff27a-af5e-4168-a939-757e202b5105/logs body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:40:46 GMT - content-type: application/json - content-length: '45' + Date: Tue, 13 Aug 2024 16:38:17 GMT + Content-Type: application/json + Content-Length: '45' body: encoding: '' file: no - string: '{"id":"ef029101-fd1a-4b1c-8caa-c40c5acdf4de"}' - recorded_at: 2024-01-05 16:40:46 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"930ff27a-af5e-4168-a939-757e202b5105"}' + recorded_at: 2024-08-13 16:38:17 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_outputs.yml b/tests/fixtures/cromwell_outputs.yml index 1f23d20..b73e329 100644 --- a/tests/fixtures/cromwell_outputs.yml +++ b/tests/fixtures/cromwell_outputs.yml @@ -1,26 +1,22 @@ http_interactions: - request: method: get - uri: http://localhost:8000/api/workflows/v1/4abc608d-a8cf-410d-909c-0e0f4d48ee85/outputs + uri: http://localhost:8000/api/workflows/v1/032c9dc7-1f87-4eb9-a005-e28be7f5d1ad/outputs body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:42:57 GMT - content-type: application/json - content-length: '203' + Date: Tue, 13 Aug 2024 16:41:10 GMT + Content-Type: application/json + Content-Length: '203' body: encoding: '' file: no - string: '{"outputs":{"test.hello.response":"/Users/schambe3/github/cromwell/cromwell-executions/test/4abc608d-a8cf-410d-909c-0e0f4d48ee85/call-hello/execution/stdout"},"id":"4abc608d-a8cf-410d-909c-0e0f4d48ee85"}' - recorded_at: 2024-01-05 16:42:57 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"outputs":{"test.hello.response":"/Users/schambe3/github/cromwell/cromwell-executions/test/032c9dc7-1f87-4eb9-a005-e28be7f5d1ad/call-hello/execution/stdout"},"id":"032c9dc7-1f87-4eb9-a005-e28be7f5d1ad"}' + recorded_at: 2024-08-13 16:41:10 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_outputs_prep.yml b/tests/fixtures/cromwell_outputs_prep.yml index 5548a14..dc65413 100644 --- a/tests/fixtures/cromwell_outputs_prep.yml +++ b/tests/fixtures/cromwell_outputs_prep.yml @@ -4,26 +4,19 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:42:12 GMT - content-type: application/json - content-length: '66' + Date: Tue, 13 Aug 2024 16:40:25 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"4abc608d-a8cf-410d-909c-0e0f4d48ee85","status":"Submitted"}' - recorded_at: 2024-01-05 16:42:12 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"032c9dc7-1f87-4eb9-a005-e28be7f5d1ad","status":"Submitted"}' + recorded_at: 2024-08-13 16:40:25 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_submit_batch.yml b/tests/fixtures/cromwell_submit_batch.yml index 461398c..a417aa3 100644 --- a/tests/fixtures/cromwell_submit_batch.yml +++ b/tests/fixtures/cromwell_submit_batch.yml @@ -4,26 +4,19 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:43:12 GMT - content-type: application/json - content-length: '66' + Date: Tue, 13 Aug 2024 16:41:48 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"686f4bf8-a89d-4920-b7bd-129030b44d18","status":"Submitted"}' - recorded_at: 2024-01-05 16:43:12 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"ec60a3d3-9541-4784-84b8-28ffa226621e","status":"Submitted"}' + recorded_at: 2024-08-13 16:41:48 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_submit_batch_http.yml b/tests/fixtures/cromwell_submit_batch_http.yml index 04054e5..4e60e19 100644 --- a/tests/fixtures/cromwell_submit_batch_http.yml +++ b/tests/fixtures/cromwell_submit_batch_http.yml @@ -4,26 +4,19 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Sun, 17 Mar 2024 04:34:30 GMT - content-type: application/json - content-length: '66' + Date: Tue, 13 Aug 2024 16:41:48 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"d1396931-ef09-4960-bcdf-d09a4115fd44","status":"Submitted"}' - recorded_at: 2024-03-17 04:34:30 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"e6fd5ad4-0a50-4208-8020-54324ff77c59","status":"Submitted"}' + recorded_at: 2024-08-13 16:41:48 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_submit_batch_workflow_options.yml b/tests/fixtures/cromwell_submit_batch_workflow_options.yml index a63e73e..6bc0193 100644 --- a/tests/fixtures/cromwell_submit_batch_workflow_options.yml +++ b/tests/fixtures/cromwell_submit_batch_workflow_options.yml @@ -4,27 +4,19 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL),workflowOptions=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/workflow_options.json", - type = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Fri, 01 Mar 2024 21:33:48 GMT - content-type: application/json - content-length: '66' + Date: Tue, 13 Aug 2024 16:41:48 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"74331f18-5525-4643-ac1c-ca0b5c44eb4a","status":"Submitted"}' - recorded_at: 2024-03-01 21:33:48 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"34604b3e-a4d7-43b4-a359-8f7dcd4c689b","status":"Submitted"}' + recorded_at: 2024-08-13 16:41:48 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_validate.yml b/tests/fixtures/cromwell_validate.yml index 4eefd01..fd339a8 100644 --- a/tests/fixtures/cromwell_validate.yml +++ b/tests/fixtures/cromwell_validate.yml @@ -4,24 +4,19 @@ http_interactions: uri: http://localhost:8000/api/womtool/v1/describe body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - server: akka-http/10.1.15 - date: Fri, 05 Jan 2024 16:43:21 GMT - content-type: application/json - content-length: '463' + Date: Tue, 13 Aug 2024 16:42:14 GMT + Content-Type: application/json + Content-Length: '463' body: encoding: '' file: no string: '{"valid":true,"errors":[],"validWorkflow":true,"name":"test","inputs":[{"name":"hello.name","valueType":{"typeName":"String"},"typeDisplayName":"String","optional":false,"default":null}],"outputs":[{"name":"hello.response","valueType":{"typeName":"File"},"typeDisplayName":"File"}],"images":[],"submittedDescriptorType":{"descriptorType":"WDL","descriptorTypeVersion":"draft-2"},"importedDescriptorTypes":[],"meta":{},"parameterMeta":{},"isRunnableWorkflow":true}' - recorded_at: 2024-01-05 16:43:21 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + recorded_at: 2024-08-13 16:42:14 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_workflow.yml b/tests/fixtures/cromwell_workflow.yml index afe8bdb..7485106 100644 --- a/tests/fixtures/cromwell_workflow.yml +++ b/tests/fixtures/cromwell_workflow.yml @@ -1,29 +1,25 @@ http_interactions: - request: method: get - uri: http://localhost:8000/api/workflows/v1/d623c127-3085-4e9c-8282-8f877bef0517/metadata?expandSubWorkflows=false&excludeKey=calls + uri: http://localhost:8000/api/workflows/v1/1adcd013-64e7-416a-8553-67302f4821f5/metadata?expandSubWorkflows=false&excludeKey=calls body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - content-encoding: gzip - server: akka-http/10.1.15 - date: Sun, 17 Mar 2024 04:50:29 GMT - transfer-encoding: chunked - content-type: application/json + Content-Encoding: gzip + Date: Tue, 13 Aug 2024 16:43:07 GMT + Transfer-Encoding: chunked + Content-Type: application/json body: encoding: '' file: no - string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-01b35cf","description":"Finished","timestamp":"2024-03-17T04:50:22.629Z","cromwellVersion":"86"},{"cromwellId":"cromid-01b35cf","description":"PickedUp","timestamp":"2024-03-17T04:50:10.371Z","cromwellVersion":"86"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task + string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-7c918c5","description":"PickedUp","timestamp":"2024-08-13T16:43:02.303Z","cromwellVersion":"87"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task hello {\n String name\n\n command {\n echo ''Hello ${name}!''\n }\n output - {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{},"outputs":{"test.hello.response":"/Users/schambe3/github/cromwell/cromwell-executions/test/d623c127-3085-4e9c-8282-8f877bef0517/call-hello/execution/stdout"},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/d623c127-3085-4e9c-8282-8f877bef0517","actualWorkflowLanguage":"WDL","status":"Succeeded","end":"2024-03-17T04:50:22.628Z","start":"2024-03-17T04:50:10.373Z","id":"d623c127-3085-4e9c-8282-8f877bef0517","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-d623c127-3085-4e9c-8282-8f877bef0517"},"submission":"2024-03-17T04:49:59.918Z"}' - recorded_at: 2024-03-17 04:50:29 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{},"outputs":{},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/1adcd013-64e7-416a-8553-67302f4821f5","actualWorkflowLanguage":"WDL","status":"Running","start":"2024-08-13T16:43:02.304Z","id":"1adcd013-64e7-416a-8553-67302f4821f5","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-1adcd013-64e7-416a-8553-67302f4821f5"},"submission":"2024-08-13T16:42:37.206Z"}' + recorded_at: 2024-08-13 16:43:07 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_workflow_http.yml b/tests/fixtures/cromwell_workflow_http.yml index 5246db7..7485106 100644 --- a/tests/fixtures/cromwell_workflow_http.yml +++ b/tests/fixtures/cromwell_workflow_http.yml @@ -1,29 +1,25 @@ http_interactions: - request: method: get - uri: http://localhost:8000/api/workflows/v1/d623c127-3085-4e9c-8282-8f877bef0517/metadata?expandSubWorkflows=false&excludeKey=calls + uri: http://localhost:8000/api/workflows/v1/1adcd013-64e7-416a-8553-67302f4821f5/metadata?expandSubWorkflows=false&excludeKey=calls body: encoding: '' string: '' - headers: - Accept: application/json, text/xml, application/xml, */* + headers: [] response: status: status_code: 200 - category: Success - reason: OK - message: 'Success: (200) OK' + message: OK headers: - content-encoding: gzip - server: akka-http/10.1.15 - date: Sun, 17 Mar 2024 04:50:30 GMT - transfer-encoding: chunked - content-type: application/json + Content-Encoding: gzip + Date: Tue, 13 Aug 2024 16:43:07 GMT + Transfer-Encoding: chunked + Content-Type: application/json body: encoding: '' file: no - string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-01b35cf","description":"Finished","timestamp":"2024-03-17T04:50:22.629Z","cromwellVersion":"86"},{"cromwellId":"cromid-01b35cf","description":"PickedUp","timestamp":"2024-03-17T04:50:10.371Z","cromwellVersion":"86"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task + string: '{"workflowName":"test","workflowProcessingEvents":[{"cromwellId":"cromid-7c918c5","description":"PickedUp","timestamp":"2024-08-13T16:43:02.303Z","cromwellVersion":"87"}],"actualWorkflowLanguageVersion":"draft-2","submittedFiles":{"workflow":"task hello {\n String name\n\n command {\n echo ''Hello ${name}!''\n }\n output - {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{},"outputs":{"test.hello.response":"/Users/schambe3/github/cromwell/cromwell-executions/test/d623c127-3085-4e9c-8282-8f877bef0517/call-hello/execution/stdout"},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/d623c127-3085-4e9c-8282-8f877bef0517","actualWorkflowLanguage":"WDL","status":"Succeeded","end":"2024-03-17T04:50:22.628Z","start":"2024-03-17T04:50:10.373Z","id":"d623c127-3085-4e9c-8282-8f877bef0517","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-d623c127-3085-4e9c-8282-8f877bef0517"},"submission":"2024-03-17T04:49:59.918Z"}' - recorded_at: 2024-03-17 04:50:30 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + {\n File response = stdout()\n }\n}\n\nworkflow test {\n call hello\n}\n\n","root":"","options":"{\n\n}","inputs":"{\"test.hello.name\":\"World\"}","workflowUrl":"","labels":"{}"},"calls":{},"outputs":{},"workflowRoot":"/Users/schambe3/github/cromwell/cromwell-executions/test/1adcd013-64e7-416a-8553-67302f4821f5","actualWorkflowLanguage":"WDL","status":"Running","start":"2024-08-13T16:43:02.304Z","id":"1adcd013-64e7-416a-8553-67302f4821f5","inputs":{"test.hello.name":"World"},"labels":{"cromwell-workflow-id":"cromwell-1adcd013-64e7-416a-8553-67302f4821f5"},"submission":"2024-08-13T16:42:37.206Z"}' + recorded_at: 2024-08-13 16:43:07 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/fixtures/cromwell_workflow_prep.yml b/tests/fixtures/cromwell_workflow_prep.yml index 687f5f7..b0d1984 100644 --- a/tests/fixtures/cromwell_workflow_prep.yml +++ b/tests/fixtures/cromwell_workflow_prep.yml @@ -4,26 +4,19 @@ http_interactions: uri: http://localhost:8000/api/workflows/v1 body: encoding: '' - string: workflowSource=list(path = "/Users/schambe3/github/getwilds/rcromwell/inst/examples/hello.wdl", - type = "application/octet-stream", name = NULL),workflowInputs=list(path = - "/Users/schambe3/github/getwilds/rcromwell/inst/examples/inputs.json", type - = "application/json", name = NULL) - headers: - Accept: application/json, text/xml, application/xml, */* + string: '' + headers: [] response: status: status_code: 201 - category: Success - reason: Created - message: 'Success: (201) Created' + message: Created headers: - server: akka-http/10.1.15 - date: Sun, 17 Mar 2024 04:49:59 GMT - content-type: application/json - content-length: '66' + Date: Tue, 13 Aug 2024 16:42:37 GMT + Content-Type: application/json + Content-Length: '66' body: encoding: '' file: no - string: '{"id":"d623c127-3085-4e9c-8282-8f877bef0517","status":"Submitted"}' - recorded_at: 2024-03-17 04:49:59 GMT - recorded_with: vcr/1.2.2.91, webmockr/0.9.0 + string: '{"id":"1adcd013-64e7-416a-8553-67302f4821f5","status":"Submitted"}' + recorded_at: 2024-08-13 16:42:37 GMT + recorded_with: vcr/1.6.0, webmockr/1.0.0 diff --git a/tests/testthat/test-cromwell_abort.R b/tests/testthat/test-cromwell_abort.R index 54e1ca0..bd26402 100644 --- a/tests/testthat/test-cromwell_abort.R +++ b/tests/testthat/test-cromwell_abort.R @@ -9,5 +9,5 @@ test_that("cromwell_abort", { expect_equal(NROW(res), 1) expect_named(res, c("id", "status")) - expect_equal(res$status, "Aborted") + expect_equal(res$status, "Aborting") }) diff --git a/tests/testthat/test-cromwell_glob.R b/tests/testthat/test-cromwell_glob.R index d10f83a..a70ffb1 100644 --- a/tests/testthat/test-cromwell_glob.R +++ b/tests/testthat/test-cromwell_glob.R @@ -1,7 +1,7 @@ test_that("cromwell_glob", { vcr::use_cassette("cromwell_glob", { res <- cromwell_submit_batch(wdl = file_hello, params = file_inputs) - # Sys.sleep(20) # Needed only for recording new fixture #nolint + # Sys.sleep(15) # Needed only for recording new fixture #nolint res <- cromwell_glob(res$id) }) diff --git a/tests/testthat/test-error-handling.R b/tests/testthat/test-error-handling.R index a2a1939..f2ddea9 100644 --- a/tests/testthat/test-error-handling.R +++ b/tests/testthat/test-error-handling.R @@ -4,13 +4,15 @@ test_that("proof api or DIY cromwell server down", { # This should happen whether proof or DIY if not on # campus or VPN for Fred Hutch at least # and happens if someone puts in a bad url - - httr::set_callback("response", \(req, res) curl::nslookup("abcdefg")) - expect_error( - cromwell_submit_batch(wdl = file_hello, params = file_inputs), - "Unable to resolve host" + httr2::with_mocked_responses( + \(req, res) curl::nslookup("abcdefg"), + { + expect_error( + cromwell_submit_batch(wdl = file_hello, params = file_inputs), + "Unable to resolve host" + ) + } ) - httr::set_callback("response", NULL) }) test_that("401 unauthorized for proof api", {