Airflow - 如何忽略回填中的成功任务?

Airflow - How do I ignore succeeded tasks in a backfill?

我向我的 DAG 添加了新任务,它需要回填它们。目前,当我 运行 airflow backfill 它 运行 是所有任务(新任务和旧任务)时,我想忽略已经成功的旧任务。

有什么方法可以跳过回填中状态为成功的任务吗?

从 Airflow 版本 1.8.1 开始,成功的任务不应由回填安排,请参阅 AIRFLOW-1124

请注意,您还可以在回填中指定要 运行 的任务:

-t TASK_REGEX, --task_regex TASK_REGEX
                    The regex to filter specific task_ids to backfill
                    (optional)

如果您的新任务依赖于任何可能未成功的旧任务,忽略依赖项标志也可能对您有所帮助。

-i, --ignore_dependencies
                    Skip upstream tasks, run only the tasks matching the
                    regexp. Only works in conjunction with task_regex