Page MenuHomePhabricator

[grpc clients] use cookie for finish requests
ClosedPublic

Authored by varun on Nov 30 2023, 3:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 7:55 PM
Unknown Object (File)
Mon, Nov 25, 10:15 AM
Unknown Object (File)
Mon, Nov 25, 9:00 AM
Unknown Object (File)
Sun, Nov 24, 11:01 PM
Unknown Object (File)
Nov 22 2024, 4:15 AM
Unknown Object (File)
Nov 21 2024, 5:01 AM
Unknown Object (File)
Nov 21 2024, 5:01 AM
Unknown Object (File)
Nov 21 2024, 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 โ†—(On Diff #34080)

I find this more universal

shared/grpc_clients/src/identity/shared.rs
63โ€“65 โ†—(On Diff #34080)

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
This revision was automatically updated to reflect the committed changes.