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

packages installed on profiles using install_package endpoint should be removed when profile is stopped #740

Open
marikaris opened this issue May 24, 2024 · 0 comments
Labels
bug 🐛 Something isn't working triage

Comments

@marikaris
Copy link
Collaborator

How to Reproduce

Add an R package to armadillo

library(MolgenisArmadillo)
local_url <- "http://localhost:8080/"
armadillo.login(local_url)
# example, choose your own R package here 
armadillo.install_packages("/Users/mkslofstra/git/dsTidyverse_0.1.0.tar.gz", "xenon")

will get:

Attempting to install package [ '/Users/mkslofstra/git/dsTidyverse_0.1.0.tar.gz' ]
Package [ '/Users/mkslofstra/git/dsTidyverse_0.1.0.tar.gz' ] installed

Go to UI of armadillo, select profiles, look at xenon, see package there in whitelist:
Screenshot 2024-05-24 at 11 46 11

Shut down profile, start it again. That goes well, although "installed package" is still whitelisted.

Login to armadillo:

library(DSMolgenisArmadillo)

token <- armadillo.get_token(url)


builder <- newDSLoginBuilder()
builder$append(
  url = url,
  server = "cohort_1",
  token = token,
  driver = "ArmadilloDriver",
  profile = "xenon")

builder$append(
  url = url,
  server = "cohort_2",
  token = token,
  driver = "ArmadilloDriver",
  profile = "xenon")

logindata <- builder$build()

conns <- datashield.login(logins = logindata, assign = FALSE)

Expected behavior

Login succeeds because the dsTidyverse package isn't there anymore, so it's removed from the whitelist and not causing any trouble, or it's ignored.

Observed behavior

Logging into the collaborating servers
  Login cohort_1 [=======================>-----------------------------------------------]  33% / 0sError: Internal server error: 400 Bad Request: "{"status":"400","key":"REvaluationRuntimeException","args":[],"message":"Error in FUN(X[[i]], ...) : there is no package called ‘dsTidyverse’\n"}"
> 
@marikaris marikaris added bug 🐛 Something isn't working triage labels May 24, 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 triage
Projects
None yet
Development

No branches or pull requests

1 participant