Skip to content

Commit

Permalink
use label from commons
Browse files Browse the repository at this point in the history
  • Loading branch information
mredolatti committed May 3, 2024
1 parent 2c40bd1 commit 0ece011
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion splitio/commitversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ This file is created automatically, please do not edit
*/

// CommitVersion is the version of the last commit previous to release
const CommitVersion = "59410e1"
const CommitVersion = "2c40bd1"
7 changes: 2 additions & 5 deletions splitio/proxy/controllers/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/gin-gonic/gin"
"github.com/splitio/go-split-commons/v5/dtos"
"github.com/splitio/go-split-commons/v5/engine/evaluator/impressionlabels"
"github.com/splitio/go-split-commons/v5/engine/grammar"
"github.com/splitio/go-split-commons/v5/engine/grammar/matchers"
"github.com/splitio/go-split-commons/v5/service"
Expand All @@ -21,10 +22,6 @@ import (
"github.com/splitio/split-synchronizer/v5/splitio/proxy/storage"
)

const (
labelUnsupportedMatcher = "targeting rule type unsupported by sdk"
)

// SdkServerController bundles all request handler for sdk-server apis
type SdkServerController struct {
logger logging.LoggerInterface
Expand Down Expand Up @@ -168,7 +165,7 @@ func (c *SdkServerController) patchUnsupportedMatchers(splits []dtos.SplitDTO, v
splits[si].Conditions[ci].ConditionType = grammar.ConditionTypeWhitelist
splits[si].Conditions[ci].MatcherGroup.Matchers[mi].MatcherType = matchers.MatcherTypeAllKeys
splits[si].Conditions[ci].MatcherGroup.Matchers[mi].String = nil
splits[si].Conditions[ci].Label = labelUnsupportedMatcher
splits[si].Conditions[ci].Label = impressionlabels.UnsupportedMatcherType
splits[si].Conditions[ci].Partitions = []dtos.PartitionDTO{{Treatment: "control", Size: 100}}
}
}
Expand Down

0 comments on commit 0ece011

Please sign in to comment.