ktmud commented on code in PR #20632:
URL: https://github.com/apache/superset/pull/20632#discussion_r918216047
##########
superset/key_value/utils.py:
##########
@@ -63,3 +64,9 @@ def get_uuid_namespace(seed: str) -> UUID:
md5_obj = md5()
md5_obj.update(seed.encode("utf-8"))
return UUID(md5_obj.hexdigest())
+
+
+def get_deterministic_uuid(namespace: str, payload: Any) -> UUID:
+ """Get a deterministic UUID (uuid3) from a salt and a payload."""
+ payload_str = json_dumps_w_dates(payload, sort_keys=True)
Review Comment:
@villebro @michael-s-molina any particular reason why KeyValue was stored
with Python pickle instead of JSON? IMO we should avoid storing pickles in
database as they are not portable and could be versioned out if an advanced
python object was used. It'd also be impossible to export the database directly
for offline analysis.
--
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]