Page MenuHomePhabricator

[identity] Create function to determine primary device
ClosedPublic

Authored by bartek on Dec 19 2023, 4:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 2:26 AM
Unknown Object (File)
Thu, Nov 7, 12:41 PM
Unknown Object (File)
Thu, Nov 7, 10:02 AM
Unknown Object (File)
Wed, Nov 6, 11:44 PM
Unknown Object (File)
Oct 18 2024, 3:57 AM
Unknown Object (File)
Oct 18 2024, 3:57 AM
Unknown Object (File)
Oct 18 2024, 3:57 AM
Unknown Object (File)
Oct 18 2024, 3:57 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
No Lint Coverage
Unit
No Test Coverage

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