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/08/11 09:02:56 UTC

[GitHub] [airflow] potiuk commented on pull request #17545: Airflow exceptions pass-thru during "on_execute_callback"

potiuk commented on pull request #17545:
URL: https://github.com/apache/airflow/pull/17545#issuecomment-896640518


   Hmm. My initial thought was "yeah, why not", but I think that kind of violates the "Callback" principle - being 'one-way notification". 
   
   This has some long-term consequences. For example we might at some point of time decide that we execute callbacks asynchronously after, or during the Defferable Operators implementation. By giving the Callback possibility of changing the flow, we implicitly make it synchronous and we cannot make it async any more.
   
   I think also we already can influence the flow with `pre_execute` just a few lines above - and you already can throw any exception there and it will be synchronous and will impact the flow.
   
   Of course it is a little more involved - you cannot pass the pre_execute method as parameter of execution, it has to be part of the operator definition, but in a way this is how it should be, and I'd argue this is a better approach.


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