Skip to content

Commit 1777ff4

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions/github-script-8.0.0
2 parents 358ac31 + 35a938a commit 1777ff4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1625
-251
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222
with:
2323
fetch-depth: 0
2424

@@ -41,7 +41,7 @@ jobs:
4141
script: core.setFailed('[ERROR] Tag already exists.')
4242

4343
- name: Setup Go version
44-
uses: actions/setup-go@v5
44+
uses: actions/setup-go@v6
4545
with:
4646
go-version: '^1.20.7'
4747

@@ -55,7 +55,7 @@ jobs:
5555
run: make binaries_release
5656

5757
- name: SonarQube Scan
58-
uses: SonarSource/sonarcloud-github-action@v2.1.1
58+
uses: SonarSource/sonarcloud-github-action@v5.0.0
5959
env:
6060
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
6161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docker.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: docker
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
12+
jobs:
13+
build-docker-image:
14+
name: Build and push Docker image
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
fips_mode: [enabled, disabled]
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v5
22+
23+
- name: Login to DockerHub
24+
uses: docker/login-action@v3
25+
with:
26+
username: ${{ vars.DOCKERHUB_USERNAME }}
27+
password: ${{ secrets.DOCKERHUB_RO_TOKEN }}
28+
29+
- name: Configure AWS credentials
30+
if: ${{ github.event_name == 'push' }}
31+
uses: aws-actions/configure-aws-credentials@v5
32+
with:
33+
role-to-assume: ${{ vars.ECR_TESTING_ROLE_ARN }}
34+
aws-region: us-east-1
35+
36+
- name: Login to Amazon ECR
37+
if: ${{ github.event_name == 'push' }}
38+
uses: aws-actions/amazon-ecr-login@v2
39+
40+
- name: Set VERSION env
41+
run: echo "VERSION=$(cat splitio/version.go | grep 'Version =' | awk '{print $4}' | tr -d '"')" >> $GITHUB_ENV
42+
43+
- name: Docker Build and Push
44+
uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
file: "infra/sidecar.Dockerfile"
48+
push: true
49+
tags: |
50+
${{ vars.ECR_TESTING_URL }}/splitd/sidecar${{ matrix.fips_mode == 'enabled' && '-fips' || ''}}:${{ env.VERSION }}
51+
build-args: |
52+
FIPS_MODE=${{ matrix.fips_mode }}

.github/workflows/unstable.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: unstable
2+
on:
3+
push:
4+
branches-ignore:
5+
- main
6+
7+
permissions:
8+
contents: read
9+
id-token: write
10+
11+
jobs:
12+
push-docker-image:
13+
name: Build and Push Docker Image
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
fips_mode: [enabled, disabled]
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v5
21+
22+
- name: Login to DockerHub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ vars.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_RO_TOKEN }}
27+
28+
- name: Configure AWS credentials
29+
if: ${{ github.event_name == 'push' }}
30+
uses: aws-actions/configure-aws-credentials@v5
31+
with:
32+
role-to-assume: ${{ vars.ECR_TESTING_ROLE_ARN }}
33+
aws-region: us-east-1
34+
35+
- name: Login to ECR
36+
if: ${{ github.event_name == 'push' }}
37+
uses: aws-actions/amazon-ecr-login@v2
38+
39+
- name: Get short hash
40+
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
41+
42+
- name: Docker Build and Push
43+
uses: docker/build-push-action@v6
44+
with:
45+
context: .
46+
file: "infra/sidecar.Dockerfile"
47+
push: true
48+
tags: |
49+
${{ vars.ECR_TESTING_URL }}/splitd/sidecar${{ matrix.fips_mode == 'enabled' && '-fips' || '' }}:${{ env.SHORT_SHA }}
50+
build-args: |
51+
FIPS_MODE=${{ matrix.fips_mode }}

CHANGES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
1.7.0 (March 18, 2026)
2+
- Added a new optional argument to the client `getTreatment` methods to allow passing additional evaluation options, such as a map of properties to append to the generated impressions sent to Split backend. Read more in our docs.
3+
- Added new configuration for Fallback Treatments, which allows setting a treatment value and optional config to be returned in place of "control", either globally or by flag. Read more in our docs.
4+
- Added support for rule-based segments. These segments determine membership at runtime by evaluating their configured rules against the user attributes provided to the SDK.
5+
- Added support for feature flag prerequisites. This allows customers to define dependency conditions between flags, which are evaluated before any allowlists or targeting rules.
6+
17
1.6.0 (Feb 5, 2025)
28
- Added Health & Readiness endpoints.
39
- Fixing vulnerabilities.

external/commons/mocks/evaluator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package mocks
22

33
import (
4-
"github.com/splitio/go-split-commons/v6/engine/evaluator"
4+
"github.com/splitio/go-split-commons/v9/engine/evaluator"
55
"github.com/stretchr/testify/mock"
66
)
77

external/commons/mocks/impmanager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package mocks
22

33
import (
4-
"github.com/splitio/go-split-commons/v6/dtos"
5-
"github.com/splitio/go-split-commons/v6/provisional"
4+
"github.com/splitio/go-split-commons/v9/dtos"
5+
"github.com/splitio/go-split-commons/v9/provisional"
66
"github.com/stretchr/testify/mock"
77
)
88

external/commons/mocks/imprecorder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package mocks
22

