waleedsamy commented on pull request #9910:
URL: https://github.com/apache/airflow/pull/9910#issuecomment-662080850


   @kaxil In `dagrun.py`, having 
   ```python
   # airflow/__init__.py > airflow/models/__init__.py > airflow/models/dagrun.py
   from airflow.settings import task_instance_mutation_hook
   ```
   will load `task_instance_mutation_hook` with the default implementation 
inside `settings.py` which will **later updated** (when 
[settings.initialize()](https://github.com/apache/airflow/blob/d23fa2f8896c5e31745131e6917f1970b4aa590f/airflow/__init__.py#L48)
 called, and 
[airflow_local_settings](https://github.com/apache/airflow/blob/d23fa2f8896c5e31745131e6917f1970b4aa590f/airflow/settings.py#L400)
 provided). The import of `task_instance_mutation_hook` will result in caching 
the old implementation and the change in this PR will drop this caching so 
calling `settings.task_instance_mutation_hook` will get you the fresh 
implementation of  `task_instance_mutation_hook`( after _settings.initialize_ 
load the _airflow_local_settings_).


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