ramitkataria commented on code in PR #54929:
URL: https://github.com/apache/airflow/pull/54929#discussion_r2299832729
##########
airflow-core/src/airflow/dag_processing/collection.py:
##########
@@ -980,3 +981,8 @@ def add_asset_trigger_references(
for asset_model in orphan_assets:
if (asset_model.name, asset_model.uri) not in self.assets:
asset_model.triggers = []
+
+ # Remove triggers that are no longer used by any assets.
+ session.execute(
+
delete(Trigger).where(Trigger.id.not_in(select(asset_trigger_association_table.c.trigger_id)))
Review Comment:
Wouldn't this also delete task and/or deadline triggers?
--
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]