-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remote config overhaul #5297
remote config overhaul #5297
Conversation
Should we move all consumption of the remote config to use the hook? |
…@benisgold/fix-remote-config
…nbow-me/rainbow into @benisgold/fix-remote-config t
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testing the changes now
…@benisgold/fix-remote-config
@@ -25,6 +25,4 @@ to start before all of the imports. | |||
*/ | |||
require('react-native-gesture-handler'); | |||
require('./shim'); | |||
require('./src/model/config'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this ok @walmat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested turning remote config on and off for all respective parameters and works as expected; spot checked Android as well to make sure everything still shows!
QA Passed 👍🏽
* hook * refetching * finish query hook * migrate points to new remote config query * error handling * fetch on app init * cleanup * onError * rm testing error * change IS_DEV to exp feature flag hook * debugging * tf * rm testing stuff and fix tabs * staleTime/cacheTime * add IS_TEST to points * rm unnecessary error + added finally * rm config * syntax * full migration * remove index stuff * rm react query cache + fix firebase cache time --------- Co-authored-by: Matthew Wall <matthew.wallt@gmail.com>
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Fixes APP-1040, APP-1041
What changed (plus any additional context for devs)
The general problem:
Remote config values are accessed from the
config
object in the app. The problem with this is that if theconfig
object updates, it will not trigger rerenders in the components that statically access its attributes. This can cause race condition issues, since we do not await fetching remote config on app startup.How the points feature flag problem occurred:
Solution:
This PR migrates the remote config implementation over to a react query hook. This allows us to provide remote config with a hook, which causes dependent components to immediately rerender if remote config is updated. Now what happens:
FOLLOW-UP:
Screen recordings / screenshots
https://www.loom.com/share/734dcab645144757814dc8b2e2334739
What to test
TF 1.9.12 (28)
points feature should be hidden. try restarting the app many times to refresh remote config