Skip to content

Commit 7924ca2

Browse files
authored
Preparing for 1.1.0 release. Bump version and fix some bugs. (#9)
1 parent 29637b6 commit 7924ca2

File tree

8 files changed

+23
-18
lines changed

8 files changed

+23
-18
lines changed

CHANGELOG.MD

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
## 1.1.0
2+
- Introduce the user profile service.
3+
14
## 1.0.0
2-
General release of Optimizely X Full Stack C# SDK. No breaking changes from previous version.
5+
- General release of Optimizely X Full Stack C# SDK. No breaking changes from previous version.
36

47
## 0.1.0
58
- Beta release of the Optimizely X Full Stack C# SDK.

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ We welcome contributions and feedback! All contributors must sign our [Contribut
33

44
## Development process
55

6-
1. Create a branch off of `devel`: `git checkout -b YOUR_NAME/branch_name`.
6+
1. Create a branch off of `master`: `git checkout -b YOUR_NAME/branch_name`.
77
2. Commit your changes. Make sure to add tests!
88
3. `git push` your changes to GitHub.
9-
4. Make sure that all unit tests are passing and that there are no merge conflicts between your branch and `devel`.
10-
5. Open a pull request from `YOUR_NAME/branch_name` to `devel`.
9+
4. Make sure that all unit tests are passing and that there are no merge conflicts between your branch and `master`.
10+
5. Open a pull request from `YOUR_NAME/branch_name` to `master`.
1111
6. A repository maintainer will review your pull request and, if all goes well, merge it!
1212

1313
## Pull request acceptance criteria

OptimizelySDK.Tests/EventTests/EventBuilderTest.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void TestCreateImpressionEventNoAttributes()
4141
{"layerId", "7719770039" },
4242
{"visitorId", "testUserId" },
4343
{"clientEngine", "csharp-sdk" },
44-
{"clientVersion", "1.0.0" },
44+
{"clientVersion", "1.1.0" },
4545
{"timestamp", SecondsSince1970() * 1000L },
4646
{"isGlobalHoldback", false },
4747
{"userFeatures", new string[0] },
@@ -75,7 +75,7 @@ public void TestCreateImpressionEventWithAttributes()
7575
{"layerId", "7719770039" },
7676
{"visitorId", "testUserId" },
7777
{"clientEngine", "csharp-sdk" },
78-
{"clientVersion", "1.0.0" },
78+
{"clientVersion", "1.1.0" },
7979
{"timestamp", SecondsSince1970() * 1000L},
8080
{"isGlobalHoldback", false },
8181
{"userFeatures",
@@ -126,7 +126,7 @@ public void TestCreateConversionEventNoAttributesNovalue()
126126
{"accountId", "1592310167"},
127127
{"visitorId", TestUserId},
128128
{"clientEngine", "csharp-sdk"},
129-
{"clientVersion", "1.0.0"},
129+
{"clientVersion", "1.1.0"},
130130
{"userFeatures", new string[0]},
131131
{"isGlobalHoldback", false},
132132
{"timestamp", SecondsSince1970() * 1000L} ,
@@ -172,7 +172,7 @@ public void TestCreateConversionEventWithAttributesNoValue()
172172
{"accountId", "1592310167"},
173173
{"visitorId", TestUserId},
174174
{"clientEngine", "csharp-sdk"},
175-
{"clientVersion", "1.0.0"},
175+
{"clientVersion", "1.1.0"},
176176

177177
{"isGlobalHoldback", false},
178178
{"timestamp", SecondsSince1970() * 1000L} ,
@@ -239,7 +239,7 @@ public void TestCreateConversionEventNoAttributesWithValue()
239239
{"accountId", "1592310167"},
240240
{"visitorId", TestUserId},
241241
{"clientEngine", "csharp-sdk"},
242-
{"clientVersion", "1.0.0"},
242+
{"clientVersion", "1.1.0"},
243243

244244
{"isGlobalHoldback", false},
245245
{"timestamp", SecondsSince1970() * 1000L} ,
@@ -311,7 +311,7 @@ public void TestCreateConversionEventWithAttributesWithValue()
311311
{"accountId", "1592310167"},
312312
{"visitorId", TestUserId},
313313
{"clientEngine", "csharp-sdk"},
314-
{"clientVersion", "1.0.0"},
314+
{"clientVersion", "1.1.0"},
315315
{"isGlobalHoldback", false},
316316
{"timestamp", SecondsSince1970() * 1000L} ,
317317
{"eventFeatures",
@@ -410,7 +410,7 @@ public void TestCreateConversionEventNoAttributesWithInvalidValue()
410410
{"visitorId", "testUserId"},
411411
// {"revision", "15"}, TODO: It should be a part of project config file, have to check it.
412412
{"clientEngine", "csharp-sdk"},
413-
{"clientVersion", "1.0.0"},
413+
{"clientVersion", "1.1.0"},
414414
{"userFeatures" , new object[0]},
415415
{"isGlobalHoldback", false},
416416
{"timestamp", SecondsSince1970() * 1000L },

OptimizelySDK.sln

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26403.7
4+
VisualStudioVersion = 15.0.26228.10
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OptimizelySDK.DemoApp", "OptimizelySDK.DemoApp\OptimizelySDK.DemoApp.csproj", "{9394F666-6397-41C0-8867-C3E4DA9156E3}"
77
ProjectSection(ProjectDependencies) = postProject
@@ -14,7 +14,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OptimizelySDK", "Optimizely
1414
EndProject
1515
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{26C3BFAE-79A1-4299-978C-0F4916427B9D}"
1616
ProjectSection(SolutionItems) = preProject
17+
CHANGELOG.MD = CHANGELOG.MD
1718
CONTRIBUTING.md = CONTRIBUTING.md
19+
OptimizelySDK\OptimizelySDK.nuspec = OptimizelySDK\OptimizelySDK.nuspec
1820
README.md = README.md
1921
EndProjectSection
2022
EndProject

OptimizelySDK/Bucketing/DecisionService.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public Variation GetVariation(Experiment experiment, string userId, UserAttribut
7878
try
7979
{
8080
Dictionary<string, object> userProfileMap = UserProfileService.Lookup(userId);
81-
if (UserProfileUtil.IsValidUserProfileMap(userProfileMap))
81+
if (userProfileMap != null && UserProfileUtil.IsValidUserProfileMap(userProfileMap))
8282
{
8383
userProfile = UserProfileUtil.ConvertMapToUserProfile(userProfileMap);
8484
variation = GetStoredVariation(experiment, userProfile);
@@ -232,8 +232,8 @@ public void SaveVariation(Experiment experiment, Variation variation, UserProfil
232232
}
233233
catch (Exception exception)
234234
{
235-
Logger.Log(LogLevel.ERROR, string.Format("Failed to save variation \"{0}\" of experiment \"{1}\" for user \"{2}\".",
236-
variation.Id, experiment.Id, userProfile.UserId));
235+
Logger.Log(LogLevel.ERROR, string.Format("Failed to save variation \"{0}\" of experiment \"{1}\" for user \"{2}\": {3}.",
236+
variation.Id, experiment.Id, userProfile.UserId, exception.Message));
237237
ErrorHandler.HandleError(new Exceptions.OptimizelyRuntimeException(exception.Message));
238238
}
239239
}

OptimizelySDK/Event/Builder/EventBuilder.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class EventBuilder
2626
{
2727
private const string SDK_TYPE = "csharp-sdk";
2828

29-
private const string SDK_VERSION = "1.0.0";
29+
private const string SDK_VERSION = "1.1.0";
3030

3131
private const string IMPRESSION_ENDPOINT = "https://logx.optimizely.com/log/decision";
3232

OptimizelySDK/Optimizely.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public Optimizely(string datafile,
8080

8181
Config = ProjectConfig.Create(datafile, Logger, ErrorHandler);
8282
IsValid = true;
83-
DecisionService = new DecisionService(Bucketer, errorHandler, Config, userProfileService, Logger);
83+
DecisionService = new DecisionService(Bucketer, ErrorHandler, Config, userProfileService, Logger);
8484
}
8585
catch (Exception ex)
8686
{

OptimizelySDK/OptimizelySDK.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>Optimizely.SDK</id>
5-
<version>1.0.0</version>
5+
<version>1.1.0</version>
66
<title>Optimizely C# SDK</title>
77
<authors>Optimizely Development Team</authors>
88
<owners>fullstack.optimizely</owners>

0 commit comments

Comments
 (0)