Skip to content

Commit bc8f688

Browse files
authored
Merge pull request #165 from splitio/development
Release v2.5.0
2 parents 216ee47 + 6b9ac57 commit bc8f688

30 files changed

Lines changed: 1881 additions & 250 deletions

.github/workflows/cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
password: ${{ secrets.ARTIFACTORY_DOCKER_PASS }}
1818

1919
- name: Checkout code
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Create build version
2323
run: echo "BUILD_VERSION=$(cat package.json | grep version | head -1 | awk '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')" >> $GITHUB_ENV
2424

2525
- name: Docker Build and Push
26-
uses: docker/build-push-action@v3
26+
uses: docker/build-push-action@v5
2727
with:
2828
context: .
2929
push: true

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Install Node.js
1616
uses: actions/setup-node@v3
1717
with:
18-
node-version: 18.16.0
18+
node-version: 18.18.0
1919

2020
- run: npm ci
2121
- run: npm run lint
@@ -26,10 +26,10 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Checkout code
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@v4
3030

3131
- name: Docker Build
32-
uses: docker/build-push-action@v3
32+
uses: docker/build-push-action@v5
3333
with:
3434
context: .
3535
push: false

.github/workflows/unstable.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@ jobs:
1717
password: ${{ secrets.ARTIFACTORY_DOCKER_PASS }}
1818

1919
- name: Checkout code
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Create build version
2323
run: echo "BUILD_VERSION=$(cat package.json | grep version | head -1 | awk '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')" >> $GITHUB_ENV
2424

25+
- name: Get short hash
26+
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
27+
2528
- name: Docker Build
26-
uses: docker/build-push-action@v3
29+
uses: docker/build-push-action@v5
2730
with:
2831
context: .
2932
push: true
30-
tags: splitio-docker-dev.jfrog.io/${{ github.event.repository.name }}:${{ env.BUILD_VERSION}}
33+
tags: splitio-docker-dev.jfrog.io/${{ github.event.repository.name }}:${{ env.SHORT_SHA}}

.github/workflows/update-license-year.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919

@@ -38,7 +38,7 @@ jobs:
3838
git commit -m "Updated License Year" -a
3939
4040
- name: Create Pull Request
41-
uses: peter-evans/create-pull-request@v3
41+
uses: peter-evans/create-pull-request@v5
4242
with:
4343
token: ${{ secrets.GITHUB_TOKEN }}
4444
title: Update License Year

.jest/setEnvVars.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
// Environments for testing
2-
process.env.SPLIT_EVALUATOR_ENVIRONMENTS='[{"API_KEY":"localhost","AUTH_TOKEN":"test"},{"API_KEY":"apikey1","AUTH_TOKEN":"key_blue"},{"API_KEY":"apikey2","AUTH_TOKEN":"key_red"}]'
2+
process.env.SPLIT_EVALUATOR_ENVIRONMENTS = `[
3+
{"API_KEY":"localhost","AUTH_TOKEN":"test"},
4+
{"API_KEY":"apikey1","AUTH_TOKEN":"key_blue"},
5+
{"API_KEY":"apikey2","AUTH_TOKEN":"key_red"},
6+
{"API_KEY":"apikey3","AUTH_TOKEN":"key_green","FLAG_SET_FILTER":"set_green"},
7+
{"API_KEY":"apikey4","AUTH_TOKEN":"key_purple","FLAG_SET_FILTER":"set_purple"},
8+
{"API_KEY":"apikey5","AUTH_TOKEN":"key_pink","FLAG_SET_FILTER":"set_green,set_purple"}
9+
]`;
310

411
// Before all tests, sdk module is mocked to create a wrapper where a different yaml file is assigned to each environment
512
// sdk factory mock to set a different yaml for each apikey and localhost mode
@@ -33,6 +40,13 @@ jest.mock('../sdk', () => ({
3340
...settings.core,
3441
authorizationKey: authorizationKey,
3542
},
43+
urls: {
44+
sdk: 'https://sdk.test.io/api',
45+
events: 'https://events.test.io/api',
46+
auth: 'https://auth.test.io/api',
47+
streaming: 'https://streaming.test.io',
48+
telemetry: 'https://telemetry.test.io/api',
49+
},
3650
startup: {
3751
readyTimeout: 1,
3852
},
@@ -47,7 +61,7 @@ jest.mock('../sdk', () => ({
4761
};
4862

4963
let sdk = jest.requireActual('../sdk');
50-
const { factory, telemetry, impressionsMode } = sdk.getSplitFactory(configForMock);
64+
const { factory, impressionsMode } = sdk.getSplitFactory(configForMock);
5165

5266
const mockedTelemetry = {
5367
splits: {

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.13
1+
v18.18

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2.5.0 (Oct 31, 2023)
2+
- Updated base image to node:18.18.2-alpine3.18
3+
14
2.4.0 (Jul 18, 2023)
25
- Updated @splitsoftware/splitio package to version 10.23.0 that includes:
36
- Updated streaming architecture implementation to apply feature flag updates from the notification received which is now enhanced, improving efficiency and reliability of the whole update system.

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Builder stage
2-
FROM node:18.16.0-alpine3.18 AS builder
2+
FROM node:18.18.2-alpine3.18 AS builder
33

44
WORKDIR /usr/src/split-evaluator
55

@@ -8,7 +8,7 @@ COPY package.json package-lock.json ./
88
RUN npm install --only=production
99

1010
# Runner stage
11-
FROM node:18.16.0-alpine3.18 AS runner
11+
FROM node:18.18.2-alpine3.18 AS runner
1212

1313
WORKDIR /usr/src/split-evaluator
1414

admin/__tests__/stats.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ describe('stats', () => {
7878
const authToken = environment.AUTH_TOKEN;
7979
const apiKey = environment.API_KEY;
8080
const mock = apiKeyMocksMap[apiKey];
81+
if (!mock) return;
8182
expect(stats.environments[utils.obfuscate(authToken)]).toEqual({
8283
splitCount: mock.splitNames.length,
8384
segmentCount: mock.segments.length,

0 commit comments

Comments
 (0)