Closed orichters closed 1 year ago
Seems like /home/lavinia/.cache/R/R.cache/styler
has too restrictive permissions, but that's in Lavinia's home folder (because cronjobs now run using her user account) so I cannot check or change that. Can you have a look @LaviniaBaumstark ?
The strange thing is that this happens not every time. The other AMTs went well, same in the past. Same with the second attempt of the test. No idea what is going on there.
Just deactivate the styler caching. It's not used anyway.
@0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q: How can this be done?
echo 'options(R.cache.enable = FALSE)' >> .Rprofile
options("styler.cache_name" = NULL)
I'll just put this into our global .Rprofile
. We're using styler so infrequently that I don't think small performance improvements justify dealing with weird errors like this. I checked with Lavinia and her file permissions on the folder seem fine.
Seems like
/home/lavinia/.cache/R/R.cache/styler
has too restrictive permissions, but that's in Lavinia's home folder (because cronjobs now run using her user account) […]
So Lavinia's home directory has too restrictive permissions for the cron job running on her account?
options("styler.cache_name" = NULL) I'll just put this into our global
.Rprofile
.
You can't set NULL
options. That won't work.
Setting an option to NULL removes it altogether (as if it was not set at all). In this case it indeed doesn't work because styler checks onLoad whether the option is set. I don't see a way to disable the styler cache via options/envvars so I'll ask Lavinia to create the missing folder manually and hope for the best.
echo 'options(R.cache.enable = FALSE)' >> .Rprofile
This does disable R.cache in general, not only for styler, so it seems overkill to put this into the global .Rprofile
echo 'options(R.cache.enable = FALSE)' >> .Rprofile
This does disable R.cache in general, not only for styler, so it seems overkill to put this into the global .Rprofile
We don't use any other package that uses R.cache
.
Alternatively, since styler
is only used via style_file()
in lucode2::autoFormat()
, and since that function is called nowhere and only going to be invoked by the user, one can move styler
to Suggests:
and call styler::style_file()
, while guarding with rlang::check_installed('styler')
.
That way styler
is not uselessly attached every time lucode2
is attached, and doesn't fail fiddling with its cache for whatever reason.
That's a good idea, will do that :+1:
Thank you both!
One of the AMT REMIND runs failed very early, just stating this in
log.txt
:see
/p/projects/remind/modeltests/remind/output/SSP5-NDC-AMT_2023-06-03_07.50.43/log_beforeRestart.txt
This check job in pik-piam/modelstats failed with:
That is a bit annoying, can we somehow make sure this does not happen anymore? Maybe @pfuehrlich-pik, do you have an idea?