XD-DENG opened a new pull request #4287: [AIRFLOW-3479] Keeps records in Log 
Table when delete DAG & refine related tests
URL: https://github.com/apache/incubator-airflow/pull/4287
 
 
   
   ### Jira
   
     - https://issues.apache.org/jira/browse/AIRFLOW-3479
   
   ### Description
   
   #### Problem This PR Tries to Address
   
   Currently when we delete a DAG (using API or from the UI), it will delete 
all related records in all tables (all tables in which "dag_id" is available), 
including "log" table.
   
   However, the records in "log" table should be kept (by default). This would 
be ideal for multiple reasons, like auditing.
   
   #### What This PR Does
   
   - **When we delete DAG using API**: provide one boolean parameter to let 
users decide if they want to keep records in Log table when they delete a DAG. 
Default value it True (to keep records in Log table).
   
   - **When we delete DAG from UI**: will keep records in the Log table when 
delete records for a specific DAG ID (pop-up message is updated accordingly).
   
   
   ### Tests
   
   Test cases are added to cover:
   1. Delete a DAG which doesn't exist.
   1. Delete a DAG which is still in DagBag.
   1. Successfully delete a DAG + keep records in Log table.
   1. Successfully delete a DAG + delete records in Log table as well.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to