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

Specify renv version in renv action #825

Closed
boshek opened this issue Apr 15, 2024 · 7 comments
Closed

Specify renv version in renv action #825

boshek opened this issue Apr 15, 2024 · 7 comments

Comments

@boshek
Copy link

boshek commented Apr 15, 2024

👋 thank you for maintaining this action. renv is such a useful tool and having this in place really completes the user experience.

Is your feature request related to a problem? Please describe.
Last week an renv version was shipped to CRAN that had a bug in it. The maintainer was very responsive and shipped a fixed version very quickly. However, I think that a broken CRAN version of renv makes this action unuseable because it has to install the latest version of renv from CRAN here.

So for example in this nightly job here when renv 1.0.6 turned out to be have a bug, we got this issue in CI: https://github.com/ursacomputing/crossbow/blob/cec652591e63edc8f1b1d096f30ca6ad3ff6bfef/.github/workflows/nightly_dashboard.yml#L60-L66

AFAIK, there is not a way with this action to say "please install renv version X" only (i.e. pin the first installation of renv itself).

Describe the solution you'd like
It would be nice, in situations where renv is broken on the latest CRAN to be able to provide an input to install an older version as a workaround for any GHA that depends on this. I am happy to contribute this so I am wondering if you would consider an optional input to install an older version of renv as an easier workaround for folks. The default would be latest on CRAN but one could at least revert back if needed. Maybe there is another way to accomplish this so apologies if I've missed that.

Describe alternatives you've considered
I did think whether setting the default repo to something like r-universe is a good workaround but to me reverting the version of renv is the solution that most people would first think about.

Additional context
Add any other context or screenshots about the feature request here.

@gaborcsardi
Copy link
Member

You forgot to link to a workflow and a workflow run where this is a problem.

@boshek
Copy link
Author

boshek commented Apr 15, 2024

thanks @gaborcsardi. updated.

@gaborcsardi
Copy link
Member

If you run the action in the subdirectory that contains the .Rprofile file, then it will install the version that you specify in your renv.lock file, I believe.

@boshek
Copy link
Author

boshek commented Apr 15, 2024

OK thanks. So that is probably the preferred way then? Rather then have an input for version?

@gaborcsardi
Copy link
Member

We can have an input, but in any case, the R version should be in renv.lock, and that is the one that should be installed by default.

This is already the case when you have the usual .Rprofile, created by renv, in the repo, but otherwise it is not.

@gaborcsardi
Copy link
Member

Seems like we don't need to do anything here, so I am going to close this. Please reopen if you still have issues.

Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants