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)
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
Unknown Object (File)
Oct 7 2024, 12:29 AM
Unknown Object (File)
Oct 5 2024, 6:01 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