What's the best way for troubleshooting why a task runs?

33 views
Skip to first unread message

sabbott....@gmail.com

unread,
Jul 15, 2016, 9:28:21 PM7/15/16
to python-doit
I have a task with:

        'targets': output_files,
        'task_dep': ['update_base_image_versions']


output_files is a list: 
[u'FinMason_VB_Base-0.2.1.box', u'FinMason_AMI_Base-0.2.1.box', 'output-virtualbox-ovf/finmason_base-disk1.vmdk', 'output-virtualbox-ovf/finmason_base.ovf']

When run with `doit pack_base_image`, the output shows:
-- update_base_image_versions
.  pack_base_image


Which means update_base_image_versions is uptodate.

All the files exist after a run.  But then if I run `doit pack_base_image` again, it runs again.

Will it ALWAYS run the task I call? Do I need to set a top level task that just doesn't care?  Why is that task running?  How do I troubleshoot the choice to run or not run a task?

Thanks!

Jonas Wagner

unread,
Jul 15, 2016, 9:49:58 PM7/15/16
to pytho...@googlegroups.com
Hi,

A task dependency only specifies that one task should run after another. It doesn't influence whether or not a task is up-to-date. You need to add some targets to the task, or use another mechanism for that.

This (admittedly unintuitive) behavior is described here: http://pydoit.org/dependencies.html#task-dependency

Cheers,
Jonas

--
You received this message because you are subscribed to the Google Groups "python-doit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-doit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages