-
Notifications
You must be signed in to change notification settings - Fork 152
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
renv failing on github actions with recent package update #1147
Comments
I've run into a similar issue (carpentries/actions#69). In my case, I'm wondering: could |
Based on the information in carpentries/actions#69, it seems like the package was originally installed from CRAN, and then later re-installed from PPM (which was behind CRAN in this case, unfortunately). If a source version of data.table 1.14.8 had been available on PPM at that time, I feel like part of the problem is that the existing GitHub actions using
So effectively, I don't have a great answer beyond recommending a workflow with something like the following:
I'm not sure how to put this together best with the existing r-lib GitHub Actions, though. 😞 |
See r-lib/actions#702 (comment): the fact that the action is setting |
I think this is somewhat related to #1001 because {renv} is relying on the definition of the The implementation of One thing I notice is that {renv} sets a Lines 53 to 59 in 094c01d
If somehow the user has I think a solution might be to either:
I would be happy to submit a PR implementing one of these if they are the right options. |
Some other thoughts:
|
I'm wondering how this would interact with something like #1001 and wondering if it might be better to introduce something like options(repos = c(RSPM = ...,
"siloed-backup" = ...,
CRAN = ...,
universe = "https://zkamvar.r-universe.dev"))
options(renv.config.repos.equiv = c(name = "CRAN",
RSPM = ...,
"siloed-backup" = ...,
CRAN = ...)) and this would have the effect of RENV understading that anything coming from |
@kevinushey, @zkamvar, @majazaloznik, I am just curious if all this discussion is still relevant in the context of GHA workflows using As for arbitrarily not honoring the repos in the lockfile in GH Actions, I think this is in general very specific and should be an explicit choice, beyond the usage - uses: r-lib/actions/setup-renv@v2
with:
repos: 'c("siloed-backup" = ..., CRAN = ..., universe = "https://zkamvar.r-universe.dev")' to be then used in https://github.com/r-lib/actions/blob/33f03a860e4659235eb60a4d87ebc0b2ea65f722/setup-renv/action.yaml#L44 Otherwise, support for multi-repo One small remark on the |
Not sure if this is related but my GH Actions often fail to install
|
@black-snow I think this is because you are using RSPM (line 34 of your workflow file has According to https://packagemanager.posit.co/client/#/repos/2/overview there was a snapshot taken on 17th March, but I guess at a time on that day just before 0.17.2 landed on CRAN, so RSPM has 0.17.1 at the moment. If you comment out |
@remlapmot thanks! I didn't know that / notice. I'll give it a spin. |
RSPM was updated yesterday, so I think it should have renv 0.17.2 now. |
I think the issues in this thread appear to have been largely resolved; if not, please file a new issue. |
I have a R CMD ckeck workflow with
renv
suddenly failing on github actions with the errorsfailed to retrieve package 'xxx'
and warningWarning: failed to find source for 'xxx' in package repositories
or1: curl: (22) The requested URL returned error: 404 2: failed to find binary for 'xxx' in package repositories
.It is conspicuously not failing on the mac runner but is failing on the windows and all three ubuntu ones.
I am posting this because the errors were not particularly googlable, so hopefully this will be helpful to someone else. It turns out the reason for the failures was that the package in question had just been updated a few days ago. I used
renv::install(package@1.2.3)
to go back one version and that solved the problem.I am also posting this in case there is another less kludgy solution to this issue, because I only half understand what I am doing here :) . My workflow is below.
workflow.yaml
The text was updated successfully, but these errors were encountered: