You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/07/14 03:22:20 UTC

[GitHub] [airflow] penggongkui commented on pull request #16960: remove delete task_instance when sla

penggongkui commented on pull request #16960:
URL: https://github.com/apache/airflow/pull/16960#issuecomment-879555161


   @uranusjr accoding the sqla document, default behavior is setting their foreign key reference to NULL.
   
   https://docs.sqlalchemy.org/en/14/orm/cascades.html#unitofwork-cascades
   
   ![image](https://user-images.githubusercontent.com/49138427/125555612-f85a4172-2543-4b88-85ce-c4b07f902d40.png)
   
   also I have do a unit_test  do session.delete(ti), it will set the dag_run's dag_id && execution_date to null(just like deleted the dag_run)
   
   anyway, I have use a another way to delete the taskinstance(it's a little ugly)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org