-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Description
If a and b tasks has the same pre and post tasks and I run both of them, the post task runs usually in a wrong place. The expected/actual task orders are:
| Command | Expected | Actual |
|---|---|---|
invoke a b |
pre a b post |
pre a post b |
invoke a b post |
pre a b post |
pre a post b |
invoke pre a b post |
pre a b post |
pre a post b |
invoke post a b post |
post pre a b post |
as expected 👍 |
With Invoke version: 0.11.1.
tasks.py
from invoke import task
@task
def pre(): print('pre')
@task
def post(): print('post')
@task(pre=[pre], post=[post])
def a(): print('a')
@task(pre=[pre], post=[post])
def b(): print('b')Debug output
executor: Deduplicating tasks...
executor: <Task 'pre'>: ok
executor: <Call 'a', args: () kwargs: {}>: ok
executor: <Task 'post'>: ok <--------------------- ???
executor: <Task 'pre'>: skipping
executor: <Call 'b', args: () kwargs: {}>: ok
executor: <Task 'post'>: skipping <--------------- !!!
executor: Executing <Task 'pre'>
executor: Executing <Task 'a'> as a
executor: Executing <Task 'post'>
executor: Executing <Task 'b'> as b
Metadata
Metadata
Assignees
Labels
No labels