-
Notifications
You must be signed in to change notification settings - Fork 410
Support Rollout, Personalization, and Experiment values in Remote Config #3042
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
Support Rollout, Personalization, and Experiment values in Remote Config #3042
Conversation
… values Added new Remote Config parameter value types (Rollout, Personalization, Experiment) to the SDK. Updated `RemoteConfigParameterValue` union type and added corresponding interfaces. Updated unit tests to verify the new types in Remote Config templates.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
| } | ||
|
|
||
| /** | ||
| * Represents a specific no change variant value within an Experiment. |
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.
Update the docstring as : "Represents a specific variant value within an Experiment".
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.
Updated the docstring to: "Represents a specific variant value within an Experiment".
| new_ui_enabled: { | ||
| defaultValue: { value: 'false' }, | ||
| conditionalValues: { | ||
| ios: { | ||
| rolloutValue: { | ||
| rolloutId: 'rollout_1', | ||
| value: 'true', | ||
| percent: 50, | ||
| } | ||
| } | ||
| }, | ||
| description: 'New UI Rollout', | ||
| valueType: 'BOOLEAN', | ||
| }, | ||
| personalized_welcome_message: { | ||
| defaultValue: { value: 'Welcome!' }, | ||
| conditionalValues: { | ||
| ios: { | ||
| personalizationValue: { | ||
| personalizationId: 'personalization_1', | ||
| } | ||
| } | ||
| }, | ||
| description: 'Personalized Welcome Message', | ||
| valueType: 'STRING', | ||
| }, | ||
| experiment_enabled: { | ||
| defaultValue: { value: 'false' }, | ||
| conditionalValues: { | ||
| ios: { | ||
| experimentValue: { | ||
| experimentId: 'experiment_1', | ||
| variantValues: [ | ||
| { variantId: 'variant_A', value: 'true' }, | ||
| { variantId: 'variant_B', noChange: true } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| description: 'Experiment Enabled', | ||
| valueType: 'BOOLEAN', | ||
| } |
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.
Let's skip editing SERVER_REMOTE_CONFIG_RESPONSE.
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.
Reverted the changes to REMOTE_CONFIG_RESPONSE. I realized I had inadvertently modified it in addition to REMOTE_CONFIG_TEMPLATE. The tests pass with REMOTE_CONFIG_RESPONSE in its original state and REMOTE_CONFIG_TEMPLATE updated with the new parameter types.
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.
It should be the other way around, apply these changes to REMOTE_CONFIG_RESPONSE and leave SERVER_REMOTE_CONFIG_RESPONSE as unchanged in its original state.
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.
Thank you for the clarification. I have updated REMOTE_CONFIG_RESPONSE to include the new parameter types and ensured SERVER_REMOTE_CONFIG_RESPONSE remains unchanged.
… values Added new Remote Config parameter value types (Rollout, Personalization, Experiment) to the SDK. Updated `RemoteConfigParameterValue` union type and added corresponding interfaces. Updated unit tests to verify the new types in Remote Config templates. Reverted unnecessary changes to test response objects.
… values Added new Remote Config parameter value types (Rollout, Personalization, Experiment) to the SDK. Updated `RemoteConfigParameterValue` union type and added corresponding interfaces. Updated unit tests to verify the new types in Remote Config templates. Correctly updated `REMOTE_CONFIG_RESPONSE` in tests to include new types, while keeping `SERVER_REMOTE_CONFIG_RESPONSE` unchanged.
| */ | ||
| export interface ExperimentValue { | ||
| experimentId: string; | ||
| variantValues: ExperimentVariantValue[]; |
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.
The field in ExperimentValue should be renamed to variantValue even though it represents a list of variant values as per https://firebase.google.com/docs/reference/remote-config/rest/v1/RemoteConfig#experimentvalue. Ensure to update all references to this interface (including tests).
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.
Done. Renamed variantValues to variantValue in ExperimentValue interface and updated all references, including tests.
… values Added new Remote Config parameter value types (Rollout, Personalization, Experiment) to the SDK. Updated `RemoteConfigParameterValue` union type and added corresponding interfaces. Updated unit tests to verify the new types in Remote Config templates. Correctly updated `REMOTE_CONFIG_RESPONSE` in tests to include new types, while keeping `SERVER_REMOTE_CONFIG_RESPONSE` unchanged. Renamed `variantValues` to `variantValue` in `ExperimentValue` interface to match API specification.
Extended
RemoteConfigParameterValueto support Rollout, Personalization, and Experiment parameter values as described in the requirements. Added interfaces forRolloutValue,PersonalizationValue, andExperimentValue. Updatedremote-config-namespace.tsto export these new types. Updatedremote-config.spec.tsto include test cases with the new value types.PR created automatically by Jules for task 7122734651052317930 started by @ashish-kothari