betodealmeida commented on PR #31948:
URL: https://github.com/apache/superset/pull/31948#issuecomment-2605554566

   Ah, I see... the method returns `set[DatasourceName]`, but that gets 
serialized to a list of lists, so when we have a cache hit we have the wrong 
type.
   
   Back in 2022 I added a warning to the `memoize_func` cache decorator:
   
   > Note: this decorator should be used only with functions that return 
primitives, otherwise the deserialization might not work correctly.
   
   But in 2024 I forgot about it, and modified `get_all_table_names_in_schema` 
(and views) to return a `set[DatasourceName]`.... 🤦🏼 
   
   I'll look into modifying `memoize_func` so that it raises an error when 
non-primitive types are used, unless the user specifies a flag.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to