Page MenuHomePhabricator

[services] Move reserved_usernames to `shared`
ClosedPublic

Authored by tomek on Feb 13 2024, 6:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 3 2024, 11:47 PM
Unknown Object (File)
Oct 3 2024, 11:47 PM
Unknown Object (File)
Oct 3 2024, 11:47 PM
Unknown Object (File)
Oct 3 2024, 11:46 PM
Unknown Object (File)
Oct 3 2024, 11:45 PM
Unknown Object (File)
Sep 7 2024, 9:56 AM
Unknown Object (File)
Sep 6 2024, 10:38 PM
Unknown Object (File)
Sep 2 2024, 4:59 PM
Subscribers

Details

Summary

Move the file to shared and import it in two places.

This solution still requires the file to be duplicated. Solving this is more involved, as it would require storing this file in json format and importing it in lib, which currently isn't supported. Even if we use fs instead, we would still need to change the logic to be async.

https://linear.app/comm/issue/ENG-6780/share-reserved-usernames-between-services

Depends on D11015

Test Plan

Run both Identity and Blob services on local and Identity on Docker and check if in each case the file is accessible by console logging its content.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested review of this revision.Feb 13 2024, 6:58 AM
bartek added inline comments.
services/identity/src/config.rs
72–73 ↗(On Diff #37030)

I'd remove this from this config and use RESERVED_USERNAME_SET directly in client_service.rs (two places: #1, #2)

104 ↗(On Diff #37030)

Same as above. Storing it twice is unnecessary. Since now it's static and Lazy, we can get rid of it here and use the static directly.

This revision is now accepted and ready to land.Feb 13 2024, 8:42 AM