microhuang opened a new issue #20534:
URL: https://github.com/apache/airflow/issues/20534


   ### Apache Airflow version
   
   2.2.3 (latest released)
   
   ### What happened
   
    An error occurred while browsing the page 
(/rendered-k8s?dag_id=xxx&task_id=yyy&execution_date=zzz):
   ```
   Parent instance <TaskInstance at 0x7fb0b01df940> is not bound to a Session; 
lazy load operation of attribute 'dag_model' cannot proceed (Background on this 
error at: http://sqlalche.me/e/13/bhk3) Traceback (most recent call last):
       args=self.command_as_list(),
     File 
"/home/airflow/.local/lib/python3.9/site-packages/airflow/models/taskinstance.py",
 line 527, in command_as_list
       dag = self.dag_model
     File 
"/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/orm/attributes.py",
 line 294, in __get__
       return self.impl.get(instance_state(instance), dict_)
     File 
"/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/orm/attributes.py",
 line 730, in get
       value = self.callable_(state, passive)
     File 
"/home/airflow/.local/lib/python3.9/site-packages/sqlalchemy/orm/strategies.py",
 line 717, in _load_for_state
       raise orm_exc.DetachedInstanceError(
   sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <TaskInstance at 
0x7fb0b01df940> is not bound to a Session; lazy load operation of attribute 
'dag_model' cannot proceed (Background on this error at: 
http://sqlalche.me/e/13/bhk3)
   ```
   
   
   ### What you expected to happen
   
   _No response_
   
   ### How to reproduce
   
   _No response_
   
   ### Operating System
   
   NAME="CentOS Stream" VERSION="8"
   
   ### Versions of Apache Airflow Providers
   
   ```
   apache-airflow-providers-cncf-kubernetes==2.2.0
   apache-airflow-providers-elasticsearch==2.0.3
   apache-airflow-providers-ftp==2.0.1
   apache-airflow-providers-http==2.0.1
   apache-airflow-providers-imap==2.0.1
   apache-airflow-providers-mysql==2.1.1
   apache-airflow-providers-postgres==2.3.0
   apache-airflow-providers-sftp==2.1.1
   apache-airflow-providers-sqlite==2.0.1
   apache-airflow-providers-ssh==2.2.0
   ```
   
   ### Deployment
   
   Other 3rd-party Helm chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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