mobuchowski commented on code in PR #30713:
URL: https://github.com/apache/airflow/pull/30713#discussion_r1192489192


##########
airflow/providers/openlineage/utils/utils.py:
##########
@@ -395,3 +397,10 @@ def wrapper(*args, **kwargs):
             log.exception(e)
 
     return wrapper
+
+
+def is_source_enabled():
+    source_var = conf.get(
+        "openlinege", "disable_source_code", 
fallback=os.getenv("OPENLINEAGE_AIRFLOW_DISABLE_SOURCE_CODE")
+    )
+    return isinstance(source_var, str) and source_var.lower() not in ("true", 
"1", "t")

Review Comment:
   Can't do this this way unfortunately, since `conf.getboolean` needs default 
value, and default value prevents fallback from working, since it's taken 
before fallback.



##########
airflow/providers/openlineage/utils/utils.py:
##########
@@ -395,3 +397,10 @@ def wrapper(*args, **kwargs):
             log.exception(e)
 
     return wrapper
+
+
+def is_source_enabled():

Review Comment:
   done.



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