milton0825 commented on issue #5574: [AIRFLOW-4941] Warn that default_args not 
applied via setter
URL: https://github.com/apache/airflow/pull/5574#issuecomment-511149532
 
 
   @ashb I thought about applying `default_args` in the setter but I don't see 
how we can support the following case easily:
   
   If user specified a arg with value equal to the default arg value in the 
__init__ signature, we won't be able to tell from the setter whether we should 
override the value with the default_args. Please find the example below:
   ```
   dag = DAG('dag', default_args={'email_on_failure': False})
   
   op = BaseOperator(
       task_id='op',
       email_on_failure=True,  # happen to be the same as the default value in 
__init__ signature
   )
   
   op.dag = dag
   ```

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


With regards,
Apache Git Services

Reply via email to