florian-meyrueis-al commented on issue #41641:
URL: https://github.com/apache/airflow/issues/41641#issuecomment-3860977640

   > [#54714 
(comment)](https://github.com/apache/airflow/issues/54714#issuecomment-3858765005)
   > 
   > Hey @florian-meyrueis-a, could you please provide us with a minimum 
example Dag for each case?
   > 
   > > usage of parameter "provide_context" in PythonOperator.
   > > This was deprecated in airflow2 and has been removed in Airflow3 . 
context is now always provided in PythonOperator
   > > So any dag using this should be modified accordingly.
   > 
   > especially this one
   
   Before Airflow3, you could create a dag with a PythonOperator like this 
example : 
   
   authenticate_task = PythonOperator(
       task_id='authenticate',
       python_callable=authenticate_function,
       provide_context=True,  
   )
   
   provide_context parameter has been set to deprecated in airflow 2, so it was 
still working
   In Airflow 3, it's been removed, so the provider call should be written like 
: 
   
   authenticate_task = PythonOperator(
       task_id='authenticate',
       python_callable=authenticate_function,
   )
   
   According code base, context is now always provided.
   
   Note: i'm not sure if it's only relevant to PythonOperator or for other 
operators too
   
   > 
   > > In BaseOperator, usage of parameter 
trigger_rule="none_failed_or_skipped" has been replaced by 
"none_failed_min_one_success".
   > > Any Dag using an operator with this parameter must be updated with the 
correct value
   > 
   > This should be doable.
   
   There a comment in BaseOperator: 
   
   if trigger_rule == "none_failed_or_skipped":
               warnings.warn(
                   "none_failed_or_skipped Trigger Rule is deprecated. "
                   "Please use `none_failed_min_one_success`.",
                   RemovedInAirflow3Warning,
                   stacklevel=2,
               )
               trigger_rule = TriggerRule.NONE_FAILED_MIN_ONE_SUCCESS
   
   
   So this is jut about changing the value when facing the deprecated 
"none_failed_or_skipped"
   
   
   > 
   > > apply_default decorator is now automatically deployed so it must removed 
of any dags.
   > 
   > This should be there already, so I'd like to see why Ruff is not 
detecting. maybe we missed some cases
   
   I Think it detects it, but it does not fix 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: [email protected]

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

Reply via email to