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/11/17 21:48:06 UTC

[GitHub] [airflow] potiuk commented on a change in pull request #19662: BaseOperator.on_kill should optionally accept airflow context

potiuk commented on a change in pull request #19662:
URL: https://github.com/apache/airflow/pull/19662#discussion_r751662986



##########
File path: airflow/models/baseoperator.py
##########
@@ -1000,7 +1000,7 @@ def post_execute(self, context: Any, result: Any = None):
         if self._post_execute_hook is not None:
             self._post_execute_hook(context, result)
 
-    def on_kill(self) -> None:

Review comment:
       I think we should very carefully approach this change. 
   
   This is not really `future-compatible`. 
   
   Any of the operators using the context in on-kill will be -  by definition - not compatible with airflow < 2.3.0. This means that if someone implements a "crucial" logic in any of the providers those providers will have to add `airflow >= 2.3.0`. 
   
   
   I do not have a solution for that yet but  I think  this should be more than optional  parameter .




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