Skip to content

Commit

Permalink
[SDKS-8851] Fixed healthcheck monitor for cases with no segments.
Browse files Browse the repository at this point in the history
  • Loading branch information
sanzmauro authored Sep 17, 2024
2 parents 8177209 + 38471d5 commit 319e79e
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
5.8.2 (Sep 17, 2024)
- Fixed healthcheck monitor for cases with no segments.
- Updated go-split-commons version to v6.0.1.

5.8.1 (Jul 12, 2024)
- Fixed vulnerabilities:
- Updated debian image to 12.6
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.0
github.com/splitio/go-split-commons/v6 v6.0.1
github.com/splitio/go-toolkit/v5 v5.4.0
github.com/stretchr/testify v1.9.0
go.etcd.io/bbolt v1.3.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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.0 h1:qenr5qbXafjvM832C64CVpjtlShuQiWCwtR5I2h4ogM=
github.com/splitio/go-split-commons/v6 v6.0.0/go.mod h1:TsvIh3XP7yjc7ly4vpj06AkoBND36SodPs5qfhb8rHc=
github.com/splitio/go-split-commons/v6 v6.0.1 h1:WJcvTk8lwWw6kLQvxt8hOkY/tGlBN4w+2agkINPGugY=
github.com/splitio/go-split-commons/v6 v6.0.1/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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
5 changes: 4 additions & 1 deletion splitio/admin/views/dashboard/js.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,11 @@ const mainScript = `
if (health.healthySince != null) {
const dateHealthy = new Date(Date.parse(health.healthySince)).toLocaleString()
$('#healthy_since').html(dateHealthy);
$('#sync_div_error').addClass('hidden');
} else {
$('#healthy_since').html('<strong>NOT HEALTHY</strong>');
$('#healthy_since').html('Not Healthy');
$('#sync_div_ok').addClass('hidden');
$('#sync_div_error').removeClass('hidden');
}
if (health.dependencies == null) { return }
const payload = {};
Expand Down
40 changes: 26 additions & 14 deletions splitio/admin/views/dashboard/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const cards = `
<div id="sdk_server_div_error" class="col-md-2 hidden">
<div class="red1Box metricBox">
<h4>SDK Server</h4>
<h1 id="sdk_server" class="centerText">ERROR</h1>
<h1 id="sdk_server" class="centerText">Error</h1>
</div>
</div>
<div id="event_server_div_ok" class="col-md-1">
Expand All @@ -142,7 +142,7 @@ const cards = `
<div id="streaming_div_error" class="col-md-1 hidden">
<div class="red1Box metricBox">
<h4>Events</h4>
<h1 id="streamingr" class="centerText">ERROR</h1>
<h1 id="streamingr" class="centerText">Error</h1>
</div>
</div>
<div id="streaming_div_ok" class="col-md-1">
Expand All @@ -154,7 +154,7 @@ const cards = `
<div id="streaming_div_error" class="col-md-1 hidden">
<div class="red1Box metricBox">
<h4>Streaming</h4>
<h1 id="streaming" class="centerText">ERROR</h1>
<h1 id="streaming" class="centerText">Error</h1>
</div>
</div>
<div id="auth_server_div_ok" class="col-md-1">
Expand All @@ -166,7 +166,7 @@ const cards = `
<div id="auth_server_div_error" class="col-md-1 hidden">
<div class="red1Box metricBox">
<h4>Auth</h4>
<h1 id="auth" class="centerText">ERROR</h1>
<h1 id="auth" class="centerText">Error</h1>
</div>
</div>
<div id="telemetry_server_div_ok" class="col-md-1">
Expand All @@ -178,7 +178,7 @@ const cards = `
<div id="telemetry_server_div_error" class="col-md-1 hidden">
<div class="red1Box metricBox">
<h4>Telemetry</h4>
<h1 id="telemetry" class="centerText">ERROR</h1>
<h1 id="telemetry" class="centerText">Error</h1>
</div>
</div>
<div id="storage_div_ok" class="col-md-1">
Expand All @@ -190,15 +190,21 @@ const cards = `
<div id="storage_div_error" class="col-md-1 hidden">
<div class="red1Box metricBox">
<h4>Storage</h4>
<h1 id="storage" class="centerText">ERROR</h1>
<h1 id="storage" class="centerText">Error</h1>
</div>
</div>
<div class="col-md-1">
<div id="sync_div_ok" class="col-md-1">
<div class="green1Box metricBox">
<h4>Sync</h4>
<h1 id="sync" class="centerText">OK</h1>
</div>
</div>
<div id="sync_div_error" class="col-md-1 hidden">
<div class="red1Box metricBox">
<h4>Sync</h4>
<h1 id="sync" class="centerText">Error</h1>
</div>
</div>
</div>
{{else}}
<div class="row">
Expand Down Expand Up @@ -252,23 +258,29 @@ const cards = `
</div>
<div id="streaming_div_error" class="col-md-2 hidden">
<div class="red1Box metricBox">
<h4>Events</h4>
<h1 id="streamingr" class="centerText">ERROR</h1>
<h4>Streaming</h4>
<h1 id="streaming" class="centerText">ERROR</h1>
</div>
</div>
<div id="streaming_div_ok" class="col-md-2">
<div class="green1Box metricBox">
<h4>Streaming</h4>
<h1 id="streaming" class="centerText">OK</h1>
</div>
</div>
<div class="col-md-2">
<div class="green1Box metricBox">
</div>
<div id="sync_div_ok" class="col-md-2">
<div class="green1Box metricBox">
<h4>Sync</h4>
<h1 id="sync" class="centerText">OK</h1>
</div>
</div>
<div id="sync_div_error" class="col-md-2 hidden">
<div class="red1Box metricBox">
<h4>Sync</h4>
<h1 id="sync" class="centerText">OK</h1>
<h1 id="sync" class="centerText">Error</h1>
</div>
</div>
</div>
</div>
{{end}}
<div class="row">
Expand Down
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 = "ae5a5ac"
const CommitVersion = "8d090ac"
2 changes: 1 addition & 1 deletion splitio/producer/initialization.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func Start(logger logging.LoggerInterface, cfg *conf.Main) error {
splitTasks := synchronizer.SplitTasks{
SplitSyncTask: tasks.NewFetchSplitsTask(workers.SplitUpdater, int(cfg.Sync.SplitRefreshRateMs)/1000, logger),
SegmentSyncTask: tasks.NewFetchSegmentsTask(workers.SegmentUpdater, int(cfg.Sync.SegmentRefreshRateMs)/1000,
advanced.SegmentWorkers, advanced.SegmentQueueSize, logger),
advanced.SegmentWorkers, advanced.SegmentQueueSize, logger, appMonitor),
ImpressionsCountSyncTask: tasks.NewRecordImpressionsCountTask(workers.ImpressionsCountRecorder,
logger, impressionsCountPeriodTaskInMemory),
// local telemetry
Expand Down
2 changes: 1 addition & 1 deletion splitio/proxy/initialization.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func Start(logger logging.LoggerInterface, cfg *pconf.Main) error {
stasks := synchronizer.SplitTasks{
SplitSyncTask: tasks.NewFetchSplitsTask(workers.SplitUpdater, int(cfg.Sync.SplitRefreshRateMs/1000), logger),
SegmentSyncTask: tasks.NewFetchSegmentsTask(workers.SegmentUpdater, int(cfg.Sync.SegmentRefreshRateMs/1000), advanced.SegmentWorkers,
advanced.SegmentQueueSize, logger),
advanced.SegmentQueueSize, logger, appMonitor),
TelemetrySyncTask: tasks.NewRecordTelemetryTask(workers.TelemetryRecorder, int(cfg.Sync.Advanced.InternalMetricsRateMs), logger),
ImpressionSyncTask: impressionTask,
ImpressionsCountSyncTask: impressionCountTask,
Expand Down
2 changes: 1 addition & 1 deletion splitio/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
package splitio

// Version is the version of this Agent
const Version = "5.8.1"
const Version = "5.8.2"

0 comments on commit 319e79e

Please sign in to comment.