You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[LNT] Python 3 support: fix storage of json data as BLOB
Summary:
Machine and Run tables store JSON as binary data in their Parameters
column. However, JSON is inserted as text data in several places,
causing problem when SQLAlchemy reads it back since it expects binary
data but receives text, which Python3 throws an exception for.
2 constructs are responsible for inserting JSON as text:
1) json.dumps() method is used in several places to convert a dictionary
to JSON which returns it as text. This commit adds an encoding step
to UTF-8 since it is the recommended encoding for JSON.
2) One of the insertion with a JSON Parameters column in
lnt_db_create.sql is missing a cast to BLOB. This commit adds the
missing cast.
Reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls, leandron, PrzemekWirkus
Reviewed By: PrzemekWirkus
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D68796
0 commit comments