Page MenuHomePhabricator

[grpc clients] use cookie for finish requests
ClosedPublic

Authored by varun on Nov 30 2023, 3:43 PM.
Tags
None
Referenced Files
F3366003: D10121.id34163.diff
Mon, Nov 25, 9:00 AM
F3362543: D10121.diff
Sun, Nov 24, 11:01 PM
Unknown Object (File)
Fri, Nov 22, 4:15 AM
Unknown Object (File)
Thu, Nov 21, 5:01 AM
Unknown Object (File)
Thu, Nov 21, 5:01 AM
Unknown Object (File)
Thu, Nov 21, 5:01 AM
Unknown Object (File)
Thu, Nov 21, 5:01 AM
Unknown Object (File)
Thu, Nov 21, 5:01 AM
Subscribers

Details

Summary

when we call the registration, login, and update password _finish RPCs, we need to use the load balancer cookie to ensure these requests are routed to the same identity service instance that received the _start RPCs.

Test Plan

called the native_rust_library client methods and confirmed that registration/login/update password all worked on staging with multiple instances running

Diff Detail

Repository
rCOMM Comm
Branch
deleteuser (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun requested review of this revision.Nov 30 2023, 4:27 PM
bartek requested changes to this revision.Dec 1 2023, 12:36 AM

I'm glad that you've figured it out! 🎉

I have one concern inline, feel free to re-request if I've been missing something

shared/grpc_clients/src/error.rs
34–36

I find this more universal

shared/grpc_clients/src/identity/shared.rs
63–65

What about local dev environment? This cookie won't be available.
Should we return Result<Option<MetadataValue>> and then do if let Some(cookie) = ...?

This revision now requires changes to proceed.Dec 1 2023, 12:36 AM

addressed feedback and decided some of the error handling was unnecessary

use constant to avoid re-typing "set-cookie" and "cookie"

This revision is now accepted and ready to land.Dec 2 2023, 12:02 AM