kacpermuda commented on code in PR #66992:
URL: https://github.com/apache/airflow/pull/66992#discussion_r3324468738
##########
providers/openlineage/src/airflow/providers/openlineage/conf.py:
##########
@@ -179,3 +179,12 @@ def include_full_task_info() -> bool:
def debug_mode() -> bool:
"""[openlineage] debug_mode."""
return conf.getboolean(_CONFIG_SECTION, "debug_mode", fallback="False")
+
+
+@cache
+def emission_policy() -> list[dict]:
+ """[openlineage] emission_policy."""
+ option = conf.getjson(_CONFIG_SECTION, "emission_policy", fallback=[])
+ if not isinstance(option, list):
+ raise ValueError(f"[openlineage] emission_policy must be a JSON array,
got: {type(option).__name__}")
+ return option
Review Comment:
Added a try/except within resolve_* functions that will catch all and serve
default on any errors to prevent any errors propagating to listener hot path.
--
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]