Page MenuHomePhabricator

[Identity] Add deleteUser RPC to proto files
ClosedPublic

Authored by jon on Feb 20 2023, 1:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 4:17 PM
Unknown Object (File)
Sun, Apr 7, 4:17 PM
Unknown Object (File)
Sun, Apr 7, 4:17 PM
Unknown Object (File)
Sun, Apr 7, 4:17 PM
Unknown Object (File)
Sun, Apr 7, 4:17 PM
Unknown Object (File)
Sun, Apr 7, 4:15 PM
Unknown Object (File)
Sun, Apr 7, 3:52 PM
Unknown Object (File)
Sun, Apr 7, 3:12 PM
Subscribers

Details

Summary

Add deleteUser logic to identity service.

Depends on D6787

Part of https://linear.app/comm/issue/ENG-2764

Test Plan
cargo build

Gets end-to-end tested in a later diff

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Add grpc implementation as it's not that much code

services/identity/src/database.rs
202 ↗(On Diff #22756)

This might be a bit misleading, whether or not it deleted something, this will still return as successful.

nice! i noticed we never send back the failure enum variant. did you look into best practices for gRPC API design?

This revision is now accepted and ready to land.Feb 21 2023, 9:56 AM

Since the generated bindings require me to send Result<tonic::Response<DeleteUserResponse>, tonic::Status>, I can only send a status. I will just remove the inner result and let the grpc status dictate success.

Remove response enum, as it duplicates GRPC behavior