-
-
Notifications
You must be signed in to change notification settings - Fork 619
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
run: once
not working for a task included multiple times
#1498
Comments
run: once
not working for a task included multiple times
Would it make sense to use the hash of location instead of the Task.Task? Looking at what fields are available in Task, that looks like the quickest way to get a unique id for the task no matter how it's included. Additionally, would it make sense to add a new value to the run enum to differentiate once per include vs once across all includes? Happy to put up a PR if I'm going down the right track for this |
This bug is biting us too at the moment. We can't really work around this, because it also means that of some tasks we will have multiple running at the same time. |
The issue is that |
This bug was fixed in #1655. The example given by @maxmzkrcensys now works as intended (since v3.38.0). |
When multiple task files include the same file and then depend on the same task, the depended on task gets executed twice even when
run: once
is set.In the setup I have 4 taskfiles. tools/taskfile.yml defines building a tool that is needed to build the a and b lib. lib/a/taskfile.yml and lib/b/taskfile.yml both include tools/taskfile.yml and depend on the building of the tool. The root taskfile.yml includes lib/a and lib/b and defines an all task to build both lib/a and lib/b.
Even with
run: once
set in the task that builds the tool, the task gets run twice.Note that if the taskfiles are collapsed into a single task file, this issue is not present.
The text was updated successfully, but these errors were encountered: