diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cfcd016..26996d71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 6.5.2 +- Consolidate percentage rule evaluation logs. + ### 6.5.1 - Add net461 to the target frameworks list to force the usage of `System.Text.Json` rather than `Newtonsoft.Json`. diff --git a/DEPLOY.md b/DEPLOY.md index 97f83679..4f9fa9f9 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -1,9 +1,9 @@ # Steps to Deploy 1. Run tests 2. Set version in `appveyor.yml` (e.g: from `build_version: 6.5.0` to `build_version: 6.5.1`) -3. Update release notes in ConfigCatClient.csproj (PackageReleaseNotes) -4. Push to `master` -5. Deploy to NuGet.org +3. Update release notes in CHANGELOG.md +4. Open a PR +5. When the PR is merged to master, start a deploy to NuGet.org Create a new deployment on https://ci.appveyor.com/project/configcat/net-sdk/deployments 6. Make sure new package is available via Nuget.org: https://www.nuget.org/packages/ConfigCat.Client diff --git a/appveyor.yml b/appveyor.yml index e4784243..be22459a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ environment: - build_version: 6.5.1 + build_version: 6.5.2 version: $(build_version)-{build} image: Visual Studio 2022 configuration: Release diff --git a/src/ConfigCatClient/Evaluate/RolloutEvaluator.cs b/src/ConfigCatClient/Evaluate/RolloutEvaluator.cs index 563ea593..51a9aece 100644 --- a/src/ConfigCatClient/Evaluate/RolloutEvaluator.cs +++ b/src/ConfigCatClient/Evaluate/RolloutEvaluator.cs @@ -100,19 +100,13 @@ private EvaluateResult EvaluateLogic(IDictionary settings, stri // evaluate variations - if (TryEvaluateVariations(setting.RolloutPercentageItems, key, user, out result)) + if (TryEvaluateVariations(setting.RolloutPercentageItems, key, user, evaluateLog, out result)) { - evaluateLog.Log("Evaluate % option => user targeted"); evaluateLog.ReturnValue = result.Value.ToString(); evaluateLog.VariationId = result.VariationId; - result.SettingType = setting.SettingType; return result; } - else - { - evaluateLog.Log("Evaluate % option => user not targeted"); - } } else if (setting.RolloutRules.Any() || setting.RolloutPercentageItems.Any()) { @@ -139,7 +133,8 @@ private EvaluateResult EvaluateLogic(IDictionary settings, stri } } - private static bool TryEvaluateVariations(ICollection rolloutPercentageItems, string key, User user, out EvaluateResult result) + private static bool TryEvaluateVariations(ICollection rolloutPercentageItems, string key, User user, + EvaluateLogger evaluateLog, out EvaluateResult result) { result = new EvaluateResult(); @@ -160,7 +155,7 @@ private static bool TryEvaluateVariations(ICollection rol if (hashScale >= bucket) continue; result.Value = variation.Value; result.VariationId = variation.VariationId; - + evaluateLog.Log($"Evaluating % options, '{key}' evaluated to '{variation.Value}'."); return true; } }