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)
Mon, Dec 2, 3:32 PM
Unknown Object (File)
Mon, Dec 2, 3:22 AM
Unknown Object (File)
Tue, Nov 26, 6:50 PM
Unknown Object (File)
Nov 8 2024, 10:03 PM
Unknown Object (File)
Nov 8 2024, 7:14 PM
Unknown Object (File)
Nov 8 2024, 7:14 PM
Unknown Object (File)
Nov 8 2024, 7:14 PM
Unknown Object (File)
Nov 8 2024, 1:36 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