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


##########
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:
   Hey @potiuk, thanks for the feedback! The decision to fix the problem only 
by changing the regexp already used was solely for simplifying the solution. 
   However I agree that a separated approach (splitting the cases) would be 
easier for future devs to understand whats going, as well as, as to test the 
functions. Thus, if the explanation to how the regexp works is not clear, we're 
happy to make these changes! 
   The only thing that may worry me is the idea to add a config to specify 
which type, which may just add a layer of complexity that might not be needed, 
as it looks like it would be very unlikely for something to be matched 
unexpectedly if done and tested well enough.
   
   



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