Skip to content

Dev deployment failing #143

@matt-dray

Description

@matt-dray

I tried to deploy a dev version of TPMA explorer. A dev deployment is needed now that the prod version is available to the public.

Despite adding the env vars (then re-adding them to be sure), the app errors when trying fetch data.

The logs seem to be continually fill with errors when I open them, to the extent that it borks the log window (it's blank when scrolling up or down). The 'download logs' button also doesn't work, so I can't really investigate what the issue might be.

Why would this happen?

Aside, for posterity: I had updated the deploy script like so, making it easier to deploy to prod or dev in future:

deploy <- function(type = c("dev", "prod")) {
  type <- match.arg(type)

  # prod details
  app_id <- 200
  app_name <- "tpma-explorer"
  app_title <- "TPMA explorer"

  if (type == "dev") {
    app_id <- 298  # <--- UPDATE THIS
    app_name <- paste0(app_name, "-dev")
    app_title <- paste(app_title, "(dev)")
  }

  rsconnect::deployApp(
    appName = app_name,
    appTitle = app_title,
    server = "connect.strategyunitwm.nhs.uk",
    appId = app_id,
    appFiles = c(
      "R",
      "inst",
      "NAMESPACE",
      "DESCRIPTION",
      "app.R"
    ),
    lint = FALSE,
    forceUpdate = TRUE
  )
}

# Deploy development version between releases to
# https://connect.strategyunitwm.nhs.uk/tpma-explorer-dev/
deploy(type = "dev")

# Deploy on release to
# https://connect.strategyunitwm.nhs.uk/tpma-explorer/
deploy(type = "prod")

Will need to update the appId value for the dev version when it gets redeployed in future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions