molgenis / molgenis-service-armadillo

Armadillo; a DataSHIELD implementation, part of the MOLGENIS suite
https://molgenis.github.io/molgenis-service-armadillo/
GNU Lesser General Public License v3.0
7 stars 10 forks source link

release test not successfully whitelisting packages #650

Open timcadman opened 6 months ago

timcadman commented 6 months ago

Expected that this would set packages to be whitelisted:

profile_defaults = data.frame(
  name = c("xenon", "rock"),
  container = c("datashield/rock-dolomite-xenon:latest", "datashield/rock-base:latest"),
  port = c("", ""),
  # Multiple packages can be concatenated using ,, then using stri_split_fixed() to break them up again
  # Not adding dsBase since that is always(?) required
  whitelist = c("resourcer,dsMediation,dsMTLBase", ""),
  blacklist = c("", "")
)

However CI failed because packages (e.g. dsMediation) not present. Workaround is to add package to docker/ci/application.yml

clemens-tolboom commented 6 months ago

This was found in PR #648 and applied a workaround adding dsMediation to the CI xenon whitelist

https://github.com/molgenis/molgenis-service-armadillo/blob/master/docker/ci/application.yml#L34

clemens-tolboom commented 6 months ago
create_profile <- function(profile_name, key, auth_type) {
...
    args <- list(
      name = profile_name, 
      image = profile_default$container, 
      host = "localhost", 
      port = port, 
      packageWhitelist = return_list_without_empty(whitelist),
      functionBlacklist = return_list_without_empty(blacklist),
      options = list(datashield.seed = new_profile_seed)
    )

then args should reflect something similar as

    "packageWhitelist": [
      "my-whitelist-item"
    ],
    "functionBlacklist": [
      "my-blacklist-item"
    ],
    "options": {
      "datashield.privacyControlLevel": "permissive",
      "datashield.seed": "898111733"
    },

but is it called? No ... only through

  create_profile_if_not_available(profile, profiles$available, token, auth_type)
clemens-tolboom commented 5 months ago

We have added the wished for whitelist in

https://github.com/molgenis/molgenis-service-armadillo/blob/master/docker/ci/application.yml#L31-L36

but there is also the default settings when installing Armadillo

https://github.com/molgenis/molgenis-service-armadillo/blob/master/armadillo/src/main/resources/application.yml#L24-L25