mikaelfr commented on a change in pull request #9204:
URL: https://github.com/apache/airflow/pull/9204#discussion_r444755051
##########
File path: airflow/models/dag.py
##########
@@ -844,11 +844,12 @@ def get_task_instances(
start_date = timezone.make_aware(
datetime.combine(start_date, datetime.min.time()))
- tis = session.query(TaskInstance).filter(
+ tis =
session.query(TaskInstance).options(joinedload(TaskInstance.task_tags)).filter(
Review comment:
I took a look at SQLAlchemy
[documentation](https://docs.sqlalchemy.org/en/13/orm/loading_relationships.html)
and modified the relationship to raise an exception on lazy loads by default.
I then added explicit `joinload`s in a few specific places where we want to
load task tags. So currently the tags are not loaded by default and are only
loaded with a join in a few places.
----------------------------------------------------------------
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]