-
Notifications
You must be signed in to change notification settings - Fork 986
feat(rc): Web support for ABT & Rollouts #9293
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
base: main
Are you sure you want to change the base?
Conversation
* feat: Process experiment metadata in RC fetch response * [Fix] Storage cache is not updating when there are no experiments in response * Add result of running yarn docgen:all * Address review comments * Fix yarn format failures * yarn docgen changes added * Export firebaseExperimentDescription --------- Co-authored-by: Athira M <athiramanu@google.com>
* feat: Process experiment metadata in RC fetch response * [Fix] Storage cache is not updating when there are no experiments in response * Add result of running yarn docgen:all * feat: Process experiment metadata in RC fetch response * feat: Add ABT support for remote config * [Fix] Storage cache is not updating when there are no experiments in response * Merge conflict fix * Yarn format fix * Fix merge conflicts * Address review comments * Fix yarn format failures * yarn docgen changes added * Export firebaseExperimentDescription * Address review comments --------- Co-authored-by: Athira M <athiramanu@google.com>
* feat: Process experiment metadata in RC fetch response * feat: Add ABT support for remote config * feat: Integrate firebase internal analytics with ABT * [Fix] Storage cache is not updating when there are no experiments in response * feat: Process experiment metadata in RC fetch response * [Fix] Storage cache is not updating when there are no experiments in response * Add result of running yarn docgen:all * feat: Process experiment metadata in RC fetch response * feat: Add ABT support for remote config * [Fix] Storage cache is not updating when there are no experiments in response * Merge conflict fix * Yarn format fix * Fix merge conflicts * Integrate ABT with Firebase analytics to add experiment as UP * Fix yarn format errors * Address review comments * Fix yarn format failures * yarn docgen changes added * Export firebaseExperimentDescription * Address review comments * Address review comments * Add unit tests * Add error handling * Remove log --------- Co-authored-by: Athira M <athiramanu@google.com>
🦋 Changeset detectedLatest commit: 2ef04a7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
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.
Note: @nk-1983 also approved this CL, but it didn't get firebase-tw approval due to a group sync issue (should be resolved now!).
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.
Add a changeset to ensure this will be published. Use yarn changeset and follow the dialog. It's fine if you mess up, you can edit the file after it's created. The bump should be minor. Manually add "firebase: minor" to the file after it's created - see https://g3doc.corp.google.com/firebase/jscore/g3doc/contributing/changeset.md?cl=head
* Bug fixes * yarn format fail * update event name * Ensure user property is parsed * Add firebase prefix to exp
Changeset File Check ✅
|
ef61bbf to
dc45a19
Compare
| analytics.setUserProperties(customProperty); | ||
| analytics.logEvent(`set_firebase_experiment_state`); | ||
| } else { | ||
| this.logger.warn(`Analytics import failed`); |
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.
Shouldn't this throw the ANALYTICS_UNAVAILABLE error instead? Since "optional:true" is set, I don't think this will throw. If the user hasn't imported analytics you'll reach here instead. There should be a better message here. Have you tested this?
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.
I remember we discussed whether we want to block fetch call if analytics import is not present and decided to log warning instead. Since we are setting all experiment user properties without doing a diff, there are no experiments getting missed. The ANALYTICS_UNAVAILABLE was added in case one of the analytics calls throw error.
I verified that the experiments are not lost.
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.
What's the intention of this warning? To let the developer know they need to import analytics? In that case the message needs to be clearer and tell them what they need to do. I think we discussed earlier that this text was a placeholder that would be run by the tech writer. Right now the text makes it sound like something went wrong inside the SDK ("failed") and doesn't make it clear the developer needs to add an import statement. I mentioned that previous precedents for this were to either (1) provide specific instructions (such as "make sure you have import 'firebase/analytics' in your app code" or whatever wording the tech writer agrees on) or (2) to link to a devsite page that provides instructions (e.g. "Firebase Analytics was not imported. See https://www.docs//docs-about-this-feature for how to set up this feature").
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.
I guess the message can read:
Analytics import failed. Verify if you have imported Firebase Analytics in your app code.
This change is part of the feature to support Web Experiments in Remote Config. Changes can be broken down as below:
Design doc (internal): go/experiments-web