可以使用 catchup 来回填 Airflow 中失败的 dag 运行吗?

Can catchup be used to backfill failed dag runs in Airflow?

我读到 Airflows 追赶功能适用于还没有状态的任务实例 - 即调度程序将选择 DAG 尚未 运行 的任何执行日期(从给定的 start_date) - 这是正确的吗?如果是这样,这是否意味着追赶不适用于失败的 DAG 运行?

我正在寻找一种方法来回填任何失败的执行日期,而不是根本没有 运行。

查看 backfill command 选项。你可以使用 rerun-failed-tasks:

if set, the backfill will auto-rerun all the failed tasks for the backfill date range instead of throwing exceptions Default: False

reset-dagruns:

if set, the backfill will delete existing backfill-related DAG runs and start anew with fresh, running DAG runs Default: False

此外,请记住这一点:

If reset_dag_run option is used, backfill will first prompt users whether airflow should clear all the previous dag_run and task_instances within the backfill date range. If rerun_failed_tasks is used, backfill will auto re-run the previous failed task instances within the backfill date range.

在执行上述任何操作之前,我的建议是您先尝试使用一些虚拟 DAG 或类似的东西。