airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Feature: when rerun the upstream job,will automatically run the downstream tasks

Open adadle opened this issue 11 years ago • 3 comments

In our use case , we suggest that we can add the feature . Sample flow as A->B A->C A->D when one TI of A finished,it will run B/C/D coresponding TI . usually in rerun some previous tasks.

adadle avatar Sep 11 '15 02:09 adadle

The way we typically do this is by clearing first either through the CLI or the UI (include downstream!), and then reprocessing, either by letting the scheduler pick up the tasks, or by running a backfill command which will only fill in the blanks (the tasks you just cleared)

The combination of clear and backfill allows to perform practically any surgery on a DAG in a few commands.

mistercrunch avatar Sep 18 '15 15:09 mistercrunch

Hitching onto this issue, a related question: Does @mistercrunch's answer imply the scheduler now picks up previously successful task instances if they are cleared (either in the CLI or the UI)? I'm confused because the docs state re: the scheduler It will not fill in gaps; it only moves forward in time from the latest task instance on that task

timeisapear avatar Sep 19 '15 18:09 timeisapear

@timeisapear: nope, the scheduler still does not fill in gaps, but backfill does.

Though it's fairly common to clear downstream and future from the UI, in which case there are no gaps, and the scheduler will move forward.

For context, the main reason why the scheduler does not fill gaps is that it would cost much more to figure out everything that needs to get triggered and put much more load on the database and scheduler. I want to keep this very lean so that we can trigger every minute or so.

mistercrunch avatar Sep 19 '15 20:09 mistercrunch