33
import (
4-
"github.com/splitio/go-split-commons/v6/dtos"
5-
"github.com/splitio/go-split-commons/v6/service"
4+
"github.com/splitio/go-split-commons/v9/dtos"
5+
"github.com/splitio/go-split-commons/v9/service"
66
"github.com/stretchr/testify/mock"
77
)
88

external/commons/mocks/splitstorage.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package mocks
22

33
import (
4-
"github.com/splitio/go-split-commons/v6/dtos"
5-
"github.com/splitio/go-split-commons/v6/storage"
4+
"github.com/splitio/go-split-commons/v9/dtos"
5+
"github.com/splitio/go-split-commons/v9/storage"
66
"github.com/splitio/go-toolkit/v5/datastructures/set"
77
"github.com/stretchr/testify/mock"
88
)
@@ -72,4 +72,14 @@ func (m *SplitStorageMock) LargeSegmentNames() *set.ThreadUnsafeSet {
7272
return m.Called().Get(0).(*set.ThreadUnsafeSet)
7373
}
7474

75+
func (m *SplitStorageMock) ReplaceAll(toAdd []dtos.SplitDTO, changeNumber int64) error {
76+
args := m.Called(toAdd, changeNumber)
77+
return args.Error(0)
78+
}
79+
80+
func (m *SplitStorageMock) RuleBasedSegmentNames() *set.ThreadUnsafeSet {
81+
args := m.Called()
82+
return args.Get(0).(*set.ThreadUnsafeSet)
83+
}
84+
7585
var _ storage.SplitStorage = (*SplitStorageMock)(nil)

go.mod

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module github.com/splitio/splitd
22

3-
go 1.23.6
3+
go 1.24.0
44

55
require (
66
github.com/gin-gonic/gin v1.10.0
7-
github.com/splitio/go-split-commons/v6 v6.1.0
8-
github.com/splitio/go-toolkit/v5 v5.4.0
9-
github.com/stretchr/testify v1.9.0
7+
github.com/splitio/go-split-commons/v9 v9.1.0
8+
github.com/splitio/go-toolkit/v5 v5.4.1
9+
github.com/stretchr/testify v1.11.1
1010
github.com/vmihailenco/msgpack/v5 v5.3.5
11-
golang.org/x/sync v0.10.0
11+
golang.org/x/sync v0.18.0
1212
gopkg.in/yaml.v3 v3.0.1
1313
)
1414

@@ -39,10 +39,10 @@ require (
3939
github.com/ugorji/go/codec v1.2.12 // indirect
4040
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
4141
golang.org/x/arch v0.8.0 // indirect
42-
golang.org/x/crypto v0.32.0 // indirect
42+
golang.org/x/crypto v0.45.0 // indirect
4343
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
44-
golang.org/x/net v0.34.0 // indirect
45-
golang.org/x/sys v0.29.0 // indirect
46-
golang.org/x/text v0.21.0 // indirect
44+
golang.org/x/net v0.47.0 // indirect
45+
golang.org/x/sys v0.38.0 // indirect
46+
golang.org/x/text v0.31.0 // indirect
4747
google.golang.org/protobuf v1.34.1 // indirect
4848
)

go.sum

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6
5151
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
5252
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
5353
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
54-
github.com/splitio/go-split-commons/v6 v6.1.0 h1:k3mwr12DF6gbEaV8XXU/tSAQlPkIEuzIgTEneYhGg2I=
55-
github.com/splitio/go-split-commons/v6 v6.1.0/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY=
56-
github.com/splitio/go-toolkit/v5 v5.4.0 h1:g5WFpRhQomnXCmvfsNOWV4s5AuUrWIZ+amM68G8NBKM=
57-
github.com/splitio/go-toolkit/v5 v5.4.0/go.mod h1:xYhUvV1gga9/1029Wbp5pjnR6Cy8nvBpjw99wAbsMko=
54+
github.com/splitio/go-split-commons/v9 v9.1.0 h1:sfmPMuEDTtbIOJ+MeWNbfYl2/xKB/25d4/J95OUD+X0=
55+
github.com/splitio/go-split-commons/v9 v9.1.0/go.mod h1:gJuaKo04Swlh4w9C1b2jBAqAdFxEd/Vpd8jnFINOeDY=
56+
github.com/splitio/go-toolkit/v5 v5.4.1 h1:srTyvDBJZMUcJ/KiiQDMyjCuELVgTBh2TGRVn0sOXEE=
57+
github.com/splitio/go-toolkit/v5 v5.4.1/go.mod h1:SifzysrOVDbzMcOE8zjX02+FG5az4FrR3Us/i5SeStw=
5858
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
5959
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
6060
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
@@ -67,8 +67,9 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
6767
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
6868
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
6969
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
70-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
7170
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
71+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
72+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
7273
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
7374
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
7475
github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg=
@@ -82,20 +83,20 @@ github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV
8283
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
8384
golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
8485
golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
85-
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
86-
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
86+
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
87+
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
8788
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=
8889
golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo=
89-
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
90-
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
91-
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
92-
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
90+
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
91+
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
92+
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
93+
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
9394
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
9495
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
95-
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
96-
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
97-
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
98-
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
96+
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
97+
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
98+
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
99+
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
99100
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
100101
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
101102
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=

0 commit comments

Comments
 (0)