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

tar_target/tar_option_set error argument #405

Closed
2 of 6 tasks
mattwarkentin opened this issue Apr 8, 2021 · 1 comment
Closed
2 of 6 tasks

tar_target/tar_option_set error argument #405

mattwarkentin opened this issue Apr 8, 2021 · 1 comment

Comments

@mattwarkentin
Copy link
Contributor

mattwarkentin commented Apr 8, 2021

Prework

  • Read and agree to the code of conduct and contributing guidelines.
  • If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
  • For any problems you identify, post a minimal reproducible example like this one so the maintainer can troubleshoot. A reproducible example is:
    • Runnable: post enough R code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the tidyverse style guide.

Description

Hey @wlandau,

I think the functions tar_target() and tar_option_set() are missing documentation for error = "workspace". Right now the documentation makes it seem like the only options are "stop" and "continue". I vaguely recall this used to be documented but seems to be absent now.

Character of length 1, what to do if the target runs into an error. If "stop", the whole pipeline stops and throws an error. If "continue", the error is recorded, but the pipeline keeps going.

While I'm thinking about it, should error = "workspace" even be an option? Shouldn't a user have the option to save a workspace regardless of whether the pipeline stops or continues when an error is thrown? In other words, I would think error should only be able to take the values "stop" or "continue", and in either case, if the failed target is named in workspaces = "...", then the workspace is saved. Thoughts? It's late and I'm tired, so maybe this won't make sense when I look at it again in the morning.

@wlandau
Copy link
Member

wlandau commented Apr 9, 2021

Thanks, that's a piece of documentation I forgot to update. Fixed now.

error = "workspace" saves just the most useful workspace files in most situations. If we keep going and keep saving workspaces, the files in the data store might get out of hand. This would have been an issue in earlier versions of targets when workspace files were deep copies of data, but I still would like to avoid situations like ropensci/drake#154 which were a huge problem because of how drake's storage system was designed. And this problem is combined with the fact that we do not always know in advance which specific targets are going to error. That matters in huge simulation studies with dynamic branching, where it is hard to isolate which branches fail.

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