penggongkui commented on pull request #16960: URL: https://github.com/apache/airflow/pull/16960#issuecomment-879629994
agree with you the best solution is make relationship correct, but this is out of my knowledge with airflow whole project, maybe something else use the ti.dag_run > So we should set the backref at the other side (on TaskInstance.dag_run) instead…? the sqla doc https://docs.sqlalchemy.org/en/14/orm/backref.html says backref is a alias with reletionship with back_populates both side, the right relationship is change backref to back_populates in DagRun https://github.com/apache/airflow/blob/c46e841519ef2df7dc40ff2596dd49c010514d87/airflow/models/taskinstance.py#L2147 and this line just for pylint to know dag_run field in taskinstance (know from the comment: https://github.com/apache/airflow/blob/2.0.0/airflow/models/taskinstance.py#L2066) I just read the sqla document, also not familiar with it the right relationship also will fix another issue #16896 -- 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]
