jedcunningham opened a new issue #11798:
URL: https://github.com/apache/airflow/issues/11798


   Backwards compatibility was broken for provide_context:
   
   
https://github.com/apache/airflow/blob/master/UPDATING.md#airflowoperatorspythonpythonoperator
   ^ states "The change is backwards compatible, setting provide_context will 
add the provide_context variable to the kwargs (but won't do anything)."
   
   However, 
https://github.com/apache/airflow/commit/e9d65e3d21f2aa6eaeb557b2960730628540127f
 came by after the fact and leads to this:
   
   ```
   Broken DAG: [/dags/dags/bash.py] Traceback (most recent call last):
     File "/some/path/site-packages/airflow/utils/decorators.py", line 92, in 
wrapper
       result = func(*args, **kwargs)
     File "/some/path/site-packages/airflow/models/baseoperator.py", line 383, 
in __init__
       c=self.__class__.__name__, k=kwargs, t=task_id),
   airflow.exceptions.AirflowException: Invalid arguments were passed to 
BashOperator (task_id: print_date). Invalid arguments were:
   **kwargs: {'xcom_push': True}
   ```
   
   So we can either drop backwards compatibility by removing it from 
UPDATING.md, or add an exception for `provide_context` with `BashOperator`. 
Thoughts?


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to