[
https://issues.apache.org/jira/browse/AIRFLOW-4216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jannik Franz updated AIRFLOW-4216:
----------------------------------
Description:
When using Sensors and having them as root tasks (such as no prior dependency
task) and using mode 'reschedule' then the DAG state will be set to 'failed'
and tasks won't be rescheduled.
This is when the state of a DAG is updated it doesn't check for
'up_for_reschedule' in tasks properly and sets the state to failed.
The expected behaviour would be to reschedule the task without failing the DAG.
was:
When using Sensors and having them as root tasks (such as no prior dependency
task) and using mode 'reschedule' then the DAG state will be set to 'failed'
and tasks won't be rescheduled.
This is because the 'update_state' method for the DAG doesn't check for
'up_for_reschedule' in tasks properly:
[https://github.com/apache/airflow/blob/master/airflow/models/__init__.py#L4606]
The expected behaviour would be to reschedule the task without failing the DAG.
The workaround currently is adding a DummyOperator (or similiar) before the
Sensor.
> Sensors not rescheduled when root task with 'reschedule' mode
> -------------------------------------------------------------
>
> Key: AIRFLOW-4216
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4216
> Project: Apache Airflow
> Issue Type: Bug
> Reporter: Jannik Franz
> Priority: Major
>
> When using Sensors and having them as root tasks (such as no prior dependency
> task) and using mode 'reschedule' then the DAG state will be set to 'failed'
> and tasks won't be rescheduled.
> This is when the state of a DAG is updated it doesn't check for
> 'up_for_reschedule' in tasks properly and sets the state to failed.
> The expected behaviour would be to reschedule the task without failing the
> DAG.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)