Page MenuHomePhabricator

[keyserver] Parse JSON columns returned from MariaDB
ClosedPublic

Authored by ashoat on Jul 13 2022, 10:36 AM.
Tags
None
Referenced Files
F3374373: D4521.id14551.diff
Tue, Nov 26, 3:19 PM
F3373715: D4521.diff
Tue, Nov 26, 11:12 AM
Unknown Object (File)
Fri, Nov 22, 10:35 PM
Unknown Object (File)
Sat, Nov 2, 6:31 PM
Unknown Object (File)
Sat, Nov 2, 6:31 PM
Unknown Object (File)
Sat, Nov 2, 6:31 PM
Unknown Object (File)
Sat, Nov 2, 6:21 PM
Unknown Object (File)
Oct 7 2024, 12:29 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