Skip to content

[FSSDK-11448] Java Implementation: Add Experiment ID and Variation ID to Decision Notification #566

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

Merged

Conversation

esrakartalOpt
Copy link
Contributor

Summary

  • Added experimentId and variationId to decision notification

Test plan

Issues

Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

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

LGTM

@esrakartalOpt esrakartalOpt marked this pull request as ready for review May 5, 2025 19:32
@@ -97,9 +97,13 @@ public static ExperimentDecisionNotificationBuilder newExperimentDecisionNotific
public static class ExperimentDecisionNotificationBuilder {
public final static String EXPERIMENT_KEY = "experimentKey";
public final static String VARIATION_KEY = "variationKey";
public final static String EXPERIMENT_ID = "experimentId";
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this class is responsible for activate api and other stuff that are failing in FSC. The createOptimizelyDecision method uses FlagDecisionNotificationBuilder. This class needs to stay unchanged.

decisionInfo.put(VARIATION_KEY, variation != null ? variation.getKey() : null);
decisionInfo.put(VARIATION_ID, variationId);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed.

@@ -141,7 +155,9 @@ public DecisionNotification build() {

decisionInfo = new HashMap<>();
decisionInfo.put(EXPERIMENT_KEY, experimentKey);
decisionInfo.put(EXPERIMENT_ID, experimentId);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed.

this.variationId = variationId;
return this;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably why FSC is getting null values as experiment_id and variation_id. Not needed.


private String type;
private String experimentKey;
private String experimentId;
private String variationId;
Copy link
Contributor

Choose a reason for hiding this comment

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

these also are not needed

@esrakartalOpt
Copy link
Contributor Author

@muzahidul-opti
Copy link
Contributor

FSC tests passed: https://github.com/optimizely/fullstack-sdk-compatibility-suite/actions/runs/14972067859

As the FSC is passing, go ahead to merge the PR.

@esrakartalOpt esrakartalOpt merged commit 6486886 into master May 12, 2025
99 of 147 checks passed
@esrakartalOpt esrakartalOpt deleted the esra/FSSDK-11448_decision_notification_expId_varId branch May 12, 2025 14:09
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.

4 participants