HomePhabricator
Diffusion Comm 4b70814a8bd4

[services][identity] refactor streaming RPCs to remove loops, use new client…

Description

[services][identity] refactor streaming RPCs to remove loops, use new client method to add users to DDB

Summary:

  • due to how interconnected this code is, it was hard to split it out into more diffs
  • using the update_item API to add new users to the users table in DynamoDB was a mistake. we should be using put_item (hence why we now call the add_user_to_users_table fn, which uses the put_item API)
  • since we know exactly how many messages we'll receive in the stream, we can avoid looping through messages on the server side

Test Plan: Called register_user and login_user from main.rs and confirmed that both workflows still work

Reviewers: jon, bartek, tomek

Reviewed By: jon

Subscribers: ashoat, atul

Differential Revision: https://phab.comm.dev/D6723