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/12/22 09:30:21 UTC
[GitHub] [airflow] luoyuliuyin opened a new issue #20458: the API of delete_dag does not delete the record in dag_code
luoyuliuyin opened a new issue #20458:
URL: https://github.com/apache/airflow/issues/20458
### Apache Airflow version
2.2.3 (latest released)
### What happened
**the API of delete_dag does not delete the record in dag_code.**
![image](https://user-images.githubusercontent.com/28948186/147068771-0560119d-8d3d-4472-be09-a72f61dfb77f.png)
This function will delete all the records containing the dag_id field, and will delete the related records of TaskFail, TaskInstance, ImportError. But the dag_code table does not have a dag_id field, the records in it will not be deleted.
`function location: airflow.api_connexion.endpoints.dag_endpoint.delete_dag()`
![image](https://user-images.githubusercontent.com/28948186/147068839-850e7442-f565-4ba2-bc55-223686388504.png)
show create table of dag_code
![image](https://user-images.githubusercontent.com/28948186/147068905-0f257348-a56d-4440-9435-6ace5d980865.png)
### What you expected to happen
All related records in the database are deleted, including the dag_code table.
### How to reproduce
_No response_
### Operating System
MacOS 12.1
### Versions of Apache Airflow Providers
2.2.2
### Deployment
Virtualenv installation
### Deployment details
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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
[GitHub] [airflow] uranusjr commented on issue #20458: the API of delete_dag does not delete the record in dag_code
Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #20458:
URL: https://github.com/apache/airflow/issues/20458#issuecomment-999629162
Also note that DAG code entries are automatically cleaned up by the DAG file process when it scans the DAG directory. Everything should end up consistent eventually.
--
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
[GitHub] [airflow] potiuk closed issue #20458: the API of delete_dag does not delete the record in dag_code
Posted by GitBox <gi...@apache.org>.
potiuk closed issue #20458:
URL: https://github.com/apache/airflow/issues/20458
--
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
[GitHub] [airflow] potiuk commented on issue #20458: the API of delete_dag does not delete the record in dag_code
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #20458:
URL: https://github.com/apache/airflow/issues/20458#issuecomment-999624761
This is correct. DAG code is related to dag file not dag id.
DAG file can contain more than one dag_id , so there is no way to delete dag_code when you delete dag id.
Maybe what you need is to have separate API to delete and manage DAG code separately via PI - this is a good idea and I invite you to create a feature request for it (or even maybe implement it).
--
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