Page MenuHomePhabricator

[lib][native] Deprecate DispatchRecoveryAttempt in favor of DispatchActionPromise
ClosedPublic

Authored by ashoat on Mar 3 2024, 9:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 13, 12:15 AM
Unknown Object (File)
Apr 6 2024, 4:16 AM
Unknown Object (File)
Apr 4 2024, 6:43 PM
Unknown Object (File)
Mar 17 2024, 10:44 AM
Unknown Object (File)
Mar 16 2024, 4:41 PM
Unknown Object (File)
Mar 15 2024, 6:06 PM
Unknown Object (File)
Mar 14 2024, 11:14 PM
Unknown Object (File)
Mar 13 2024, 1:37 AM
Subscribers
None

Details

Summary

This diff does away with the DispatchRecoveryAttempt function.

We need the types to be consistent with DispatchActionPromise so that we can define the business logic in keyserverAuth in a generic way, where it can work for either a normal auth (DispatchActionPromise) or a recovery (formerly DispatchRecoveryAttempt, now also DispatchActionPromise).

I initially considered unifying the types but keeping the dispatchRecoveryAttempt function around for the logic it performs with callSingleKeyserverEndpointCallback. But then I realized that logic won't work for the identity service-based auth workflow, where we'll want to fallback to the legacy auth workflow if the new one fails. The logic inside callSingleKeyserverEndpointCallback isn't built to handle multiple keyserver calls... there's just one single callSingleKeyserverEndpointCallback variable for the whole "business logic" wrapped by resolveKeyserverSessionInvalidation. In a later diff, I make resolveKeyserverSessionInvalidation wrap a generic async function that can perform any business logic, and at that point being able to support multiple keyserver calls within the wrapped logic will be helpful.

Depends on D11223

Test Plan

I used this test plan for the whole stack: https://gist.github.com/Ashoat/75ab690d5c53cdd68a51b02e03e27c58

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable