You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "devgonvarun (via GitHub)" <gi...@apache.org> on 2025/11/04 15:46:31 UTC

[I] Possibility to delete all xcoms associated to a dag run using XCom.delete() function. [airflow]

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: commits-unsubscribe@airflow.apache.org.apache.org

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


Re: [I] Possibility to delete all xcoms associated to a dag run using XCom.delete() function. [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #57812:
URL: https://github.com/apache/airflow/issues/57812#issuecomment-3986427573

   @BharathPESU We are unassigning you from this issue as part of our updated [assignment policy](https://github.com/apache/airflow/blob/main/contributing-docs/04_how_to_contribute.rst#contribute-code-changes).
   
   This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.
   
   We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.


-- 
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


Re: [I] Possibility to delete all xcoms associated to a dag run using XCom.delete() function. [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #57812:
URL: https://github.com/apache/airflow/issues/57812#issuecomment-3986427846

   @justinpakzad We are unassigning you from this issue as part of our updated [assignment policy](https://github.com/apache/airflow/blob/main/contributing-docs/04_how_to_contribute.rst#contribute-code-changes).
   
   This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.
   
   We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.


-- 
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


Re: [I] Possibility to delete all xcoms associated to a dag run using XCom.delete() function. [airflow]

Posted by "karenbraganz (via GitHub)" <gi...@apache.org>.
karenbraganz commented on issue #57812:
URL: https://github.com/apache/airflow/issues/57812#issuecomment-3487970463

   @BharathPESU assigned the issue to you.


-- 
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


Re: [I] Possibility to delete all xcoms associated to a dag run using XCom.delete() function. [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #57812:
URL: https://github.com/apache/airflow/issues/57812#issuecomment-3694307983

   Sure. I guess @BharathPESU will chime in if they are working on 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


Re: [I] Possibility to delete all xcoms associated to a dag run using XCom.delete() function. [airflow]

Posted by "BharathPESU (via GitHub)" <gi...@apache.org>.
BharathPESU commented on issue #57812:
URL: https://github.com/apache/airflow/issues/57812#issuecomment-3487409256

   Hi! I’d like to work on this issue.
   I’ve reviewed the problem with XCom.delete() requiring task_id and key, and I’m confident I can implement the enhancement to allow deletion of all XComs by dag_id and run_id.
   Could you please assign this issue to me?


-- 
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


Re: [I] Possibility to delete all xcoms associated to a dag run using XCom.delete() function. [airflow]

Posted by "justinpakzad (via GitHub)" <gi...@apache.org>.
justinpakzad commented on issue #57812:
URL: https://github.com/apache/airflow/issues/57812#issuecomment-3694281624

   Hey, this issue has been open for a little while and I haven't seen any PRs linked. I'm going to go ahead and work on this if that's okay. Thanks


-- 
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