bolkedebruin commented on code in PR #36147:
URL: https://github.com/apache/airflow/pull/36147#discussion_r1430388614


##########
airflow/serialization/serde.py:
##########
@@ -288,7 +287,26 @@ def _convert(old: dict) -> dict:
 
 
 def _match(classname: str) -> bool:
-    return any(p.match(classname) is not None for p in _get_patterns())
+    """Checks if the given classname matches a path pattern
+    either using glob format or regexp format
+    """
+    return _match_glob(classname) or _match_regexp(classname)
+
+
+def _match_glob(classname: str):
+    """Checks if the given classname matches a pattern from
+    allowed_deserialization_classes using glob syntax
+    """
+    patterns = conf.get("core", "allowed_deserialization_classes").split()

Review Comment:
   Can we improve performance here? Potentially this is called very often so 
I'd prefer a cache here rather than a look up every time.



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to