Page MenuHomePhabricator

[identity] Create function to determine primary device
ClosedPublic

Authored by bartek on Dec 19 2023, 4:57 AM.
Tags
None
Referenced Files
F2147581: D10400.id35545.diff
Sun, Jun 30, 2:21 AM
F2144685: D10400.id34831.diff
Sat, Jun 29, 8:43 PM
Unknown Object (File)
Sat, Jun 29, 1:43 PM
Unknown Object (File)
Sat, Jun 29, 12:38 PM
Unknown Object (File)
Tue, Jun 25, 7:24 PM
Unknown Object (File)
Tue, Jun 25, 11:29 AM
Unknown Object (File)
Tue, Jun 25, 11:29 AM
Unknown Object (File)
Tue, Jun 25, 11:29 AM
Subscribers

Details

Summary

Resolves ENG-5287. Implements a function that determines which device should be primary basing on user's current devices.

Depends on D10399

Test Plan

Unit tests covering all cases from the ENG-5844 testing task.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.

Remove accidentaly committed comments

bartek published this revision for review.Dec 19 2023, 6:32 AM
varun requested changes to this revision.Jan 10 2024, 3:31 PM
varun added inline comments.
services/identity/src/database/device_list.rs
1041 ↗(On Diff #34832)

not sure i understand the part in parentheses here

1141 ↗(On Diff #34832)

together

1162 ↗(On Diff #34832)

can we add a test that shows that if there are two mobile devices with the same code version and latest login time, we still deterministically select the primary device?

This revision now requires changes to proceed.Jan 10 2024, 3:31 PM

Add test to check if selection is deterministic

services/identity/src/database/device_list.rs
1041 ↗(On Diff #34832)

Yeah it doesn't make sense

This revision is now accepted and ready to land.Jan 11 2024, 9:22 AM