dvc: redefine is_callback as cmd and no outs/deps#5187
Conversation
b132c3b to
bf609d6
Compare
bf609d6 to
989e5f2
Compare
|
Though this might still be useful for cmd-only stages. Or maybe we should error-out in that case and require Errors or warnings might be distracting. Changing the definition to cmd + no deps or outs is an explicit way to handle this(yet useless), but we might add an error or a warning at stage creation though. |
989e5f2 to
ba5af01
Compare
ba5af01 to
b5291ca
Compare
|
Thinking some more about it, it makes sense to get rid of is_callback, but actually forbid cmd with no deps/outs, as that is a 100% an error. |
b5291ca to
2a277c1
Compare
|
The harmful behavior was that having no deps caused always_changed-like behavior, which could often be undesired. The case where we don't have outs or deps is still a corner-case though, where we can assume either that such stage is always changed or always unchanged. Both are pretty much useless, but the former one makes more sense to me and that is something that I would expect from dvc. We could consider forbidding |
Old cmd + no deps definiton has been obsoleted since 1.0 in favor
of --always-changed and doesn't affect our ability to read history for
metrics/plots/etc so we are safe to drop the support for 2.0 onwards.
Fixes #1407
❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
We don't have any mention of callbacks since 1.0 so no changes for docs required.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