Page MenuHomePhabricator

[native] Retry feature flags call
ClosedPublic

Authored by tomek on Jul 31 2023, 7:26 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 3, 2:46 PM
Unknown Object (File)
Wed, Jul 3, 1:57 PM
Unknown Object (File)
Wed, Jul 3, 9:02 AM
Unknown Object (File)
Tue, Jul 2, 10:21 PM
Unknown Object (File)
Tue, Jul 2, 10:20 PM
Unknown Object (File)
Tue, Jul 2, 10:20 PM
Unknown Object (File)
Tue, Jul 2, 10:20 PM
Unknown Object (File)
Mon, Jul 1, 2:29 AM
Subscribers

Details

Summary

Retry feature flags call. If number of tries is exceeded, rethrow an error.

Depends on D8652

Test Plan

Add console logs and simulate failed requests - the requests should be retried up to numberOfTries times with delays.

Diff Detail

Repository
rCOMM Comm
Branch
feature-flags-timeout
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Jul 31 2023, 9:11 AM
native/components/feature-flags-provider.react.js
111

You can skip last sleep because there will be no more retries from then, it only delays the rethrow

Avoid sleep before throwing

native/components/feature-flags-provider.react.js
111

Yeah, you're obviously right

This revision is now accepted and ready to land.Aug 1 2023, 6:47 AM
This revision was automatically updated to reflect the committed changes.