From 86d6ad3c9c517d9b7ee6b336e6110cd6502c852a Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Thu, 28 Nov 2024 17:55:04 -0300 Subject: [PATCH 1/4] adding large segment healthcheck monitor --- go.mod | 2 +- go.sum | 4 +- splitio/producer/initialization.go | 2 +- .../application/counter/basecounter.go | 9 --- .../healthcheck/application/monitor.go | 71 +++++++++++-------- .../healthcheck/application/monitor_test.go | 8 ++- splitio/proxy/conf/sections.go | 1 + splitio/proxy/initialization.go | 11 +-- 8 files changed, 61 insertions(+), 47 deletions(-) diff --git a/go.mod b/go.mod index d65d881f..c0a72941 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/gin-gonic/gin v1.10.0 github.com/google/uuid v1.3.0 github.com/splitio/gincache v1.0.1 - github.com/splitio/go-split-commons/v6 v6.0.2-0.20241125153044-959311072c68 + github.com/splitio/go-split-commons/v6 v6.0.2-0.20241128203315-8c123543a54e github.com/splitio/go-toolkit/v5 v5.4.0 github.com/stretchr/testify v1.9.0 go.etcd.io/bbolt v1.3.6 diff --git a/go.sum b/go.sum index 42457289..6e2cdcd1 100644 --- a/go.sum +++ b/go.sum @@ -93,8 +93,8 @@ github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUA github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/splitio/gincache v1.0.1 h1:dLYdANY/BqH4KcUMCe/LluLyV5WtuE/LEdQWRE06IXU= github.com/splitio/gincache v1.0.1/go.mod h1:CcgJDSM9Af75kyBH0724v55URVwMBuSj5x1eCWIOECY= -github.com/splitio/go-split-commons/v6 v6.0.2-0.20241125153044-959311072c68 h1:Nr48cVYJZCOQzfKPGPsYcHykzEa4M/ADPkzO+eo3GOI= -github.com/splitio/go-split-commons/v6 v6.0.2-0.20241125153044-959311072c68/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY= +github.com/splitio/go-split-commons/v6 v6.0.2-0.20241128203315-8c123543a54e h1:d/bRCPlzszazKemFu7UOyzJJHc+Ren43u178vd1Do5c= +github.com/splitio/go-split-commons/v6 v6.0.2-0.20241128203315-8c123543a54e/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY= 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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/splitio/producer/initialization.go b/splitio/producer/initialization.go index 445ccdad..77cb05f0 100644 --- a/splitio/producer/initialization.go +++ b/splitio/producer/initialization.go @@ -112,7 +112,7 @@ func Start(logger logging.LoggerInterface, cfg *conf.Main) error { // Healcheck Monitor splitsConfig, segmentsConfig, storageConfig := getAppCounterConfigs(storages.SplitStorage) - appMonitor := hcApplication.NewMonitorImp(splitsConfig, segmentsConfig, &storageConfig, logger) + appMonitor := hcApplication.NewMonitorImp(splitsConfig, segmentsConfig, nil, &storageConfig, logger) servicesMonitor := hcServices.NewMonitorImp(getServicesCountersConfig(advanced), logger) impressionsCounter := strategy.NewImpressionsCounter() diff --git a/splitio/provisional/healthcheck/application/counter/basecounter.go b/splitio/provisional/healthcheck/application/counter/basecounter.go index 4eeb4cea..6a700465 100644 --- a/splitio/provisional/healthcheck/application/counter/basecounter.go +++ b/splitio/provisional/healthcheck/application/counter/basecounter.go @@ -15,15 +15,6 @@ const ( Low ) -const ( - // Splits counter type - Splits = iota - // Segments counter type - Segments - // Storage counter type - Storage -) - // HealthyResult description type HealthyResult struct { Name string diff --git a/splitio/provisional/healthcheck/application/monitor.go b/splitio/provisional/healthcheck/application/monitor.go index 1ceead03..f3de9a5d 100644 --- a/splitio/provisional/healthcheck/application/monitor.go +++ b/splitio/provisional/healthcheck/application/monitor.go @@ -5,6 +5,7 @@ import ( "sync" "time" + hc "github.com/splitio/go-split-commons/v6/healthcheck/application" "github.com/splitio/go-toolkit/v5/logging" toolkitsync "github.com/splitio/go-toolkit/v5/sync" "github.com/splitio/split-synchronizer/v5/splitio/provisional/healthcheck/application/counter" @@ -21,13 +22,12 @@ type MonitorIterface interface { // MonitorImp description type MonitorImp struct { - splitsCounter counter.ThresholdCounterInterface - segmentsCounter counter.ThresholdCounterInterface - storageCounter counter.PeriodicCounterInterface - producerMode toolkitsync.AtomicBool - healthySince *time.Time - lock sync.RWMutex - logger logging.LoggerInterface + counters map[int]counter.ThresholdCounterInterface + storageCounter counter.PeriodicCounterInterface + producerMode toolkitsync.AtomicBool + healthySince *time.Time + lock sync.RWMutex + logger logging.LoggerInterface } // HealthDto struct @@ -56,7 +56,7 @@ func (m *MonitorImp) getHealthySince(healthy bool) *time.Time { func checkIfIsHealthy(result []ItemDto) bool { for _, r := range result { - if r.Healthy == false && r.Severity == counter.Critical { + if !r.Healthy && r.Severity == counter.Critical { return false } } @@ -71,7 +71,10 @@ func (m *MonitorImp) GetHealthStatus() HealthDto { var items []ItemDto var results []counter.HealthyResult - results = append(results, m.splitsCounter.IsHealthy(), m.segmentsCounter.IsHealthy()) + + for _, mc := range m.counters { + results = append(results, mc.IsHealthy()) + } if m.producerMode.IsSet() { results = append(results, m.storageCounter.IsHealthy()) @@ -104,12 +107,12 @@ func (m *MonitorImp) NotifyEvent(counterType int) { m.logger.Debug(fmt.Sprintf("Notify Event. Type: %d.", counterType)) - switch counterType { - case counter.Splits: - m.splitsCounter.NotifyHit() - case counter.Segments: - m.segmentsCounter.NotifyHit() + counter, ok := m.counters[counterType] + if !ok { + m.logger.Debug(fmt.Sprintf("wrong counterType: %d", counterType)) + return } + counter.NotifyHit() } // Reset counter value @@ -119,12 +122,12 @@ func (m *MonitorImp) Reset(counterType int, value int) { m.logger.Debug(fmt.Sprintf("Reset. Type: %d. Value: %d", counterType, value)) - switch counterType { - case counter.Splits: - m.splitsCounter.ResetThreshold(value) - case counter.Segments: - m.segmentsCounter.ResetThreshold(value) + counter, ok := m.counters[counterType] + if !ok { + m.logger.Debug(fmt.Sprintf("wrong counterType: %d", counterType)) + return } + counter.ResetThreshold(value) } // Start counters @@ -132,8 +135,10 @@ func (m *MonitorImp) Start() { m.lock.Lock() defer m.lock.Unlock() - m.splitsCounter.Start() - m.segmentsCounter.Start() + for _, counter := range m.counters { + counter.Start() + } + if m.producerMode.IsSet() { m.storageCounter.Start() } @@ -146,8 +151,9 @@ func (m *MonitorImp) Stop() { m.lock.Lock() defer m.lock.Unlock() - m.splitsCounter.Stop() - m.segmentsCounter.Stop() + for _, counter := range m.counters { + counter.Stop() + } if m.producerMode.IsSet() { m.storageCounter.Stop() @@ -158,16 +164,25 @@ func (m *MonitorImp) Stop() { func NewMonitorImp( splitsConfig counter.ThresholdConfig, segmentsConfig counter.ThresholdConfig, + largeSegmentsConfig *counter.ThresholdConfig, storageConfig *counter.PeriodicConfig, logger logging.LoggerInterface, ) *MonitorImp { now := time.Now() + splitsCounter := counter.NewThresholdCounter(splitsConfig, logger) + segmentsCounter := counter.NewThresholdCounter(segmentsConfig, logger) monitor := &MonitorImp{ - splitsCounter: counter.NewThresholdCounter(splitsConfig, logger), - segmentsCounter: counter.NewThresholdCounter(segmentsConfig, logger), - producerMode: *toolkitsync.NewAtomicBool(storageConfig != nil), - logger: logger, - healthySince: &now, + counters: map[int]counter.ThresholdCounterInterface{}, + producerMode: *toolkitsync.NewAtomicBool(storageConfig != nil), + logger: logger, + healthySince: &now, + } + + monitor.counters[hc.Splits] = splitsCounter + monitor.counters[hc.Segments] = segmentsCounter + + if largeSegmentsConfig != nil { + monitor.counters[hc.LargeSegments] = counter.NewThresholdCounter(*largeSegmentsConfig, logger) } if monitor.producerMode.IsSet() { diff --git a/splitio/provisional/healthcheck/application/monitor_test.go b/splitio/provisional/healthcheck/application/monitor_test.go index edf9859e..ff3ad16f 100644 --- a/splitio/provisional/healthcheck/application/monitor_test.go +++ b/splitio/provisional/healthcheck/application/monitor_test.go @@ -36,6 +36,12 @@ func TestMonitor(t *testing.T) { Severity: counter.Critical, } + lsCfg := counter.ThresholdConfig{ + Name: "LargeSegments", + Period: 10, + Severity: counter.Critical, + } + storageCfg := counter.PeriodicConfig{ Name: "Storage", Period: 10, @@ -46,7 +52,7 @@ func TestMonitor(t *testing.T) { }, } - monitor := NewMonitorImp(splitsCfg, segmentsCfg, &storageCfg, logging.NewLogger(nil)) + monitor := NewMonitorImp(splitsCfg, segmentsCfg, &lsCfg, &storageCfg, logging.NewLogger(nil)) monitor.Start() diff --git a/splitio/proxy/conf/sections.go b/splitio/proxy/conf/sections.go index 4c713253..03db95ad 100644 --- a/splitio/proxy/conf/sections.go +++ b/splitio/proxy/conf/sections.go @@ -34,6 +34,7 @@ func (m *Main) BuildAdvancedConfig() *cconf.AdvancedConfig { tmp.SplitsRefreshRate = int(m.Sync.SplitRefreshRateMs / 1000) tmp.SegmentsRefreshRate = int(m.Sync.SegmentRefreshRateMs / 1000) tmp.LargeSegment.LazyLoad = m.Sync.Advanced.LargeSegmentLazyLoad + tmp.LargeSegment.RefreshRate = int(m.Sync.LargeSegmentRefreshRateMs / 1000) return tmp } diff --git a/splitio/proxy/initialization.go b/splitio/proxy/initialization.go index e97d01da..b61152b5 100644 --- a/splitio/proxy/initialization.go +++ b/splitio/proxy/initialization.go @@ -98,8 +98,8 @@ func Start(logger logging.LoggerInterface, cfg *pconf.Main) error { ) // Healcheck Monitor - splitsConfig, segmentsConfig := getAppCounterConfigs() - appMonitor := hcApplication.NewMonitorImp(splitsConfig, segmentsConfig, nil, logger) + splitsConfig, segmentsConfig, lsConfig := getAppCounterConfigs() + appMonitor := hcApplication.NewMonitorImp(splitsConfig, segmentsConfig, &lsConfig, nil, logger) servicesMonitor := hcServices.NewMonitorImp(getServicesCountersConfig(*advanced), logger) // Creating Workers and Tasks @@ -137,7 +137,7 @@ func Start(logger logging.LoggerInterface, cfg *pconf.Main) error { ImpressionSyncTask: impressionTask, ImpressionsCountSyncTask: impressionCountTask, EventSyncTask: eventsTask, - LargeSegmentSyncTask: tasks.NewFetchLargeSegmentsTask(workers.LargeSegmentUpdater, splitStorage, int(cfg.Sync.LargeSegmentRefreshRateMs/1000), advanced.LargeSegment.Workers, advanced.LargeSegment.QueueSize, logger), + LargeSegmentSyncTask: tasks.NewFetchLargeSegmentsTask(workers.LargeSegmentUpdater, splitStorage, advanced.LargeSegment.RefreshRate, advanced.LargeSegment.Workers, advanced.LargeSegment.QueueSize, logger, appMonitor), } // Creating Synchronizer for tasks @@ -321,11 +321,12 @@ func startBGSyng(m synchronizer.Manager, mstatus chan int, haveSnapshot bool, on } -func getAppCounterConfigs() (hcAppCounter.ThresholdConfig, hcAppCounter.ThresholdConfig) { +func getAppCounterConfigs() (hcAppCounter.ThresholdConfig, hcAppCounter.ThresholdConfig, hcAppCounter.ThresholdConfig) { splitsConfig := hcAppCounter.DefaultThresholdConfig("Splits") segmentsConfig := hcAppCounter.DefaultThresholdConfig("Segments") + LargeSegmentsConfig := hcAppCounter.DefaultThresholdConfig("LargeSegments") - return splitsConfig, segmentsConfig + return splitsConfig, segmentsConfig, LargeSegmentsConfig } func getServicesCountersConfig(advanced conf.AdvancedConfig) []hcServicesCounter.Config { From 1433b8f2fd16f69202e16bfe5ec634607a2aaabd Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Fri, 29 Nov 2024 10:54:21 -0300 Subject: [PATCH 2/4] fixing splitChanges endpoint --- splitio/proxy/conf/sections.go | 1 + splitio/proxy/controllers/sdk.go | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/splitio/proxy/conf/sections.go b/splitio/proxy/conf/sections.go index 03db95ad..61785d15 100644 --- a/splitio/proxy/conf/sections.go +++ b/splitio/proxy/conf/sections.go @@ -35,6 +35,7 @@ func (m *Main) BuildAdvancedConfig() *cconf.AdvancedConfig { tmp.SegmentsRefreshRate = int(m.Sync.SegmentRefreshRateMs / 1000) tmp.LargeSegment.LazyLoad = m.Sync.Advanced.LargeSegmentLazyLoad tmp.LargeSegment.RefreshRate = int(m.Sync.LargeSegmentRefreshRateMs / 1000) + tmp.LargeSegment.Version = m.LargeSegmentVersion return tmp } diff --git a/splitio/proxy/controllers/sdk.go b/splitio/proxy/controllers/sdk.go index 7cc57a78..b889bfc2 100644 --- a/splitio/proxy/controllers/sdk.go +++ b/splitio/proxy/controllers/sdk.go @@ -121,10 +121,14 @@ func (c *SdkServerController) SplitChanges(ctx *gin.Context) { return } - spec, _ := ctx.GetQuery("s") - if spec != specs.FLAG_V1_1 { - spec = specs.FLAG_V1_0 + sParam, _ := ctx.GetQuery("s") + spec, err := specs.ParseAndValidate(sParam) + if err != nil { + c.logger.Error(fmt.Sprintf("error getting split changes: %s.", err)) + ctx.JSON(http.StatusBadRequest, gin.H{"code": 400, "message": err.Error()}) + return } + splits.Splits = c.patchUnsupportedMatchers(splits.Splits, spec) ctx.JSON(http.StatusOK, splits) From 6666e74536ed0a1f29d77cb88ef8e54cfbc2dc84 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Mon, 2 Dec 2024 12:06:32 -0300 Subject: [PATCH 3/4] updated commons --- go.mod | 2 +- go.sum | 2 ++ splitio/proxy/conf/sections.go | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index c0a72941..e06573fc 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/gin-gonic/gin v1.10.0 github.com/google/uuid v1.3.0 github.com/splitio/gincache v1.0.1 - github.com/splitio/go-split-commons/v6 v6.0.2-0.20241128203315-8c123543a54e + github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202144122-6b3a0c7817bc github.com/splitio/go-toolkit/v5 v5.4.0 github.com/stretchr/testify v1.9.0 go.etcd.io/bbolt v1.3.6 diff --git a/go.sum b/go.sum index 6e2cdcd1..6c92d9ce 100644 --- a/go.sum +++ b/go.sum @@ -95,6 +95,8 @@ github.com/splitio/gincache v1.0.1 h1:dLYdANY/BqH4KcUMCe/LluLyV5WtuE/LEdQWRE06IX github.com/splitio/gincache v1.0.1/go.mod h1:CcgJDSM9Af75kyBH0724v55URVwMBuSj5x1eCWIOECY= github.com/splitio/go-split-commons/v6 v6.0.2-0.20241128203315-8c123543a54e h1:d/bRCPlzszazKemFu7UOyzJJHc+Ren43u178vd1Do5c= github.com/splitio/go-split-commons/v6 v6.0.2-0.20241128203315-8c123543a54e/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY= +github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202144122-6b3a0c7817bc h1:pud1qA/GUJxe2VS2E23wg2BjZ/5q7hSKto+wUt5ZNFA= +github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202144122-6b3a0c7817bc/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY= 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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/splitio/proxy/conf/sections.go b/splitio/proxy/conf/sections.go index 61785d15..5ffb8b8d 100644 --- a/splitio/proxy/conf/sections.go +++ b/splitio/proxy/conf/sections.go @@ -2,6 +2,7 @@ package conf import ( cconf "github.com/splitio/go-split-commons/v6/conf" + "github.com/splitio/go-split-commons/v6/service/api/specs" "github.com/splitio/split-synchronizer/v5/splitio/common/conf" ) @@ -21,7 +22,6 @@ type Main struct { Healthcheck Healthcheck `json:"healthcheck" s-nested:"true"` Observability Observability `json:"observability" s-nested:"true"` FlagSpecVersion string `json:"flagSpecVersion" s-cli:"flag-spec-version" s-def:"1.2" s-desc:"Spec version for flags"` - LargeSegmentVersion string `json:"largeSegmentVersion" s-cli:"largesegment-version" s-def:"1.0" s-desc:"Spec version for large segments"` } // BuildAdvancedConfig generates a commons-compatible advancedconfig with default + overriden parameters @@ -35,7 +35,7 @@ func (m *Main) BuildAdvancedConfig() *cconf.AdvancedConfig { tmp.SegmentsRefreshRate = int(m.Sync.SegmentRefreshRateMs / 1000) tmp.LargeSegment.LazyLoad = m.Sync.Advanced.LargeSegmentLazyLoad tmp.LargeSegment.RefreshRate = int(m.Sync.LargeSegmentRefreshRateMs / 1000) - tmp.LargeSegment.Version = m.LargeSegmentVersion + tmp.LargeSegment.Version = specs.LARGESEGMENT_V10 return tmp } @@ -74,7 +74,7 @@ type Persistent struct { type Sync struct { SplitRefreshRateMs int64 `json:"splitRefreshRateMs" s-cli:"split-refresh-rate-ms" s-def:"60000" s-desc:"How often to refresh feature flags"` SegmentRefreshRateMs int64 `json:"segmentRefreshRateMs" s-cli:"segment-refresh-rate-ms" s-def:"60000" s-desc:"How often to refresh segments"` - LargeSegmentRefreshRateMs int64 `json:"largeSegmentRefreshRateMs" s-cli:"largesegment-refresh-rate-ms" s-def:"3600000" s-desc:"How often to refresh large segments"` + LargeSegmentRefreshRateMs int64 `json:"largeSegmentRefreshRateMs" s-cli:"largesegment-refresh-rate-ms" s-def:"600000" s-desc:"How often to refresh large segments"` Advanced AdvancedSync `json:"advanced" s-nested:"true"` } From 014c1ecd4faa586a9484cd4e1acbed00efdc1a77 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Mon, 2 Dec 2024 18:01:41 -0300 Subject: [PATCH 4/4] pr feedback --- go.mod | 2 +- go.sum | 6 ++---- splitio/proxy/controllers/sdk.go | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index e06573fc..0807c2c5 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/gin-gonic/gin v1.10.0 github.com/google/uuid v1.3.0 github.com/splitio/gincache v1.0.1 - github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202144122-6b3a0c7817bc + github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202205419-67ca9241a954 github.com/splitio/go-toolkit/v5 v5.4.0 github.com/stretchr/testify v1.9.0 go.etcd.io/bbolt v1.3.6 diff --git a/go.sum b/go.sum index 6c92d9ce..54144427 100644 --- a/go.sum +++ b/go.sum @@ -93,10 +93,8 @@ github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUA github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/splitio/gincache v1.0.1 h1:dLYdANY/BqH4KcUMCe/LluLyV5WtuE/LEdQWRE06IXU= github.com/splitio/gincache v1.0.1/go.mod h1:CcgJDSM9Af75kyBH0724v55URVwMBuSj5x1eCWIOECY= -github.com/splitio/go-split-commons/v6 v6.0.2-0.20241128203315-8c123543a54e h1:d/bRCPlzszazKemFu7UOyzJJHc+Ren43u178vd1Do5c= -github.com/splitio/go-split-commons/v6 v6.0.2-0.20241128203315-8c123543a54e/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY= -github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202144122-6b3a0c7817bc h1:pud1qA/GUJxe2VS2E23wg2BjZ/5q7hSKto+wUt5ZNFA= -github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202144122-6b3a0c7817bc/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY= +github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202205419-67ca9241a954 h1:vqz8xWtmCoBc6jk1ijcjTMAStrpdQDa7EjOEgBJ97ew= +github.com/splitio/go-split-commons/v6 v6.0.2-0.20241202205419-67ca9241a954/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY= 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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/splitio/proxy/controllers/sdk.go b/splitio/proxy/controllers/sdk.go index b889bfc2..87855863 100644 --- a/splitio/proxy/controllers/sdk.go +++ b/splitio/proxy/controllers/sdk.go @@ -124,7 +124,7 @@ func (c *SdkServerController) SplitChanges(ctx *gin.Context) { sParam, _ := ctx.GetQuery("s") spec, err := specs.ParseAndValidate(sParam) if err != nil { - c.logger.Error(fmt.Sprintf("error getting split changes: %s.", err)) + c.logger.Error(fmt.Sprintf("error parsing spec version: %s.", err)) ctx.JSON(http.StatusBadRequest, gin.H{"code": 400, "message": err.Error()}) return }