Skip to content

Detect changes in AB Testing (ABT) experiment metadata during config fetch#8002

Open
athiramanu wants to merge 2 commits intomainfrom
realtime-abt
Open

Detect changes in AB Testing (ABT) experiment metadata during config fetch#8002
athiramanu wants to merge 2 commits intomainfrom
realtime-abt

Conversation

@athiramanu
Copy link
Copy Markdown

Updated to detect changes in AB Testing (ABT) experiment metadata. This ensures that if an experiment's variant or affected parameter keys change, the associated config keys are correctly identified as changed, even if the parameter values remain the same.

Key changes:

  • Added constant to .
  • Implemented in to map affected config keys to their respective experiment descriptions.
  • Modified to compare experiment metadata for each config key.
  • Updated with cases for changed, deleted, and key-shifted experiments.

Validation:

  • Adding an experiment with 100% exposure assigns user to a variant
  • Updating exposure to 0% returns default value to user
  • Updating exposure back to 100% returns the previously assigned variant
  • Updating the variant value returns the new value to user

Testing on sample Android app: Link

Updated  to detect changes in AB Testing (ABT) experiment metadata. This ensures that if an experiment's variant or affected parameter keys change, the associated config keys are correctly identified as changed, even if the parameter values remain the same.

Key changes:
- Added  constant to .
- Implemented  in  to map affected config keys to their respective experiment descriptions.
- Modified  to compare experiment metadata for each config key.
- Updated  with cases for changed, deleted, and key-shifted experiments.
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 31, 2026

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

JSONArray affectedKeys = experiment.getJSONArray(AFFECTED_PARAMETER_KEYS);
for (int j = 0; j < affectedKeys.length(); j++) {
String key = affectedKeys.getString(j);
JSONObject experimentsCopy = new JSONObject(experiment.toString());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this copy really required? We can reuse the same JSONObject to be added in the map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants