Skip to content

Preparing for 1.1.0 release. Bump version and fix some bugs. #9

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
merged 1 commit into from
Jun 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## 1.1.0
- Introduce the user profile service.

## 1.0.0
General release of Optimizely X Full Stack C# SDK. No breaking changes from previous version.
- General release of Optimizely X Full Stack C# SDK. No breaking changes from previous version.

## 0.1.0
- Beta release of the Optimizely X Full Stack C# SDK.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ We welcome contributions and feedback! All contributors must sign our [Contribut

## Development process

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

## Pull request acceptance criteria
Expand Down
14 changes: 7 additions & 7 deletions OptimizelySDK.Tests/EventTests/EventBuilderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void TestCreateImpressionEventNoAttributes()
{"layerId", "7719770039" },
{"visitorId", "testUserId" },
{"clientEngine", "csharp-sdk" },
{"clientVersion", "1.0.0" },
{"clientVersion", "1.1.0" },
{"timestamp", SecondsSince1970() * 1000L },
{"isGlobalHoldback", false },
{"userFeatures", new string[0] },
Expand Down Expand Up @@ -75,7 +75,7 @@ public void TestCreateImpressionEventWithAttributes()
{"layerId", "7719770039" },
{"visitorId", "testUserId" },
{"clientEngine", "csharp-sdk" },
{"clientVersion", "1.0.0" },
{"clientVersion", "1.1.0" },
{"timestamp", SecondsSince1970() * 1000L},
{"isGlobalHoldback", false },
{"userFeatures",
Expand Down Expand Up @@ -126,7 +126,7 @@ public void TestCreateConversionEventNoAttributesNovalue()
{"accountId", "1592310167"},
{"visitorId", TestUserId},
{"clientEngine", "csharp-sdk"},
{"clientVersion", "1.0.0"},
{"clientVersion", "1.1.0"},
{"userFeatures", new string[0]},
{"isGlobalHoldback", false},
{"timestamp", SecondsSince1970() * 1000L} ,
Expand Down Expand Up @@ -172,7 +172,7 @@ public void TestCreateConversionEventWithAttributesNoValue()
{"accountId", "1592310167"},
{"visitorId", TestUserId},
{"clientEngine", "csharp-sdk"},
{"clientVersion", "1.0.0"},
{"clientVersion", "1.1.0"},

{"isGlobalHoldback", false},
{"timestamp", SecondsSince1970() * 1000L} ,
Expand Down Expand Up @@ -239,7 +239,7 @@ public void TestCreateConversionEventNoAttributesWithValue()
{"accountId", "1592310167"},
{"visitorId", TestUserId},
{"clientEngine", "csharp-sdk"},
{"clientVersion", "1.0.0"},
{"clientVersion", "1.1.0"},

{"isGlobalHoldback", false},
{"timestamp", SecondsSince1970() * 1000L} ,
Expand Down Expand Up @@ -311,7 +311,7 @@ public void TestCreateConversionEventWithAttributesWithValue()
{"accountId", "1592310167"},
{"visitorId", TestUserId},
{"clientEngine", "csharp-sdk"},
{"clientVersion", "1.0.0"},
{"clientVersion", "1.1.0"},
{"isGlobalHoldback", false},
{"timestamp", SecondsSince1970() * 1000L} ,
{"eventFeatures",
Expand Down Expand Up @@ -410,7 +410,7 @@ public void TestCreateConversionEventNoAttributesWithInvalidValue()
{"visitorId", "testUserId"},
// {"revision", "15"}, TODO: It should be a part of project config file, have to check it.
{"clientEngine", "csharp-sdk"},
{"clientVersion", "1.0.0"},
{"clientVersion", "1.1.0"},
{"userFeatures" , new object[0]},
{"isGlobalHoldback", false},
{"timestamp", SecondsSince1970() * 1000L },
Expand Down
4 changes: 3 additions & 1 deletion OptimizelySDK.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26403.7
VisualStudioVersion = 15.0.26228.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OptimizelySDK.DemoApp", "OptimizelySDK.DemoApp\OptimizelySDK.DemoApp.csproj", "{9394F666-6397-41C0-8867-C3E4DA9156E3}"
ProjectSection(ProjectDependencies) = postProject
Expand All @@ -14,7 +14,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OptimizelySDK", "Optimizely
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{26C3BFAE-79A1-4299-978C-0F4916427B9D}"
ProjectSection(SolutionItems) = preProject
CHANGELOG.MD = CHANGELOG.MD
CONTRIBUTING.md = CONTRIBUTING.md
OptimizelySDK\OptimizelySDK.nuspec = OptimizelySDK\OptimizelySDK.nuspec
README.md = README.md
EndProjectSection
EndProject
Expand Down
6 changes: 3 additions & 3 deletions OptimizelySDK/Bucketing/DecisionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public Variation GetVariation(Experiment experiment, string userId, UserAttribut
try
{
Dictionary<string, object> userProfileMap = UserProfileService.Lookup(userId);
if (UserProfileUtil.IsValidUserProfileMap(userProfileMap))
if (userProfileMap != null && UserProfileUtil.IsValidUserProfileMap(userProfileMap))
{
userProfile = UserProfileUtil.ConvertMapToUserProfile(userProfileMap);
variation = GetStoredVariation(experiment, userProfile);
Expand Down Expand Up @@ -232,8 +232,8 @@ public void SaveVariation(Experiment experiment, Variation variation, UserProfil
}
catch (Exception exception)
{
Logger.Log(LogLevel.ERROR, string.Format("Failed to save variation \"{0}\" of experiment \"{1}\" for user \"{2}\".",
variation.Id, experiment.Id, userProfile.UserId));
Logger.Log(LogLevel.ERROR, string.Format("Failed to save variation \"{0}\" of experiment \"{1}\" for user \"{2}\": {3}.",
variation.Id, experiment.Id, userProfile.UserId, exception.Message));
ErrorHandler.HandleError(new Exceptions.OptimizelyRuntimeException(exception.Message));
}
}
Expand Down
2 changes: 1 addition & 1 deletion OptimizelySDK/Event/Builder/EventBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class EventBuilder
{
private const string SDK_TYPE = "csharp-sdk";

private const string SDK_VERSION = "1.0.0";
private const string SDK_VERSION = "1.1.0";

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

Expand Down
2 changes: 1 addition & 1 deletion OptimizelySDK/Optimizely.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public Optimizely(string datafile,

Config = ProjectConfig.Create(datafile, Logger, ErrorHandler);
IsValid = true;
DecisionService = new DecisionService(Bucketer, errorHandler, Config, userProfileService, Logger);
DecisionService = new DecisionService(Bucketer, ErrorHandler, Config, userProfileService, Logger);
}
catch (Exception ex)
{
Expand Down
2 changes: 1 addition & 1 deletion OptimizelySDK/OptimizelySDK.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Optimizely.SDK</id>
<version>1.0.0</version>
<version>1.1.0</version>
<title>Optimizely C# SDK</title>
<authors>Optimizely Development Team</authors>
<owners>fullstack.optimizely</owners>
Expand Down