Page MenuHomePhabricator

[keyserver] Update usage of threads.default_role in role-fetchers.js
ClosedPublic

Authored by rohan on Nov 24 2023, 9:52 AM.
Tags
None
Referenced Files
F3399103: D9976.id33727.diff
Mon, Dec 2, 1:48 AM
F3398476: D9976.diff
Sun, Dec 1, 11:08 PM
Unknown Object (File)
Tue, Nov 12, 11:46 AM
Unknown Object (File)
Tue, Nov 12, 11:42 AM
Unknown Object (File)
Sat, Nov 9, 2:42 AM
Unknown Object (File)
Sat, Nov 9, 2:42 AM
Unknown Object (File)
Sat, Nov 9, 2:37 AM
Unknown Object (File)
Sat, Nov 9, 2:32 AM
Subscribers

Details

Summary

We need to get rid of usages of threads.default_role throughout the codebase so we can eventually drop the column.

This diff handles the usage in role-fetchers.js

Existing code: We determine whether or not a role is a default role based on r.id = t.default_role to then return in an object.

Depends on D9975

Addresses part of ENG-5833

Test Plan

Ran the query before and after in my MariaDB on my local database and saw the same results printed out

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ashoat requested changes to this revision.Nov 26 2023, 3:32 PM
ashoat added inline comments.
keyserver/src/fetchers/role-fetchers.js
11

Add an indent please

12

Drop the alias on roles

13

Drop the join on threads

This revision now requires changes to proceed.Nov 26 2023, 3:32 PM
rohan marked 3 inline comments as done.

Add indent, drop table alias, and drop the join on threads

This revision is now accepted and ready to land.Nov 27 2023, 8:47 AM