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

Setup Package fail #74

Closed
lguy opened this issue May 22, 2023 · 7 comments
Closed

Setup Package fail #74

lguy opened this issue May 22, 2023 · 7 comments

Comments

@lguy
Copy link

lguy commented May 22, 2023

Hi there,

I really like the Workbench and am very thankful for all the work done around facilitating learning coding. I've used your template to build my own lecture, but am running into issues. I'm not 100% familiar with the inner workings of the Workbench, so please bear with me.
My lecture is available here: https://github.com/lguy/course-microbial-genomics
When pushing the last two commits, I've got errors while building the website: https://github.com/lguy/course-microbial-genomics/actions/runs/5049823304/jobs/9059765686
(see also log copied below).
As far as I can tell, it happens during the Setup Package Cache part:
.github/workflows/sandpaper-main.yaml

This, as far as I can tell, is using the following action of the carpentries:
https://github.com/carpentries/actions/blob/main/setup-lesson-deps/action.yaml

I believe that in that file, the address of the RSPM:
https://github.com/carpentries/actions/blob/646f8b8801847f832091d5abd2ff64e31792f2f4/setup-lesson-deps/action.yaml#LL35C4-L35C4

which in my log translates to "https://packagemanager.posit.co/cran/__linux__/jammy/latest", which returns an error message:
Invalid request, you can test this source by navigating to: /cran/latest/src/contrib/PACKAGES

I believe this might be related to the following issue:
r-lib/remotes#494

That's about where my understanding of the error stops. Can you help me? I'd be happy to provide more details if need be.

Best regards,

Lionel

Register Repositories
Using github PAT from envvar GITHUB_PAT
Skipping install of 'vise' from a github remote, the SHA1 (ee479870) has not changed since last install.
  Use `force = TRUE` to force installation
Package: {{ Package }}
Title: {{ Title }}
Version: 1.0.0
Authors@R: 
    c(person(given = "Jo", family = "Doe", email = "[email protected]",
      role = c("aut", "cre")))
Maintainer: {{ Maintainer }}
Description: {{ Description }}
License: {{ License }}
URL: {{ URL }}
BugReports: {{ BugReports }}
Encoding: UTF-8
Imports: 
    R6 (== 2.5.1),
    Rcpp (== 1.0.10),
    ape (== 5.7-1),
    askpass (== 1.1),
    assertthat (== 0.2.1),
    base64enc (== 0.1-3),
    brio (== 1.1.3),
    bslib (== 0.4.2),
    cachem (== 1.0.8),
    callr (== 3.7.3),
    cli (== 3.6.1),
    clipr (== 0.8.0),
    commonmark (== 1.9.0),
    cpp11 (== 0.4.3),
    crayon (== 1.5.2),
    credentials (== 1.3.2),
    curl (== 5.0.0),
    desc (== 1.4.2),
    digest (== 0.6.31),
    downlit (== 0.4.2),
    ellipsis (== 0.3.2),
    evaluate (== 0.20),
    fansi (== 1.0.4),
    fastmap (== 1.1.1),
    fontawesome (== 0.5.1),
    fs (== 1.6.2),
    gert (== 1.9.2),
    gh (== 1.4.0),
    gitcreds (== 0.1.2),
    glue (== 1.6.2),
    highr (== 0.10),
    htmltools (== 0.5.5),
    httpuv (== 1.6.9),
    httr (== 1.4.5),
    httr2 (== 0.2.2),
    ini (== 0.3.1),
    jquerylib (== 0.1.4),
    jsonlite (== 1.8.4),
    knitr (== 1.42),
    later (== 1.3.1),
    lattice (== 0.21-8),
    lifecycle (== 1.0.3),
    magrittr (== 2.0.3),
    memoise (== 2.0.1),
    mime (== 0.12),
    nlme (== 3.1),
    openssl (== 2.0.6),
    pegboard (== 0.5.2),
    pillar (== 1.9.0),
    pkgconfig (== 2.0.3),
    pkgdown (== 2.0.7),
    processx (== 3.8.1),
    promises (== 1.2.0.1),
    ps (== 1.7.5),
    purrr (== 1.0.1),
    ragg (== 1.2.5),
    rappdirs (== 0.3.3),
    renv (== 0.17.3),
    rlang (== 1.1.1),
    rmarkdown (== 2.21),
    rprojroot (== 2.0.3),
    rstudioapi (== 0.14),
    sandpaper (== 0.11.16),
    sass (== 0.4.5),
    servr (== 0.27),
    stringi (== 1.7.12),
    stringr (== 1.5.0),
    sys (== 3.4.1),
    systemfonts (== 1.0.4),
    textshaping (== 0.3.6),
    tibble (== 3.2.1),
    tinkr (== 0.2.0),
    tinytex (== 0.45),
    usethis (== 2.1.6),
    utf8 (== 1.2.3),
    vctrs (== 0.6.2),
    whisker (== 0.4.1),
    withr (== 2.5.0),
    xfun (== 0.39),
    xml2 (== 1.3.4),
    xslt (== 1.4.4),
    yaml (== 2.3.7),
    zip (== 2.3.0)
