Propagate run:once errors to all dependents#2614
Propagate run:once errors to all dependents#2614edrevo wants to merge 4 commits intogo-task:mainfrom
Conversation
|
Hi @andreynering / @vmaerten! I see you've been active lately on the repo by merging PRs. Is there anything I could do to get this PR reviewed? I am happy to make any changes required to get this through. Thanks for your hard work on this project! |
|
Any update on this one? I have been hitting the very same issue 😕 Merging this would be great cc @andreynering & @vmaerten 🙏 |
|
Gentle ping on this PR. I still have hopes of being able to getting it reviewed. |
|
@edrevo Can you update your simple example so that demonstrates the behaviour this fixes. And why is this behaviour not a bug? |
|
@trulede , done.
I would consider it a bug. But I'm not sure what the project's policy is regarding breaking changes (even if due to bugs). I am happy to rework and simplify the code to force the correct behavior for everyone, if you agree it is a bug. |
|
I think this is a bug and the PR should be updated accordingly. @vmaerten may have a more authoritative opinion on that. |
Motivation
Let's say we have this Gremlins-inspired Taskfile.yml
Just for context, Gremlins cannot be fed or bathed after midnight or they will become evil.
If it is after midnight and we run
task feed-gremlinsthe task fails. Same thing fortask bathe-gremlins. However, if we runtask bathe-gremlins feed-gremlins --parallelthen one of the tasks will run and the other will be skipped, and we end up with an evil Gremlin.Which one depends entirely on timing issues.
Change
This PR propagates not only the completion status of dependent tasks, but also the exit status of the tasks. That means that if task A has task B as a dependency, it will never run if task B failed (this is currently not the case).
I have taken the conservative route and added the new behavior behind a CLI flag, although I would personally define this as a bug given the fact that which task gets run and which doesn't is non-deterministic.