Page MenuHomePhabricator

[identity] [lib] [keyserver] [7/n] Add userID to reserved_usernames table in DDB
ClosedPublic

Authored by will on Dec 28 2023, 9:04 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 9:47 PM
Unknown Object (File)
Sat, Nov 23, 5:21 PM
Unknown Object (File)
Wed, Nov 6, 11:52 PM
Unknown Object (File)
Oct 18 2024, 5:55 AM
Unknown Object (File)
Oct 18 2024, 5:55 AM
Unknown Object (File)
Oct 18 2024, 5:55 AM
Unknown Object (File)
Oct 18 2024, 5:55 AM
Unknown Object (File)
Oct 18 2024, 5:55 AM
Subscribers

Details

Summary

Adding userID to reserved_usernames table. This is to enable future work streaming usernames to opensearch instance.

Depends on D10438

Test Plan

Test on local dev. Registered new user on ios and successfully persisted userID attribute in dynamoDB.

Diff Detail

Repository
rCOMM Comm
Branch
identity-search
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

will published this revision for review.Dec 28 2023, 9:07 AM
will planned changes to this revision.Jan 3 2024, 1:49 PM

Rebase resolve build errors

varun requested changes to this revision.Jan 4 2024, 3:00 PM
varun added inline comments.
services/identity/src/database.rs
866–880 ↗(On Diff #35179)

i don't think we need to change this function at all. there's no reason to pass in the entire UserDetail since we're only using the username field

This revision now requires changes to proceed.Jan 4 2024, 3:00 PM
services/identity/src/database.rs
866–880 ↗(On Diff #35179)

So I'm using the return details right afterwards in client_services.rs.
add_usernames_to_reserved_usernames_table(filtered_user_details)

I changed it to take in User Details instead of usernames as to avoid additional code later filtering the full list of user_details with whether or not they had a username in filtered_user_usernames and just passing filtered_user_details directly.

Do you think I should go ahead with changing the function back and just filtering the user details out of filtered_out_usernames?

services/identity/src/database.rs
866–880 ↗(On Diff #35179)

ah i see. i think it's fine as is, actually

This revision is now accepted and ready to land.Jan 4 2024, 4:39 PM