potiuk commented on issue #40119:
URL: https://github.com/apache/airflow/issues/40119#issuecomment-2294795158

   > @eladkal @vatsrahul1001 I looked into this for the good-first-issue label 
but I am not sure how or if this should be "fixed." I don't see a way to 
re-call apply_defaults from inside _set_relatives()/add_task(), or to cleanly 
re-instantiate the task object. There could be a warning/error when a task gets 
a parent DAG and there are default_args, telling the user that the task won't 
have the args.
   
   I think documenting the behaviour and adding warning is a good solution to 
avoid confusion. Indeed - from python point of view, the dag and it's 
default_args have to be known at instantiation time and there is no 
straightforward and easy mechanism to reapply them, because basically you would 
have to recreate the task. 
   
   So this "good first issue" is really about:
   
   a) documenting this behaviour
   b) add a warning when dag has default args and it gets assigned to a 
dag-less task via dependencies to other tasks
   


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