0

I've implemented real time remote config updates via the documentation here.

In general, it works as expected, except when it comes to experiments via A/B Testing. Changes to A/B Testing that affect remote config do not fire the update cloud function hook.

Does anyone know if its possible to have the functions.remoteConfig.onUpdate cloud function hook trigger when a change to remote config is made via an A/B Testing experiment change?

The only workaround I can think of is to have a dummy value in remote config itself that I change whenever an experiment is created/updated.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
simon
  • 2,635
  • 4
  • 20
  • 21

1 Answers1

0

firebaser here

There is nothing built into Remote Config for that at the moment. But thanks to the integration between Cloud Functions and Remote Config, you can build it yourself.

One of our engineers actually just gave a demo for this last week. I recommend you check it out here: https://youtu.be/lIzQJC21uus?t=3351.

In this demo, there are a few steps:

  1. You publish a change from the Remote Config console.
  2. This change triggers Cloud Functions through a functions.remoteConfig.onUpdate event.
  3. The Cloud Function sends an FCM message to all apps through a topic.
  4. When an app receives this message, it shows a prompt that the configuration is out of date.
  5. When the user clicks the "fetch" button, the app fetches the new configuration data from Remote Config.
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Thanks, this is what I've successfully implemented by following the docs. My issue is specifically that changes to A/B Testing experiments that would result in remote config changing (for some users at least) does not trigger the `functions.remoteConfig.onUpdate` event. – simon Nov 08 '18 at 23:09
  • Sorry about that, I completely missed that we had documented this precise process: https://firebase.google.com/docs/remote-config/propagate-updates-realtime. I'm actually not sure how A/B testing updates are pushed to Remote Config (and thus to Cloud Functions). Let me ask around. – Frank van Puffelen Nov 08 '18 at 23:15
  • The answer was fast, but unfortunately negative: the Cloud Function will only be triggered once a winner has been chosen. A/B Testing update before that do not trigger Cloud Functions. – Frank van Puffelen Nov 08 '18 at 23:26
  • @FrankvanPuffelen how does realtime update work for remoteconfig if app in killed state? – user3247895 Oct 13 '20 at 06:43
  • If the app is not active, it will update the next time it is started. – Frank van Puffelen Oct 13 '20 at 13:06