pre "chaining" appears to be broken #120

sigil66 opened this Issue Feb 27, 2014 · 4 comments


None yet

2 participants

sigil66 commented Feb 27, 2014

When utilizing the following code via collection 'test' precheck() never executes. If all the methods are specified in pre via default= then the expected behavior is observed.

   from invoke import task

    def precheck():

    def check():

    @task(default=True, pre=['test.check'])
    def run():

Related to #123 though a bit different.

Not sure this angle has been tested/thought about either; I would assert that you don't want the tasks to have to know "which" collection they're in at the moment, in case that changes/gets renamed/etc.

Meaning the above should turn into eg @task(pre='precheck') (n.b. you can just skip 'pre' and say @task('precheck')) and we should ensure the code correctly handles this (I'm not sure it would at the moment.)

sigil66 commented Mar 4, 2014

Well I tried that and it errored out with a task not found error when the task was not namespaced.

This was referenced Apr 17, 2014

At this point in time the string version of pre-task declaration is dead, so that removes that part of the confusion.

While redoing the pre-task stuff, there's definitely situations that are broken which resemble the above (e.g. a pretask of a pretask is not executed). Will be ensuring that this case works before the new functionality is released. (See also #123)


Pre-emptively closing this now that the work is basically all done. Using #123 as the place to keep final notes as I wrap it up.

@bitprophet bitprophet closed this May 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment