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


##########
airflow/serialization/serde.py:
##########
@@ -360,7 +360,7 @@ def _register():
 @functools.lru_cache(maxsize=None)
 def _get_patterns() -> list[Pattern]:
     patterns = conf.get("core", "allowed_deserialization_classes").split()
-    return [re2.compile(re2.sub(r"(\w)\.", r"\1\..", p)) for p in patterns]
+    return [re2.compile(re2.sub(r"(\w)\.?\*", r"\1\.", p)) for p in patterns]

Review Comment:
   To answer / give an opinion on the easiest part: I don't think a config 
option is a good idea for the same reasons that @tobiaszorzetto mentioned - 
including the cognitive load on people that do not know what a `glob` is etc. 
   
   Although alternatively a `allowed_serialization_classes` could be the glob 
version and `allowed_serialization_classes_regexp` could be the regexp version. 
Could that work?
   
   Either way I do think a more formal documentation inside the function to 
explain what it tries to do and also having the tests more explicitly stating 
at each test what they are testing would make sense.
   
   



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