Skip to content

Adding wrong "source" path breaks registry irrecoverably #122

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

Closed
adibender opened this issue Jul 20, 2017 · 1 comment
Closed

Adding wrong "source" path breaks registry irrecoverably #122

adibender opened this issue Jul 20, 2017 · 1 comment

Comments

@adibender
Copy link

When I have a registry and I want to add a file to source retrospectively, the only way I see at the moment is

reg$source <- c(reg$source, "incorrect/path/file.R")
saveRegistry()

However, if the file or path provided does not exist, reloading the registry (after restarting R session), throws error and non of the registry functions will work

Error in sys.source(fn, envir = .GlobalEnv) : 
  'incorrect/path/file.R' is not an existing file

This is problematic especially when the registry already contains a lot of jobs.

I don't see a way to fix this, except to maybe create the "incorrect" path/file on the file system -> load the registry -> correct path

Maybe worth adding sth like

addSource <- function(src, reg=getDefaultRegistry())  {
  assertFileExists(src)
  reg$source <- c(reg$source, src)
}

would be appropriate?

@mllg mllg closed this as completed in e33afed Jul 20, 2017
@mllg
Copy link
Member

mllg commented Jul 20, 2017

Should be fixed now. On the master you now get a warning if any dependency is not satisfied so that you can fix it yourself. On the master and with testJob() this still raises an exception.

jakob-r added a commit that referenced this issue Sep 25, 2017
* robustify doJobCollection

* new backports

* Update Travis (#111)

* selectively import backports

* fix travis

* removed remotes from desc

* Warn about factors in addExperiments (#112)

* fix appveyor

* relative path handling

* improved docs for reduceResults

* paths

* added tibble to suggests to check xrefs

* improve getLogFiles

* fix logs

* fixed visibility in shared object

* Add support for `partition` in slurm template (#118)

Agreed. Thanks for the PR.

* fix testJob for win?

* simplified path lookup

* added some tests

* use %chin%

* added some comments

* docs

* docs

* fixed a bug where time stamps where rounded to seconds

* fixed printing of remaining runtimes

* fixed error message

* use withr

* warn instead of stop on the master if not all depenencies are satisfied (fixes #122)

* fix travis

* removeExperiments returns ids invisibly

* fix heuristic of getJobPars

* improved message

* always use winslash

* file.path/winslash

* vignettes

* updated README [ci skip]

* updated README [ci skip]

* docs

* depend on withr 2.0.0

* Job names (#124)

* updated NEWS

* increase version number for CRAN release

* vignette and docs

* vignette

* docs

* NEWS formating

* docs

* increase version number after CRAN release

* improved docs of reduceResults (fixes #116)

* fix for #135

* added test, fixes #135

* fix test

* README

* small fix in printer

* read-only mode (#137)

* ClusterFunctions rework: Do not swallow system errors (#138)

* added update routine for job.name

* NEWS

* improved control over sleep duration; nodename in cfSlurm

* Wait for jobs rework (#140)

* wait for brewed file before submit

* version, docs

* increased version after release

* updated travis

* fix links in vignette (#142)

* version 0.9.6

* added test for algo caching

* test for PM
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

No branches or pull requests

2 participants