waleedsamy opened a new issue #9902: URL: https://github.com/apache/airflow/issues/9902
<!-- Welcome to Apache Airflow! For a smooth issue process, try to answer the following questions. Don't worry if they're not all applicable; just try to include what you can :-) If you need to include code snippets or logs, please put them in fenced code blocks. If they're super-long, please use the details tag like <details><summary>super-long log</summary> lots of stuff </details> Please delete these comment blocks before submitting the issue. --> <!-- IMPORTANT!!! PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE NEXT TO "SUBMIT NEW ISSUE" BUTTON!!! PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!! Please complete the next sections or the issue will be closed. This questions are the first thing we need to know to understand the context. --> **Apache Airflow version**: v1.10.11 **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): NO **Environment**: airflow 1.10.11 running on ubuntu 18.04 (used pip for installation) - **Cloud provider or hardware configuration**: bare metal - **OS** (e.g. from /etc/os-release): ubuntu 18.04 - **Kernel** (e.g. `uname -a`): Linux dev1 4.15.0-108-generic #109-Ubuntu SMP Fri Jun 19 11:33:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux - **Install tools**: pip - **Others**: **What happened**: I'm not able to get task_instance_mutation_hook (https://github.com/apache/airflow/pull/8852) to load my custom implementation from `$AIRFLOW_HOME/config/airflow_local_settings.py`. The only way to get it to work is by moving the import statement of task_instance_mutation_hook to Dagrun#verify_integrity as in [here](https://github.com/waleedsamy/airflow/commit/2c0c218ccaa198033f2627617fe470d60d6903fa) <!-- (please include exact error messages if you can) --> **What you expected to happen**: Airflow to use task_instance_mutation_hook provided in `$AIRFLOW_HOME/config/airflow_local_settings.py`. <!-- What do you think went wrong? --> **How to reproduce it**: make sure your running v1.10.11 and create a custom `$AIRFLOW_HOME/config/airflow_local_settings.py` where you define a dummy `task_instance_mutation_hook` as next ```python def task_instance_mutation_hook(ti): # every new or up to retry task will be added to non existent queue, so no task will pass through if ti.state in [State.NONE, State.UP_FOR_RETRY]: ti.queue = 'dummy-queue' ``` if any of the airflow example dags run successfully then, the previous hook didn't work. <!--- As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags. If you are using kubernetes, please attempt to recreate the issue using minikube or kind. ## Install minikube/kind - Minikube https://minikube.sigs.k8s.io/docs/start/ - Kind https://kind.sigs.k8s.io/docs/user/quick-start/ If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action You can include images using the .md sytle of  To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file. ---> **Anything else we need to know**: task_instance_mutation_hook is a new feature introduced in v1.10.11 <!-- How often does this problem occur? Once? Every time etc? Any relevant logs to include? Put them here in side a detail tag: <details><summary>x.log</summary> lots of stuff </details> --> ---------------------------------------------------------------- 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]
