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
Unknown Object (File)
Sat, May 18, 11:24 PM
Unknown Object (File)
Thu, May 9, 1:00 AM
Unknown Object (File)
Apr 8 2024, 6:03 PM
Unknown Object (File)
Apr 8 2024, 6:03 PM
Unknown Object (File)
Apr 8 2024, 6:03 PM
Unknown Object (File)
Apr 8 2024, 6:00 PM
Unknown Object (File)
Apr 4 2024, 2:27 AM
Unknown Object (File)
Feb 21 2024, 12:34 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
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #33602)

Add an indent please

12 ↗(On Diff #33602)

Drop the alias on roles

13 ↗(On Diff #33602)

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