Page MenuHomePhabricator

[keyserver] Parse JSON columns returned from MariaDB
ClosedPublic

Authored by ashoat on Jul 13 2022, 10:36 AM.
Tags
None
Referenced Files
F2204346: D4521.id14551.diff
Sat, Jul 6, 3:57 PM
F2204345: D4521.diff
Sat, Jul 6, 3:57 PM
Unknown Object (File)
Wed, Jun 26, 12:55 AM
Unknown Object (File)
Wed, Jun 26, 12:54 AM
Unknown Object (File)
Tue, Jun 25, 5:36 PM
Unknown Object (File)
Mon, Jun 24, 8:51 PM
Unknown Object (File)
Mon, Jun 24, 2:59 AM
Unknown Object (File)
Sun, Jun 23, 12:12 PM

Details

Summary

One difference between MySQL and MariaDB is that MySQL has a JSON column type and MariaDB doesn't.

When using MySQL, the mysql2 npm library that we use would detect the column types and if the column has type JSON, it would automatically JSON.parse the result before returning.

This isn't possible with MariaDB, so we have to manually run JSON.parse in our keyserver code.

More details in the Linear issue.

Depends on D4520

Test Plan

I ran the web application and clicked around a bunch. Full test plan will come later

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/mariadb
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

This revision is now accepted and ready to land.Jul 15 2022, 1:26 PM