kacpermuda commented on code in PR #40589:
URL: https://github.com/apache/airflow/pull/40589#discussion_r1668986995


##########
airflow/providers/openlineage/conf.py:
##########
@@ -145,3 +145,8 @@ def execution_timeout() -> int:
     """[openlineage] execution_timeout."""
     option = conf.get(_CONFIG_SECTION, "execution_timeout", fallback="")
     return _safe_int_convert(str(option).strip(), default=10)
+
+
+@cache
+def include_full_task_info() -> bool:
+    return _is_true(conf.get(_CONFIG_SECTION, "include_full_task_info", 
fallback="False"))

Review Comment:
   Yes, probably it could, but i think we wanted to prevent breaking Airflow / 
raising errors by all means, so we put this explanation in the module docstring:
   ```
   To prevent errors caused by invalid user-provided configuration values, we 
use ``conf.get()``
   to fetch values as strings and perform safe conversions using custom 
functions.
   
   Any invalid configuration values should be treated as incorrect and replaced 
with default values.
   For example, if the default for boolean ``custom_ol_var`` is False, any 
non-true value provided:
   ``"asdf"``, ``12345``, ``{"key": 1}`` or empty string, will result in False 
being used.
   
   By using default values for invalid configuration values, we ensure that the 
configurations are handled
   safely, preventing potential runtime errors due to conversion issues.
   ```
   
   Does it make sense or do you see any other viable way to do it?



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