dstandish opened a new issue, #31718: URL: https://github.com/apache/airflow/issues/31718
### Description We should be able to exit the "task" from the trigger. We can already log from triggers so that's one hurdle out of the way. The remaining hurdle I think is xcom, given that triggers run in asyncio. The obvious solution that comes to mind is add a queue listener running in a thread that processes the “messages” and handles submitting to xcom. One implementation question is... would you just make it so that the trigger must call T`rigger.xcom_push` manually (which sends to this queue listener) or would you also want to make it possible, perhaps in an analogy with execute , possible to send the xcom payload(s) in the trigger event, or perhaps through a dedicated `Trigger.success` method? I think that I’d probably prefer forcing Trigger writers to do the xcom push manually because … an interface to handle both the default return_value as well as handling multiple key-values isn’t quickly coming to mind. cc: @jedcunningham @phanikumv @vandonr-amz ### Use case/motivation This would save users money or increase cluster bandwidth because for sensor-like deferrable tasks, no task needs to get spun up just to exit. ### Related issues _No response_ ### Are you willing to submit a 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