[1] "ubuntu" "22.04" 
Error: Error: JSON: EXPECTED value GOT <
Execution halted
Error: Process completed with exit code 1.
@lguy
Copy link
Author

lguy commented May 22, 2023

After some frantic fiddling around (the lesson starts tomorrow), I managed to find a workaround, by forking the carpentries/actions and commenting out the call to vise::ci_sysreqs

https://github.com/lguy/carpentries-actions/blob/main/setup-lesson-deps/action.yaml#L81

            #vise::ci_sysreqs(renv::paths$lockfile(), execute = TRUE)

That temporarily solved the issue:
https://github.com/lguy/course-microbial-genomics/actions/runs/5050333901/jobs/9062179427
and I can now the site can be built. I'm guessing it's only a temporary workaround.

milanmlft added a commit to milanmlft/carpentries-actions that referenced this issue May 23, 2023
@milanmlft
Copy link

Encountering the same issue here: https://github.com/LearnToDiscover/Basic_Python/actions/runs/5051687090/jobs/9063779599#step:9:203

The issue seems to be caused by RStudio/Posit changing its URLs to the new Posit name. It seems to have just been fixed in remotes: r-lib/remotes@e199c1b but there might still be some old URLs lying around in the carpentries actions, e.g. https://github.com/carpentries/actions/blob/646f8b8801847f832091d5abd2ff64e31792f2f4/setup-lesson-deps/action.yaml#LL35C45-L35C45

@milanmlft
Copy link

Can confirm that updating the URLs (rstudio -> posit) and setting Sys.setenv("RSPM_ROOT" = "https://packagemanager.posit.co") fixes the problem: https://github.com/milanmlft/toy-sandpaper-python/actions/runs/5051988388/jobs/9073451713

milanmlft added a commit to milanmlft/carpentries-actions that referenced this issue May 23, 2023
Fixes Setup Package fail carpentries#74
See also r-lib/remotes@e199c1b

(cherry picked from commit 7dd3bdd)
froggleston pushed a commit to milanmlft/carpentries-actions that referenced this issue May 23, 2023
Set `"RSPM_ROOT"` env variable

Fixes Setup Package fail carpentries#74
See also r-lib/remotes@e199c1b

(cherry picked from commit 7dd3bdd)

Fix posit url

Co-authored-by: Toby Hodges <[email protected]>

Empty commit to verify

Fix Posit URLs
@tobyhodges
Copy link
Member

A note to say that this was fixed with #76 (and would have been by #75 if we could have merged it!)

@lguy
Copy link
Author

lguy commented May 23, 2023

Thanks @milanmlft @tobyhodges and @froggleston for a swift solution! I can also confirm that my lesson now compiles correctly when calling carptentries/actions.

@zkamvar
Copy link
Contributor

zkamvar commented May 24, 2023

Thank you @lguy for reporting this issue, for @milanmlft for finding a solution, and @tobyhodges and @froggleston for implementing the fix and interpreting my implied contributing guidelines 😅

milanmlft added a commit to LearnToDiscover/actions that referenced this issue May 26, 2023
* Use my custom sandpaper version

* Set up Python if required

* Fix typo

* Forgot to define `wd`

* Make sure `py-version` is exported

* Fix typo

* Load renv profile before checking Python version

* Need to write `"py-version"` to the proper file

* Revert 3532acf

* Update rstudio URLs to Posit

* Set `"RSPM_ROOT"` env variable

Fixes Setup Package fail carpentries#74
See also r-lib/remotes@e199c1b
@zkamvar
Copy link
Contributor

zkamvar commented Jun 16, 2023

Just a little update,

It turned out there was one more thing that needed to be updated in the workflows, in that the RSPM_ROOT environment variable needed to be set (see r-lib/remotes#757 (comment), fixed in 312309e and e9405d9).

We will eventually move away from the {remotes} package in favour of {pak} as it will be better supported going forward, but the last time we attempted it, {pak} would take up to 10 minutes to bootstrap before downloading packages, so development of this would take some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants