Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the release-test, "verify_assign_expression" in verify-resources.R fails #699

Open
timcadman opened this issue Mar 13, 2024 · 0 comments
Assignees
Labels
bug 🐛 Something isn't working

Comments

@timcadman
Copy link
Contributor

How to Reproduce

Within the test script, uncomment out function verify_assign_expression in test-cases/verify-resources.R
Run release_test.R

Expected behavior

Test passes

Observed behavior

Error in `cli_alert_danger(datashield.errors())`:
! Could not parse cli `{}` expression: `"status":"400","key…`.
Caused by error in `parse(text = code, keep.source = FALSE)`:
! <text>:1:15: inesperado ','
1: "status":"400",
                  ^
---
Backtrace:
 1. global verify_resources(project = project1, resource_path = "ewas/GSE66351_1", …
 2. global verify_assign_expression()
 3. base::tryCatch({ …
 4. base::tryCatchList(expr, classes, parentenv, handlers)
 5. base::tryCatchOne(expr, names, parentenv, handlers[[1L]])
 6. global value[[3L]](cond)
 7. cli::cli_alert_danger(datashield.errors())
 8. cli:::cli__message("alert_danger", list(text = glue_cmd(text, .envir = .envir, …
 9. "id" %in% names(args)
10. cli:::glue_cmd(text, .envir = .envir, .call = sys.call())
11. cli:::glue(str, .envir = .envir, .transformer = transformer, .cli = TRUE, …
12. (function (expr) …
13. .transformer(expr, .envir) %||% character()
14. local .transformer(expr, .envir)
15. parse(text = code, keep.source = FALSE) %??% cli_error(call. = caller, …
16. cli:::chain_error(expr, err, srcref = utils::getSrcref(sys.call()))
17. | base::withCallingHandlers({ …
18. base::parse(text = code, keep.source = FALSE)
19. base::.handleSimpleError(function (e) …
20. | local h(simpleError(msg, call))
21. | cli:::throw_error(err, parent = e)

It appears the try_catch is not working correctly. If you remove that, and R the same code lines on R you are returned the error:

Error: There are some DataSHIELD errors, list them with datashield.errors()
> datashield.errors()
$study1
[1] "Execution failed: 400 Bad Request: \"{\"status\":\"400\",\"key\":\"REvaluationRuntimeException\",\"args\":[],\"message\":\"Error in get(private$.symbol, envir = private$.env) : \\n  invalid first argument\\n\"}\""
@timcadman timcadman added bug 🐛 Something isn't working triage labels Mar 13, 2024
@timcadman timcadman self-assigned this Mar 13, 2024
@timcadman timcadman removed the triage label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant