ashb commented on code in PR #74222:
URL: https://github.com/apache/airflow/pull/74222#discussion_r4193727641
##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -2814,6 +2977,40 @@ def __repr__(self):
return prefix + f" TI ID: {self.ti_id}>"
+_CURRENT_ATTEMPTS = with_loader_criteria(
+ TaskInstance, TaskInstance.working_set.is_(True), include_aliases=True,
propagate_to_loaders=False
+)
+
+
+def _is_primary_key_lookup(statement) -> bool:
Review Comment:
> Could primary key lookups also hide retired rows by default
No, this is the one drawback to `session.get(TaskInstance, id)` will always
just do a direct PK lookup, and I don't think there's a way around it, other
than outright "banning" `session.get(TaskInstance` I think.
--
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]