devgonvarun opened a new issue, #57812: URL: https://github.com/apache/airflow/issues/57812
### Description Presently Xcom.delete() requires 'dag_id', 'run_id', 'task_id' and 'key' arguments to delete an xcom entry and if 'task_id' and 'key' are missing then we get the following error: ``` XCom.delete(dag_id=dag_run.dag_id, run_id=dag_run.run_id) TypeError: BaseXCom.delete() missing 2 required positional arguments: 'key' and 'task_id' ``` Since its not possible to delete xcoms by directly manipulating the metadata database from tasks in airflow 3 ([50415](https://github.com/apache/airflow/discussions/50415)). It will really help the usecase to delete all xcoms associated to a dag_id and run_id via the listeners on dag run completion using the Xcom.delete() function. ### Use case/motivation Delete all xcoms entries for a dag run via listeners on dag completion. ### Related issues _No response_ ### Are you willing to submit a PR? - [ ] 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
