Page MenuHomePhabricator

[keyserver] Parse JSON columns returned from MariaDB
ClosedPublic

Authored by ashoat on Jul 13 2022, 10:36 AM.
Tags
None
Referenced Files
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
Unknown Object (File)
Sat, Jun 22, 9:20 PM
Unknown Object (File)
Tue, Jun 18, 10:41 AM

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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