tirkarthi commented on code in PR #31352:
URL: https://github.com/apache/airflow/pull/31352#discussion_r1197771972
##########
airflow/models/taskinstance.py:
##########
@@ -2821,15 +2821,16 @@ def tg2(inp):
def clear_db_references(self, session):
"""
- Clear DB references to XCom, TaskFail and RenderedTaskInstanceFields.
+ Clear DB references to XCom, TaskFail, TaskInstanceNote,
+ TaskReschedule and RenderedTaskInstanceFields.
Review Comment:
There is a function from sqlalchemy_utils that seems to do this but I
couldn't get this working inside shell. We still need to filter out only
foreign key references involving a combination of map_index to clear only those
table's entries. sqlalchemy_utils is not a dependency so we need to copy that
function I guess.
https://sqlalchemy-utils.readthedocs.io/en/latest/foreign_key_helpers.html#get-referencing-foreign-keys
--
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]