Closed cryanking closed 9 months ago
ok, trying to reproduce without Docker (which I am not familiar with, though I understand what it is). Can you try re-running the meta.groundhog() command right after you get the error? When I produce an error that may be what you are getting, the meta() command runs successfully the 2nd time (not proposing this as a solution, but as a way to diagnose)
I get the same result as you in that base image: after the error message, running meta.groundhog once gives the error message, running a second time announces "Now using $groundhog_version". That worked upgrading from 3.1.0 to 3.1.1 and 3.1.2. I have to play around with times to force a downgrade, but maybe it is just the error message trigger that is faulty.
If you want a reproducible environment, you can omit the line from the dockerfile
RUN R -e "options(repos = c(CRAN = 'https://cloud.r-project.org')); library(groundhog); set.groundhog.folder('/root/R_groundhog/'); meta.groundhog('2023-10-01')"
and build it docker build -f dockerfile2.dockerfile -t bugtestlocal .
to get a standard image and back at the terminal
docker run --rm -it bugtestlocal R
I have figured out the bug. It had to do with how groundhog handles conflicts between a loaded package, and a package being installed from source. When installing an old enough version of groundhog that was not available as binary the problem would be triggered (as meta.groundhog() would install from source). This is not a scenario that was part of the battery of tests i was running. I have fixed the problem, should be included in an update i hope to submit to CRAN later this week.
I have a dockerfile intended to create a fixed container for a published analysis. If I use meta.groundhog to force a change in version (to the state when I started the analysis), it fails without explanation. I get the same failure if I start from groundhog 3.1.2 or 3.1.0. I do not get the error when I set the target date as 10-14-2023 (the most recent allowable, targets 3.1.2 so should pull straight from CRAN).
The dockerfile:
The output: