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)
Oct 2 2024, 4:13 AM
Unknown Object (File)
Oct 2 2024, 4:13 AM
Unknown Object (File)
Oct 2 2024, 4:13 AM
Unknown Object (File)
Oct 2 2024, 4:12 AM
Unknown Object (File)
Oct 2 2024, 4:09 AM
Unknown Object (File)
Sep 7 2024, 7:29 PM
Unknown Object (File)
Aug 28 2024, 8:46 PM
Unknown Object (File)
Aug 28 2024, 11:54 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