You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/03 13:39:58 UTC

[GitHub] [airflow] kaxil commented on issue #13811: get_dagrun() function starts giving error in 2.0 when using inside cluster policy

kaxil commented on issue #13811:
URL: https://github.com/apache/airflow/issues/13811#issuecomment-772513132


   A workaround for this, for now, is to pass a session to `get_dagrun` method:
   
   ```
   from airflow.settings import Session
   
   session = Session()
   
   def task_instance_mutation_hook(task_instance):
       dag_run = task_instance.get_dagrun(session=session)
       conf = dag_run.conf
   ```


----------------------------------------------------------------
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:
users@infra.apache.org