Skip to content

Commit

Permalink
Merge pull request #217 from splitio/feature/semver
Browse files Browse the repository at this point in the history
Feature/semver
  • Loading branch information
mmelograno authored May 14, 2024
2 parents cf0d6cf + 19382c7 commit 1178dcf
Show file tree
Hide file tree
Showing 20 changed files with 710 additions and 109 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
reviewers:
- "splitio/sdk"
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
- 6379:6379
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go version
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.18.0'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-license-year.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -24,7 +24,7 @@ jobs:
run: "echo PREVIOUS=$(($CURRENT-1)) >> $GITHUB_ENV"

- name: Update LICENSE
uses: jacobtomlinson/gha-find-replace@v2
uses: jacobtomlinson/gha-find-replace@v3
with:
find: ${{ env.PREVIOUS }}
replace: ${{ env.CURRENT }}
Expand All @@ -38,7 +38,7 @@ jobs:
git commit -m "Updated License Year" -a
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: Update License Year
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
6.6.0 (May 14, 2024)
- Updated go-split-commons to v6
- Added support for targeting rules based on semantic versions (https://semver.org/).
- Added the logic to handle correctly when the SDK receives an unsupported Matcher type.

6.5.2 (Dec 21, 2023)
- Updated telemetry name methods for flagSets.

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/splitio/go-client/v6
go 1.18

require (
github.com/splitio/go-split-commons/v5 v5.1.1
github.com/splitio/go-toolkit/v5 v5.3.2
github.com/splitio/go-split-commons/v6 v6.0.0
github.com/splitio/go-toolkit/v5 v5.4.0
)

require (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/redis/go-redis/v9 v9.0.4 h1:FC82T+CHJ/Q/PdyLW++GeCO+Ol59Y4T7R4jbgjvktgc=
github.com/redis/go-redis/v9 v9.0.4/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk=
github.com/splitio/go-split-commons/v5 v5.1.1 h1:lLOqNQMdZA5Z7FBBh4YODWdE2QFgxSPMptX9ty14x4c=
github.com/splitio/go-split-commons/v5 v5.1.1/go.mod h1:9vAZrlhKvhensyRC11hyVFdgLIBrkX9D5vdYc9qB13w=
github.com/splitio/go-toolkit/v5 v5.3.2 h1:Yy9YBcHRmK5WVZjeA/klLGEdF38xpsL1ejnC3ro8a2M=
github.com/splitio/go-toolkit/v5 v5.3.2/go.mod h1:xYhUvV1gga9/1029Wbp5pjnR6Cy8nvBpjw99wAbsMko=
github.com/splitio/go-split-commons/v6 v6.0.0 h1:qenr5qbXafjvM832C64CVpjtlShuQiWCwtR5I2h4ogM=
github.com/splitio/go-split-commons/v6 v6.0.0/go.mod h1:TsvIh3XP7yjc7ly4vpj06AkoBND36SodPs5qfhb8rHc=
github.com/splitio/go-toolkit/v5 v5.4.0 h1:g5WFpRhQomnXCmvfsNOWV4s5AuUrWIZ+amM68G8NBKM=
github.com/splitio/go-toolkit/v5 v5.4.0/go.mod h1:xYhUvV1gga9/1029Wbp5pjnR6Cy8nvBpjw99wAbsMko=
github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg=
github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ=
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
Expand Down
20 changes: 8 additions & 12 deletions splitio/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"github.com/splitio/go-client/v6/splitio/conf"
impressionlistener "github.com/splitio/go-client/v6/splitio/impressionListener"

"github.com/splitio/go-split-commons/v5/dtos"
"github.com/splitio/go-split-commons/v5/engine/evaluator"
"github.com/splitio/go-split-commons/v5/engine/evaluator/impressionlabels"
"github.com/splitio/go-split-commons/v5/flagsets"
"github.com/splitio/go-split-commons/v5/provisional"
"github.com/splitio/go-split-commons/v5/storage"
"github.com/splitio/go-split-commons/v5/telemetry"
"github.com/splitio/go-split-commons/v6/dtos"
"github.com/splitio/go-split-commons/v6/engine/evaluator"
"github.com/splitio/go-split-commons/v6/engine/evaluator/impressionlabels"
"github.com/splitio/go-split-commons/v6/flagsets"
"github.com/splitio/go-split-commons/v6/provisional"
"github.com/splitio/go-split-commons/v6/storage"
"github.com/splitio/go-split-commons/v6/telemetry"
"github.com/splitio/go-toolkit/v5/logging"
)

Expand Down Expand Up @@ -241,8 +241,6 @@ func (c *SplitClient) processResult(result evaluator.Results, operation string,

// doTreatmentsCall retrieves treatments of an specific array of feature flag names with configurations object if it is present for a certain key and set of attributes
func (c *SplitClient) doTreatmentsCall(key interface{}, featureFlagNames []string, attributes map[string]interface{}, operation string, metricsLabel string) (t map[string]TreatmentResult) {
treatments := make(map[string]TreatmentResult)

// Set up a guard deferred function to recover if the SDK starts panicking
defer func() {
if r := recover(); r != nil {
Expand Down Expand Up @@ -275,9 +273,7 @@ func (c *SplitClient) doTreatmentsCall(key interface{}, featureFlagNames []strin

evaluationsResult := c.getEvaluationsResult(matchingKey, bucketingKey, filteredFeatures, attributes, operation)

treatments = c.processResult(evaluationsResult, operation, bucketingKey, matchingKey, attributes, metricsLabel)

return treatments
return c.processResult(evaluationsResult, operation, bucketingKey, matchingKey, attributes, metricsLabel)
}

// doTreatmentsCallByFlagSets retrieves treatments of a specific array of feature flag names, that belong to flag sets, with configurations object if it is present for a certain key and set of attributes
Expand Down
Loading

0 comments on commit 1178dcf

Please sign in to comment.