Page MenuHomePhabricator

[native] implement `GetDeviceListsForUsers` RPC in `native_rust_library`
ClosedPublic

Authored by kamil on Apr 29 2024, 7:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 12:05 PM
Unknown Object (File)
Tue, Nov 12, 11:12 AM
Unknown Object (File)
Tue, Nov 12, 9:33 AM
Unknown Object (File)
Tue, Nov 12, 8:19 AM
Unknown Object (File)
Fri, Nov 8, 4:54 AM
Unknown Object (File)
Mon, Oct 21, 7:26 AM
Unknown Object (File)
Oct 11 2024, 8:03 AM
Unknown Object (File)
Oct 11 2024, 8:03 AM
Subscribers

Details

Summary

Added client method calling the RPC to native rust library, exposed it to C++.

Test Plan

Tested in D11834

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Apr 29 2024, 8:50 AM
tomek added inline comments.
native/native_rust_library/src/identity/device_list.rs
74–101 ↗(On Diff #39657)

Why do we need two separate endpoints? It seems like get_device_list_for_user_helper should be a special case of get_device_lists_for_users_helper.

116 ↗(On Diff #39657)

There's a difference between this API and get_device_list_for_user - only in one of them we're using since_timestamp. Do we know why is that? @bartek

This revision is now accepted and ready to land.Apr 30 2024, 1:40 AM

Discussed this in the office with @tomek and going to land this, we can continue the discussion when @bartek is back but this code is only a wrapper to already landed D11570.
When we decide to make changes we'd need to update protos so then we can also update the code here.

native/native_rust_library/src/identity/device_list.rs
74–101 ↗(On Diff #39657)

These are different endpoints so it should be the way it is done in this diff

116 ↗(On Diff #39657)
  • GetDeviceList_[History]_ForUser - this is for fetching single user's device list history since given timestamp. It's used for device list verification when receiving an update from peer.
  • GetDeviceListsForUsers (introduced here) - fetches only latest device list for multiple users. Used in the initial migration to peer list, to avoid calling the former RPC in a loop for hundreds of users

https://linear.app/comm/issue/ENG-7591/add-rpc-for-fetching-devicelists-for-multiple-users