Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semver #271

Merged
merged 44 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2fbf91c
Merge branch 'master' of github.com:splitio/split-synchronizer
mmelograno Nov 7, 2023
808f6b6
Merge branch 'master' of github.com:splitio/split-synchronizer
mmelograno Dec 21, 2023
6266956
Merge branch 'master' of github.com:splitio/split-synchronizer
mmelograno Jan 24, 2024
1fae74e
Merge branch 'master' of github.com:splitio/split-synchronizer
mmelograno Jan 30, 2024
2b96b2b
Merge branch 'master' of github.com:splitio/split-synchronizer
mmelograno Mar 13, 2024
e265d33
Bump google.golang.org/protobuf from 1.30.0 to 1.33.0
dependabot[bot] Mar 13, 2024
424f382
forward single server name when connecting to multiple redis hosts in…
mredolatti Apr 3, 2024
c86bfda
Bump golang.org/x/net from 0.17.0 to 0.23.0
dependabot[bot] Apr 19, 2024
765bffc
Merge branch 'master' of github.com:splitio/split-synchronizer
mmelograno May 2, 2024
797a135
updated with specVersion from commons
mmelograno May 2, 2024
8bcdd73
ensure caching works for `s` parameter
mredolatti May 2, 2024
8053764
Merge branch 'master' into feat/proxy_semver_support
mredolatti May 2, 2024
59410e1
Merge branch 'semver' into feat/proxy_semver_support
mredolatti May 2, 2024
b87f632
merged with latest in commons
mmelograno May 2, 2024
d59ba44
proxy: handle `s` in splitChanges endpoint
mredolatti May 2, 2024
8a8bf6b
update go.sum
mredolatti May 2, 2024
2c40bd1
Merge remote-tracking branch 'origin/semver' into feat/proxy_semver_s…
mredolatti May 2, 2024
2943ba4
fixed dep
mmelograno May 2, 2024
218ab96
dep x/net
mmelograno May 2, 2024
8cba4a9
Merge pull request #272 from splitio/feat/proxy_semver_support
mmelograno May 2, 2024
d2d839f
adding configs for sepc version
ldecheverz-split May 2, 2024
5909b59
Merge branch 'semver' of github.com:splitio/split-synchronizer into s…
ldecheverz-split May 2, 2024
eb1a57b
adding mapping and description for configs
ldecheverz-split May 2, 2024
2a2be82
fixing tests
ldecheverz-split May 3, 2024
00c9951
Merge pull request #273 from splitio/spec-version
mmelograno May 3, 2024
ba224ea
Merge branch 'semver' of github.com:splitio/split-synchronizer into s…
mmelograno May 3, 2024
098ae9f
clean proxy logic to point commons
mmelograno May 3, 2024
41a0eba
Merge pull request #274 from splitio/task/vulns
mmelograno May 3, 2024
a1d87c7
Adding spec version to dashboard.
ldecheverz-split May 4, 2024
48e4d29
Merge branch 'semver' into fix/oldredis_cluster_workaround
mredolatti May 6, 2024
d71b153
Merge pull request #268 from splitio/fix/oldredis_cluster_workaround
mredolatti May 6, 2024
ea875c9
Changing specVersion strings
ldecheverz-split May 6, 2024
33b90b8
changing var names
ldecheverz-split May 6, 2024
3e7927d
fixing tests
ldecheverz-split May 6, 2024
c58d3ea
Merge pull request #276 from splitio/spec-version-dashboard
ldecheverz-split May 6, 2024
df1e3ce
Merge branch 'semver' of github.com:splitio/split-synchronizer into s…
mmelograno May 10, 2024
e207bd4
merged with latest semver in commons
mmelograno May 10, 2024
5d9a35b
Merge pull request #277 from splitio/task/semverLast
mmelograno May 10, 2024
e546780
Merge branch 'semver' of github.com:splitio/split-synchronizer into s…
mmelograno May 10, 2024
b2f0fc3
pointed to new version of commons
mmelograno May 14, 2024
7a9962a
Merge pull request #278 from splitio/commons_v6
mmelograno May 14, 2024
ae5a5ac
Merge branch 'semver' of github.com:splitio/split-synchronizer into s…
mmelograno May 14, 2024
27eda59
prepare 5.8.0
mmelograno May 14, 2024
f26231a
updated changelog
mmelograno May 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
5.7.0 (TD)
5.8.0 (May XX, 2024)
- Added support for targeting rules based on semantic versions (https://semver.org/).
- Added special impression label "targeting rule type unsupported by sdk" when the matcher type is not supported by the SDK, which returns 'control' treatment.
- Forward TLS server name when in redis-sentinel & redis-cluster

5.7.0 (TBD)
- Add support for FIPS-compliant binaries & docker images

5.6.1 (Jan 29, 2024)
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.proxy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM golang:1.21.6-bookworm AS builder
FROM golang:1.21.10-bookworm AS builder

ARG EXTRA_BUILD_ARGS
ARG FIPS_MODE
Expand All @@ -17,7 +17,7 @@ RUN bash -c 'if [[ "${FIPS_MODE}" = "enabled" ]]; \
fi'

# Runner stage
FROM debian:12.4 AS runner
FROM debian:12.5 AS runner

RUN apt update -y
RUN apt install -y bash ca-certificates
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.synchronizer
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM golang:1.21.6-bookworm AS builder
FROM golang:1.21.10-bookworm AS builder

ARG EXTRA_BUILD_ARGS
ARG FIPS_MODE
Expand All @@ -17,7 +17,7 @@ RUN bash -c 'if [[ "${FIPS_MODE}" = "enabled" ]]; \
fi'

# Runner stage
FROM debian:12.4 AS runner
FROM debian:12.5 AS runner

RUN apt update -y
RUN apt install -y bash ca-certificates
Expand Down
40 changes: 21 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,50 @@ go 1.21
require (
github.com/gin-contrib/cors v1.4.0
github.com/gin-contrib/gzip v0.0.6
github.com/gin-gonic/gin v1.9.1
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/v5 v5.2.1
github.com/splitio/go-split-commons/v5 v5.2.2-0.20240510165524-e183b598fb5b
github.com/splitio/go-toolkit/v5 v5.4.0
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.9.0
go.etcd.io/bbolt v1.3.6
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
)

require (
github.com/bits-and-blooms/bitset v1.3.1 // indirect
github.com/bits-and-blooms/bloom/v3 v3.3.1 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/bytedance/sonic v1.11.6 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/go-playground/validator/v10 v10.20.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/redis/go-redis/v9 v9.0.4 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.17.0 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
90 changes: 45 additions & 45 deletions go.sum

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions splitio/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type Options struct {
Snapshotter cstorage.Snapshotter
TLS *tls.Config
FullConfig interface{}
FlagSpecVersion string
}

type AdminServer struct {
Expand Down Expand Up @@ -66,6 +67,7 @@ func NewServer(options *Options) (*AdminServer, error) {
options.EventsEvCalc,
options.Runtime,
options.HcAppMonitor,
options.FlagSpecVersion,
)
if err != nil {
return nil, fmt.Errorf("error instantiating dashboard controller: %w", err)
Expand Down
16 changes: 10 additions & 6 deletions splitio/admin/controllers/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type DashboardController struct {
eventsEvCalc evcalc.Monitor
runtime common.Runtime
appMonitor application.MonitorIterface
FlagSpecVersion string
}

// NewDashboardController instantiates a new dashboard controller
Expand All @@ -41,6 +42,7 @@ func NewDashboardController(
eventsEvCalc evcalc.Monitor,
runtime common.Runtime,
appMonitor application.MonitorIterface,
flagSpecVersion string,
) (*DashboardController, error) {

toReturn := &DashboardController{
Expand All @@ -52,6 +54,7 @@ func NewDashboardController(
eventsEvCalc: eventsEvCalc,
impressionsEvCalc: impressionEvCalc,
appMonitor: appMonitor,
FlagSpecVersion: flagSpecVersion,
}

var err error
Expand Down Expand Up @@ -104,12 +107,13 @@ func (c *DashboardController) segmentKeys(ctx *gin.Context) {
func (c *DashboardController) renderDashboard() ([]byte, error) {
var layoutBuffer bytes.Buffer
err := c.layout.Execute(&layoutBuffer, dashboard.RootObject{
DashboardTitle: c.title,
Version: splitio.Version,
ProxyMode: c.proxy,
RefreshTime: 30000,
Stats: *c.gatherStats(),
Health: c.appMonitor.GetHealthStatus(),
DashboardTitle: c.title,
Version: splitio.Version,
ProxyMode: c.proxy,
RefreshTime: 30000,
Stats: *c.gatherStats(),
Health: c.appMonitor.GetHealthStatus(),
FlagSpecVersion: c.FlagSpecVersion,
})

if err != nil {
Expand Down
17 changes: 9 additions & 8 deletions splitio/admin/views/dashboard/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const main = `
{{template "SplitLogo" .}}
</div>
<div class="pull-right" style="text-align: center; padding-right: 10px;">
<p style="padding-top: 8px; color: white; margin: 0px; font-weight: bold; text-align: right"><span>{{.Version}}</span></p>
<p style="padding-top: 8px; color: white; margin: 0px; font-weight: bold; text-align: right"><span>{{.Version}}</span> | Flag Spec: <span>{{.FlagSpecVersion}}</span></p>
<p class="navbar-text navbar-right" style="padding-top: 0px;margin-bottom: 15px;margin-top: 0px;color:white;min-width: 175px;height: 10px;">
<a href="#" onclick="javascript:sendSignal('graceful'); return false;" class="navbar-link">
<span class="label label-success">Graceful stop</span>
Expand Down Expand Up @@ -76,13 +76,14 @@ const main = `

// RootObject is the main/root object used to render the dashboard
type RootObject struct {
DashboardTitle string
Version string
ProxyMode bool
RefreshTime int64
Stats GlobalStats `json:"stats"`
Health application.HealthDto `json:"health"`
ServicesHealth services.HealthDto `json:"servicesHealth"`
DashboardTitle string
Version string
ProxyMode bool
RefreshTime int64
Stats GlobalStats `json:"stats"`
Health application.HealthDto `json:"health"`
ServicesHealth services.HealthDto `json:"servicesHealth"`
FlagSpecVersion string
}

// GlobalStats runtime stats used to render the dashboard
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 = "1ffbd68"
const CommitVersion = "df1e3ce"
1 change: 1 addition & 0 deletions splitio/producer/conf/sections.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Main struct {
Integrations conf.Integrations `json:"integrations" s-nested:"true"`
Logging conf.Logging `json:"logging" s-nested:"true"`
Healthcheck Healthcheck `json:"healthcheck" s-nested:"true"`
FlagSpecVersion string `json:"flagSpecVersion" s-cli:"flag-spec-version" s-def:"1.1" s-desc:"Spec version for flags"`
}

// BuildAdvancedConfig generates a commons-compatible advancedconfig with default + overriden parameters
Expand Down
3 changes: 3 additions & 0 deletions splitio/producer/initialization.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ const (
func Start(logger logging.LoggerInterface, cfg *conf.Main) error {
// Getting initial config data
advanced := cfg.BuildAdvancedConfig()
advanced.AuthSpecVersion = cfg.FlagSpecVersion
advanced.FlagsSpecVersion = cfg.FlagSpecVersion
advanced.FlagSetsFilter = cfg.FlagSetsFilter
metadata := util.GetMetadata(false, cfg.IPAddressEnabled)

Expand Down Expand Up @@ -298,6 +300,7 @@ func Start(logger logging.LoggerInterface, cfg *conf.Main) error {
HcServicesMonitor: servicesMonitor,
FullConfig: cfgForAdmin,
TLS: adminTLSConfig,
FlagSpecVersion: cfg.FlagSpecVersion,
})
if err != nil {
panic(err.Error())
Expand Down
Loading