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)
Thu, Nov 28, 2:44 PM
Unknown Object (File)
Thu, Nov 28, 12:02 PM
Unknown Object (File)
Oct 29 2024, 9:48 AM
Unknown Object (File)
Oct 4 2024, 3:27 AM
Unknown Object (File)
Oct 4 2024, 3:27 AM
Unknown Object (File)
Oct 4 2024, 3:27 AM
Unknown Object (File)
Oct 4 2024, 3:27 AM
Unknown Object (File)
Oct 4 2024, 3:26 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
No Lint Coverage
Unit
No Test Coverage