You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Christopher (JIRA)" <ji...@apache.org> on 2018/12/19 20:08:00 UTC

[jira] [Updated] (AIRFLOW-3543) rescheduled tasks block DAG deletion

     [ https://issues.apache.org/jira/browse/AIRFLOW-3543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher updated AIRFLOW-3543:
---------------------------------
    Summary: rescheduled tasks block DAG deletion  (was: rescheduled block DAG deletion)

> rescheduled tasks block DAG deletion
> ------------------------------------
>
>                 Key: AIRFLOW-3543
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3543
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: cli, database
>         Environment: postgres 10 database
>            Reporter: Christopher
>            Priority: Critical
>
> This applies to current master branch after [AIRFLOW-2747|https://github.com/apache/incubator-airflow/commit/dc59d7e2750aa90e099afad8689f2646f18f92a6] was merged. 
> Once a sensor task is rescheduled, the task cannot be deleted from the DB due to a foreign key constraint. This prevents deletion of tasks and DAGS. This occurs regardless of whether the DAG is still running or whether the sensor is actually rescheduled to run in the future or not (ie the task may complete successfully but its entry still resides as a row in the task_reschedule table.
>  
> I am running a postgres-backed airflow instance.
>  
> {{Traceback (most recent call last):}}
> {{ File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context}}
> {{context)}}}}
> {{File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute}}}}
> {{cursor.execute(statement, parameters)}}
> {{psycopg2.IntegrityError: update or delete on table "task_instance" violates foreign key constraint "task_reschedule_dag_task_date_fkey" on table "task_reschedule"}}
> {{DETAIL: Key (task_id, dag_id, execution_date)=(check_images_ready_11504, flight5105_v0.0.1, 2018-12-13 00:00:00+00) is still referenced from table "task_reschedule".}}
> {{sqlalchemy.exc.IntegrityError: (psycopg2.IntegrityError) update or delete on table "task_instance" violates foreign key constraint "task_reschedule_dag_task_date_fkey" on table "task_reschedule"}}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)