Deployment failing on public GitLab Package

We have a public GitLab package here. Staff install it using devtools. It contains a collection of convenience functions for staff doing ad hoc reporting.

## This is how we install the package.
## Not that it is useful to anyone else, but it is public and open source.
devtools::install_gitlab("acuitas-public/acuitasadhoc")

If I create a RMarkdown document directly and it includes:

library(acuitasAdHoc)

and then use RStudio's "Publish" feature, everything works fine. I have been able to install, load, and use the package this way in a RMarkdown document.

However, when I use writeManifest() and deploy to RSC from git, the deployment fails with the following error:

Error: Cannot create packrat data from manifest.json: Cannot transform manifest into packrat.lock: package acuitasAdHoc does not define Repository

But, this is the contents of the manifest.json file.

"acuitasAdHoc": {
      "Source": "gitlab",
      "Repository": null,
      "description": {
        "Package": "acuitasAdHoc",
        "Title": "Acuitas Ad Hoc",
        "Version": "0.3.0",
        "Authors@R": "\n    person(given = \"Andy\",\n           family = \"Choens\",\n           role = c(\"aut\", \"cre\"),\n           email = \"andy.choens@acuitashealth.com\")",
        "Description": "Support functions for the Acuitas Ad Hoc report template. You can find this template at: https://gitlab.com/acuitas_public/ad-hoc-template.",
        "License": "GPL (>= 3)",
        "Encoding": "UTF-8",
        "LazyData": "true",
        "Roxygen": "list(markdown = TRUE)",
        "RoxygenNote": "7.1.1",
        "Imports": "blastula, config, DBI, dplyr, httr, lubridate, magrittr, odbc,\nopenxlsx (>= 4.2.4), purrr, readr, stringr, tibble, tidyr, yaml",
        "Depends": "R (>= 3.60)",
        "Suggests": "devtools, usethis",
        "RemoteType": "gitlab",
        "RemoteHost": "gitlab.com",
        "RemoteRepo": "acuitasadhoc",
        "RemoteUsername": "acuitas-public",
        "RemoteRef": "HEAD",
        "RemoteSha": "715a7b473dedde460fbcff95ea5cff40d6c0079b",
        "NeedsCompilation": "no",
        "Packaged": "2021-08-11 16:01:19 UTC; andy",
        "Author": "Andy Choens [aut, cre]",
        "Maintainer": "Andy Choens <andy.choens@acuitashealth.com>",
        "Built": "R 4.0.5; ; 2021-08-11 16:01:19 UTC; unix"
      }
    }

Thinking this was the problem, I downloaded a bundle created when I pushed to RSC, and looked at that manifest.json file . . . . but the entries for the acuitasAdHoc package are identical. I thought having null for Repository might be causing my trouble. But after looking at the bundle, that does not appear to be the case.

I want to be able to go into RSC and deploy from git, but I'm having a hard time doing that.

Yesterday, I created a public package of GitHub, installed the package from there, and then created a manifest.json file.

And this time, when I tried to deploy from git, everything worked. So it has something to do with how RSC is loading packages.

Because this worked:

"acuitasAdHoc": {
      "Source": "github",
      "Repository": null,
      "GithubRepo": "acuitasAdHoc",
      "GithubUsername": "Choens",
      "GithubRef": "HEAD",
      "GithubSha1": "715a7b473dedde460fbcff95ea5cff40d6c0079b",
      "description": {
        "Package": "acuitasAdHoc",
        "Title": "Acuitas Ad Hoc",
        "Version": "0.3.0",
        "Authors@R": "\n    person(given = \"Andy\",\n           family = \"Choens\",\n           role = c(\"aut\", \"cre\"),\n           email = \"andy.choens@acuitashealth.com\")",
        "Description": "Support functions for the Acuitas Ad Hoc report template. You can find this template at: https://gitlab.com/acuitas_public/ad-hoc-template.",
        "License": "GPL (>= 3)",
        "Encoding": "UTF-8",
        "LazyData": "true",
        "Roxygen": "list(markdown = TRUE)",
        "RoxygenNote": "7.1.1",
        "Imports": "blastula, config, DBI, dplyr, httr, lubridate, magrittr, odbc,\nopenxlsx (>= 4.2.4), purrr, readr, stringr, tibble, tidyr, yaml",
        "Depends": "R (>= 3.60)",
        "Suggests": "devtools, usethis",
        "RemoteType": "github",
        "RemoteHost": "api.github.com",
        "RemoteRepo": "acuitasAdHoc",
        "RemoteUsername": "Choens",
        "RemoteRef": "HEAD",
        "RemoteSha": "715a7b473dedde460fbcff95ea5cff40d6c0079b",
        "GithubRepo": "acuitasAdHoc",
        "GithubUsername": "Choens",
        "GithubRef": "HEAD",
        "GithubSHA1": "715a7b473dedde460fbcff95ea5cff40d6c0079b",
        "NeedsCompilation": "no",
        "Packaged": "2021-08-11 19:18:00 UTC; andy",
        "Author": "Andy Choens [aut, cre]",
        "Maintainer": "Andy Choens <andy.choens@acuitashealth.com>",
        "Built": "R 4.0.5; ; 2021-08-11 19:18:01 UTC; unix"
      }

I made ZERO code changes to acuitasAdHoc from GitLab to GitHub. In fact, when I installed the package from GitHub onto my computer, I had to force the install because the package has was the same. But once I did that, I was able to successfully deploy the application.

And that's great, except for the fact that we have a paid license on GitLab and I don't really want to have to manage our public things on GH and our private things on GL. That would be awkward.

Could you tell us what versions of packrat and rsconnect are used in your environment? Older versions of these packages did not capture the necessary GitLab details in the deploy manifest.

You'll need at least packrat 0.6.0 and rsconnect 0.8.17.

Please let us know if updating these two packages does not resolve your problem.

  • packrat 0.6.0
  • rsconnect 0.8.24

I'm still exploring the possibility that it is some sort of a weird networking thing because our network is locked down pretty tight, but it is weird to me that having the package on GH works.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.