uranusjr commented on code in PR #64625:
URL: https://github.com/apache/airflow/pull/64625#discussion_r3027945697


##########
airflow-core/src/airflow/dag_processing/collection.py:
##########
@@ -1029,9 +1050,15 @@ def add_asset_trigger_references(
             trigger_hash_from_asset: set[int] = 
set(trigger_hash_to_trigger_dict.keys())
 
             asset_model = assets[name_uri]
-            trigger_hash_from_asset_model: set[int] = {
-                BaseEventTrigger.hash(trigger.classpath, trigger.kwargs) for 
trigger in asset_model.triggers
-            }
+
+            trigger_hash_from_asset_model: set[int] = set()
+            for trigger in asset_model.triggers:
+                try:
+                    trigger_hash_from_asset_model.add(
+                        BaseEventTrigger.hash(trigger.classpath, 
trigger.kwargs)
+                    )
+                except (ImportError, KeyError, AttributeError, TypeError):
+                    log.warning("Failed to hash trigger %s, skipping", 
trigger.id, exc_info=True)

Review Comment:
   This is probably also not needed. It’s not a bad idea—we probably don’t want 
the dag processor to crash if hashing fails, but let’s include as little change 
as possible to narrow things down.



-- 
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]

Reply via email to