JDarDagran commented on code in PR #37725:
URL: https://github.com/apache/airflow/pull/37725#discussion_r1538912359


##########
airflow/providers/openlineage/utils/utils.py:
##########
@@ -73,6 +78,16 @@ def is_operator_disabled(operator: BaseOperator | 
MappedOperator) -> bool:
     return get_fully_qualified_class_name(operator) in 
conf.disabled_operators()
 
 
+def is_selective_lineage_enabled(obj) -> bool:
+    """If selective enable is active check if DAG or Task is enabled to emit 
events."""
+    if not conf.selective_enable():
+        return True
+    if isinstance(obj, DAG):
+        return is_dag_lineage_enabled(obj)
+    else:
+        return is_task_lineage_enabled(obj)

Review Comment:
   Added.



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