Skip to content

Commit 10e22be

Browse files
(chore):Prepare for3.0 (#252)
* update changelog * right after java is released * fix release order after cherry-pick * fix unit tests that were not updated for easy event tracking * update change log. nikhil suggestions * update date and fix sourceClear
1 parent 5d119f1 commit 10e22be

File tree

3 files changed

+59
-28
lines changed

3 files changed

+59
-28
lines changed

CHANGELOG.md

Lines changed: 52 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
11
# Optimizely Android X SDK Changelog
22

3+
## 3.0.0
4+
February 14, 2019
5+
6+
The 3.0 release improves event tracking and supports additional audience targeting functionality.
7+
8+
### New Features:
9+
* Event tracking:
10+
* The Track method now dispatches its conversion event _unconditionally_, without first determining whether the user is targeted by a known experiment that uses the event. This may increase outbound network traffic.
11+
* In Optimizely results, conversion events sent by 3.0 SDKs are automatically attributed to variations that the user has previously seen, as long as our backend has actually received the impression events for those variations.
12+
* Altogether, this allows you to track conversion events and attribute them to variations even when you don't know all of a user's attribute values, and even if the user's attribute values or the experiment's configuration have changed such that the user is no longer affected by the experiment. As a result, **you may observe an increase in the conversion rate for previously-instrumented events.** If that is undesirable, you can reset the results of previously-running experiments after upgrading to the 3.0 SDK.
13+
* This will also allow you to attribute events to variations from other Optimizely projects in your account, even though those experiments don't appear in the same datafile.
14+
* Note that for results segmentation in Optimizely results, the user attribute values from one event are automatically applied to all other events in the same session, as long as the events in question were actually received by our backend. This behavior was already in place and is not affected by the 3.0 release.
15+
* Support for all types of attribute values, not just strings.
16+
* All values are passed through to notification listeners.
17+
* Strings, booleans, and valid numbers are passed to the event dispatcher and can be used for Optimizely results segmentation. A valid number is a finite float, double, integer, or long in the inclusive range [-2⁵³, 2⁵³].
18+
* Strings, booleans, and valid numbers are relevant for audience conditions.
19+
* Support for additional matchers in audience conditions:
20+
* An `exists` matcher that passes if the user has a non-null value for the targeted user attribute and fails otherwise.
21+
* A `substring` matcher that resolves if the user has a string value for the targeted attribute.
22+
* `gt` (greater than) and `lt` (less than) matchers that resolve if the user has a valid number value for the targeted attribute. A valid number is a finite float, double, integer, or long in the inclusive range [-2⁵³, 2⁵³].
23+
* The original (`exact`) matcher can now be used to target booleans and valid numbers, not just strings.
24+
* Support for A/B tests, feature tests, and feature rollouts whose audiences are combined using `"and"` and `"not"` operators, not just the `"or"` operator.
25+
* Datafile-version compatibility check: The SDK will remain uninitialized (i.e., will gracefully fail to activate experiments and features) if given a datafile version greater than 4.
26+
* Updated Pull Request template and commit message guidelines.
27+
* When given an invalid datafile, the Optimizely client object now instantiates into a no-op state instead of throwing a `ConfigParseException`. This matches the behavior of the other Optimizely SDKs.
28+
29+
### Breaking Changes:
30+
* Java 7 is no longer supported.
31+
* Previously, notification listeners were only given string-valued user attributes because only strings could be passed into various method calls. That is no longer the case. The `ActivateNotificationListener` and `TrackNotificationListener` interfaces now receive user attributes as `Map<String, ?>` instead of `Map<String, String>`.
32+
* The Localytics integration now relies on the user profile service to attribute events to the user's variations.
33+
* Drops support for the `getVariableBoolean`, `getVariableDouble`, `getVariableInteger`, and `getVariableString` APIs. Please migrate to the Feature Management APIs which were introduced in the 2.x releases.
34+
35+
### Bug Fixes:
36+
* Experiments and features can no longer activate when a negatively targeted attribute has a missing, null, or malformed value.
37+
* Audience conditions (except for the new `exists` matcher) no longer resolve to `false` when they fail to find an legitimate value for the targeted user attribute. The result remains `null` (unknown). Therefore, an audience that negates such a condition (using the `"not"` operator) can no longer resolve to `true` unless there is an unrelated branch in the condition tree that itself resolves to `true`.
38+
* Support for empty user IDs.
39+
* SourceClear flagged jackson-databind 2.9.4 fixed in 2.9.8
40+
41+
## 2.1.4
42+
February 8th, 2019
43+
44+
This is a patch release.
45+
46+
### Bug Fixes
47+
* fix User Profile Service. Don't trim the user profile service unless there are over 100 experiments in a users UPS. This will be configurable in the future.
48+
49+
## 2.1.3
50+
December 6th, 2018
51+
52+
### Bug Fixes
53+
The attributes map is now copied to ensure there is no concurrency issues.
54+
355
## 3.0.0-RC2
456

557
November 20th, 2018
@@ -41,10 +93,6 @@ release.
4193
he data passed to registered listeners. To support our growing list of supported attribute values, we’ve changed this behavior. Notification listeners will now post any value type passed as an attribute. Therefore, the interface of the notification listeners has changed to accept a `Map<String, ?>`.
4294
* Update to use Java 1.7 ([#208](https://github.com/optimizely/java-sdk/pull/208))
4395

44-
45-
### Bug Fixes
46-
The attributes map is now copied to ensure there is no concurrency issues.
47-
4896
## 2.1.2
4997
November 8, 2018
5098

android-sdk/src/androidTest/java/com/optimizely/ab/android/sdk/OptimizelyClientTest.java

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,7 @@ public void testGoodForcedTrack() {
410410
// id of var_2
411411
// the new event backend accepts both camel case and snake case
412412
// https://logx.optimizely.com/v1/events
413-
assertTrue(logEvent.getBody().contains("\"variationId\":\"8505434669\"") ||
414-
logEvent.getBody().contains("\"variation_id\":\"8505434669\""));
415-
416-
verify(config).getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
413+
assertTrue(logEvent.getBody().contains("\"enrich_decisions\":true"));
417414

418415
Variation v = optimizelyClient.getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
419416
assertEquals(v.getKey(), "var_2");
@@ -479,7 +476,7 @@ public void onTrack(@Nonnull String eventKey, @Nonnull String userId, @Nonnull M
479476
assertEquals(true, numberOfCalls[0]);
480477
}
481478
else {
482-
assertEquals(false, numberOfCalls[0]);
479+
assertEquals(true, numberOfCalls[0]);
483480
}
484481
verifyZeroInteractions(logger);
485482

@@ -493,7 +490,6 @@ public void testGoodTrackBucketing() {
493490
Experiment experiment = optimizelyClient.getProjectConfig().getExperimentsForEventKey("test_event").get(0);
494491
attributes.put(BUCKETING_ATTRIBUTE, bucketingId);
495492
optimizelyClient.track("test_event", "userId", attributes);
496-
verify(bucketer).bucket(experiment, bucketingId);
497493
verifyZeroInteractions(logger);
498494
}
499495

@@ -553,11 +549,9 @@ public void testGoodForcedTrackAttribute() {
553549
// the new event backend accepts both camel case and snake case
554550
// https://logx.optimizely.com/v1/events
555551
// id of var_2
556-
assertTrue(logEvent.getBody().contains("\"variationId\":\"8505434669\"") ||
552+
assertTrue(logEvent.getBody().contains("\"enrich_decisions\":true") ||
557553
logEvent.getBody().contains("\"variation_id\":\"8505434669\""));
558554

559-
verify(config).getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
560-
561555
Variation v = optimizelyClient.getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
562556
assertEquals(v.getKey(), "var_2");
563557

@@ -585,8 +579,6 @@ public void testGoodTrackAttribute() {
585579

586580
verifyZeroInteractions(logger);
587581

588-
verify(config).getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
589-
590582
Variation v = optimizelyClient.getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
591583
assertEquals(v.getKey(), "var_2");
592584

@@ -659,10 +651,7 @@ public void testGoodForcedTrackEventVal() {
659651
// the new event backend accepts both camel case and snake case
660652
// https://logx.optimizely.com/v1/events
661653
// id of var_2
662-
assertTrue(logEvent.getBody().contains("\"variationId\":\"8505434669\"") ||
663-
logEvent.getBody().contains("\"variation_id\":\"8505434669\""));
664-
665-
verify(config).getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
654+
assertTrue(logEvent.getBody().contains("\"enrich_decisions\":true"));
666655

667656
Variation v = optimizelyClient.getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
668657
assertEquals(v.getKey(), "var_2");
@@ -761,10 +750,7 @@ public void testGoodForcedTrackAttributeEventVal() {
761750
// the new event backend accepts both camel case and snake case
762751
// https://logx.optimizely.com/v1/events
763752
// id of var_2
764-
assertTrue(logEvent.getBody().contains("\"variationId\":\"8505434669\"") ||
765-
logEvent.getBody().contains("\"variation_id\":\"8505434669\""));
766-
767-
verify(config).getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
753+
assertTrue(logEvent.getBody().contains("\"enrich_decisions\":true"));
768754

769755
Variation v = optimizelyClient.getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
770756
assertEquals(v.getKey(), "var_2");
@@ -853,13 +839,10 @@ public void testForcedTrackWithEventTags() {
853839
// the new event backend accepts both camel case and snake case
854840
// https://logx.optimizely.com/v1/events
855841
// id of var_2
856-
assertTrue(logEvent.getBody().contains("\"variationId\":\"8505434669\"") ||
857-
logEvent.getBody().contains("\"variation_id\":\"8505434669\""));
842+
assertTrue(logEvent.getBody().contains("\"enrich_decisions\":true"));
858843

859844
verifyZeroInteractions(logger);
860845

861-
verify(config).getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
862-
863846
Variation v = optimizelyClient.getForcedVariation(FEATURE_ANDROID_EXPERIMENT_KEY, GENERIC_USER_ID);
864847
assertEquals(v.getKey(), "var_2");
865848

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ext {
5353
build_tools_version = "28.0.3"
5454
min_sdk_version = 14
5555
target_sdk_version = 28
56-
java_core_ver = "3.0.0-RC2"
56+
java_core_ver = "3.0.0"
5757
android_logger_ver = "1.3.6"
5858
support_annotations_ver = "24.2.1"
5959
junit_ver = "4.12"

0 commit comments

Comments
 (0)