我在subdag中有一个任务(名为task1
),dag运行已完成。然后我将task1
重命名为task2
,然后使用“气流清除”重新运行以前的dag运行。然后子子目录始终处于运行状态。当我放大子目录时,可以看到子目录的状态为成功,并且所有任务已成功完成。
subdag的日志显示Airflow仍在等待task1
(但标记为“已删除”):
[2018-08-22 23:53:04,032] {base_task_runner.py:95} INFO - Subtask: [2018-08-22 23:53:04,032] {jobs.py:2002} INFO - [backfill progress] | finished run 1 of 1 | tasks waiting: 1 | succeeded: 5 | kicked_off: 0 | failed: 0 | skipped: 5 | deadlocked: 0 | not ready: 0
[2018-08-22 23:53:04,032] {base_task_runner.py:95} INFO - Subtask: [2018-08-22 23:53:04,032] {jobs.py:2006} INFO - Finished dag run loop iteration. Remaining tasks [<TaskInstance: task1 2018-08-08 15:13:02 [removed]>]
[2018-08-22 23:53:09,050] {base_task_runner.py:95} INFO - Subtask: [2018-08-22 23:53:09,049] {jobs.py:2002} INFO - [backfill progress] | finished run 1 of 1 | tasks waiting: 1 | succeeded: 5 | kicked_off: 0 | failed: 0 | skipped: 5 | deadlocked: 0 | not ready: 0
[2018-08-22 23:53:09,050] {base_task_runner.py:95} INFO - Subtask: [2018-08-22 23:53:09,050] {jobs.py:2006} INFO - Finished dag run loop iteration. Remaining tasks [<TaskInstance: task1 2018-08-08 15:13:02 [removed]>]
[2018-08-22 23:53:14,068] {base_task_runner.py:95} INFO - Subtask: [2018-08-22 23:53:14,067] {jobs.py:2002} INFO - [backfill progress] | finished run 1 of 1 | tasks waiting: 1 | succeeded: 5 | kicked_off: 0 | failed: 0 | skipped: 5 | deadlocked: 0 | not ready: 0
[2018-08-22 23:53:14,068] {base_task_runner.py:95} INFO - Subtask: [2018-08-22 23:53:14,068] {jobs.py:2006} INFO - Finished dag run loop iteration. Remaining tasks [<TaskInstance: task1 2018-08-08 15:13:02 [removed]>]
[2018-08-22 23:53:19,083] {base_task_runner.py:95} INFO - Subtask: [2018-08-22 23:53:19,083] {jobs.py:2002} INFO - [backfill progress] | finished run 1 of 1 | tasks waiting: 1 | succeeded: 5 | kicked_off: 0 | failed: 0 | skipped: 5 | deadlocked: 0 | not ready: 0
[2018-08-22 23:53:19,084] {base_task_runner.py:95} INFO - Subtask: [2018-08-22 23:53:19,083] {jobs.py:2006} INFO - Finished dag run loop iteration. Remaining tasks [<TaskInstance: task1 2018-08-08 15:13:02 [removed]>]
我正在使用apache-airflow 1.8.1。 我现在该怎么办?
答案 0 :(得分:0)
是否可以不使用sub-dag重新创建错误? Airflow将每个子细分视为一个顶点,而不是整个图形,因此,当您更改一个任务时,它会更新该子细分,但该更改不会传播回父DAG。
气流处理子悬挂的方式可能会带来意想不到的后果,因此大多数社区建议远离它们。
答案 1 :(得分:0)
您必须更改子数据的名称。由于Airflow如何将DAG的信息保存在元数据数据库中,因此,每次在DAG中进行重大更改时,都需要更改DAG名称。
这就是DAG命名约定为my_dag_v1
的原因,以便您每次进行更改时都可以方便地更新v
号。