Skip to content

Commit 1cd9b24

Browse files
authored
Merge pull request #190 from splitio/task/arm
Task/arm
2 parents e892b41 + 961f7d5 commit 1cd9b24

32 files changed

Lines changed: 1368 additions & 3752 deletions

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: echo "BUILD_VERSION=$(cat package.json | grep version | head -1 | awk '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')" >> $GITHUB_ENV
4141

4242
- name: Docker build
43-
uses: docker/build-push-action@v5
43+
uses: docker/build-push-action@v6
4444
with:
4545
context: .
4646
push: ${{ github.event_name == 'push' }}
@@ -59,7 +59,7 @@ jobs:
5959
run: echo "BUILD_VERSION=$(cat package.json | grep version | head -1 | awk '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')" >> $GITHUB_ENV
6060

6161
- name: Docker build
62-
uses: docker/build-push-action@v5
62+
uses: docker/build-push-action@v6
6363
with:
6464
context: .
6565
push: false

.github/workflows/unstable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
3333

3434
- name: Docker Build
35-
uses: docker/build-push-action@v5
35+
uses: docker/build-push-action@v6
3636
with:
3737
context: .
3838
push: true

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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@v6
41+
uses: peter-evans/create-pull-request@v7
4242
with:
4343
token: ${{ secrets.GITHUB_TOKEN }}
4444
title: Update License Year

.jest/app.setup.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const { gracefulShutDown } = require('../utils/testWrapper/index');
22

3-
afterAll( async (done) => {
3+
afterAll(async () => {
44
await gracefulShutDown();
5-
done()
6-
})
5+
})

CHANGES.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
2.7.0 (Dec 20, 2024)
2+
- Added support to arm64 images.
3+
- Updated base image to node:20.13.1-alpine3.20
4+
- Updated @splitsoftware/splitio package to version 11.0.3 that includes vulnerability fixes and other improvements.
5+
16
2.6.0 (May 16, 2024)
27
- Updated @splitsoftware/splitio package to version 10.26.0 that includes:
38
- Added support for targeting rules based on semantic versions (https://semver.org/).
49
- Added special impression label "targeting rule type unsupported by sdk" when the matcher type is not supported by the SDK, which returns 'control' treatment.
510
- Updated Split API client to include the flags spec version query parameter for the `splitChanges` and `auth` endpoints.
6-
- Updated base image to node:20.13.1-alpine3.19
11+
- Updated base image to node:20.13.1-alpine3.19
712

813
2.5.1 (Mar 14, 2024)
914
- Updated @splitsoftware/splitio package to version 10.25.1 that includes:

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:20.13.1-alpine3.19 AS builder
2+
FROM node:20.13.1-alpine3.20 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:20.13.1-alpine3.19 AS runner
11+
FROM node:20.13.1-alpine3.20 AS runner
1212

1313
WORKDIR /usr/src/split-evaluator
1414

Makefile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Setup defaults
2+
MAKE ?= make
3+
DOCKER ?= docker
4+
PLATFORM ?= linux/arm64/v8,linux/amd64
5+
BUILDER ?= container
6+
7+
version := $(shell cat package.json | grep '"version": "' | sed 's/ "version": "//' | tr -d '",')
8+
9+
# Help target borrowed from: https://docs.cloudposse.com/reference/best-practices/make-best-practices/
10+
## This help screen
11+
help:
12+
@printf "Available targets:\n\n"
13+
@awk '/^[a-zA-Z\-\_0-9%:\\]+/ { \
14+
helpMessage = match(lastLine, /^## (.*)/); \
15+
if (helpMessage) { \
16+
helpCommand = $$1; \
17+
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
18+
gsub("\\\\", "", helpCommand); \
19+
gsub(":+$$", "", helpCommand); \
20+
printf " \x1b[32;01m%-35s\x1b[0m %s\n", helpCommand, helpMessage; \
21+
} \
22+
} \
23+
{ lastLine = $$0 }' $(MAKEFILE_LIST) | sort -u
24+
@printf "\n"
25+
26+
## Build release-ready docker images with proper tags and output push commands in stdout
27+
images_release_multi_load: # entrypoints
28+
@echo "make sure you have buildx configured 'docker buildx ls', if not 'docker buildx create --name container --driver=docker-container'"
29+
$(DOCKER) buildx build \
30+
-t splitsoftware/split-evaluator:latest -t splitsoftware/split-evaluator:$(version) \
31+
--platform $(PLATFORM) \
32+
--builder $(BUILDER) \
33+
--load .
34+
@echo "Images created. Make sure everything works ok, and then run the following commands to push them."
35+
@echo "$(DOCKER) push splitsoftware/split-evaluator:$(version)"
36+
@echo "$(DOCKER) push splitsoftware/split-evaluator:latest"
37+
38+
platform_str = $(if $(PLATFORM),--platform $(PLATFORM),)
39+
builder_str = $(if $(BUILDER),--builder $(BUILDER),)

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,24 @@ Split has built and maintains SDKs for:
5555

5656
* .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK)
5757
* Android [Github](https://github.com/splitio/android-client) [Docs](https://help.split.io/hc/en-us/articles/360020343291-Android-SDK)
58+
* Angular [Github](https://github.com/splitio/angular-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/6495326064397-Angular-utilities)
59+
* Flutter [Github](https://github.com/splitio/flutter-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/8096158017165-Flutter-plugin)
5860
* GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
5961
* iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
6062
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
61-
* Javascript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
62-
* Javascript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
63-
* Node [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
63+
* JavaScript [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK)
64+
* JavaScript for Browser [Github](https://github.com/splitio/javascript-browser-client) [Docs](https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK)
65+
* Node.js [Github](https://github.com/splitio/javascript-client) [Docs](https://help.split.io/hc/en-us/articles/360020564931-Node-js-SDK)
6466
* PHP [Github](https://github.com/splitio/php-client) [Docs](https://help.split.io/hc/en-us/articles/360020350372-PHP-SDK)
67+
* PHP thin-client [Github](https://github.com/splitio/php-thin-client) [Docs](https://help.split.io/hc/en-us/articles/18305128673933-PHP-Thin-Client-SDK)
6568
* Python [Github](https://github.com/splitio/python-client) [Docs](https://help.split.io/hc/en-us/articles/360020359652-Python-SDK)
6669
* React [Github](https://github.com/splitio/react-client) [Docs](https://help.split.io/hc/en-us/articles/360038825091-React-SDK)
6770
* React Native [Github](https://github.com/splitio/react-native-client) [Docs](https://help.split.io/hc/en-us/articles/4406066357901-React-Native-SDK)
6871
* Redux [Github](https://github.com/splitio/redux-client) [Docs](https://help.split.io/hc/en-us/articles/360038851551-Redux-SDK)
6972
* Ruby [Github](https://github.com/splitio/ruby-client) [Docs](https://help.split.io/hc/en-us/articles/360020673251-Ruby-SDK)
70-
* Angular [Github](https://github.com/splitio/angular-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/6495326064397-Angular-utilities)
71-
* Flutter [Github](https://github.com/splitio/flutter-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/8096158017165-Flutter-plugin)
7273

73-
For a comprehensive list of opensource projects visit our [Github page](https://github.com/splitio?utf8=%E2%9C%93&query=%20only%3Apublic%20).
74+
For a comprehensive list of open source projects visit our [Github page](https://github.com/splitio?utf8=%E2%9C%93&query=%20only%3Apublic%20).
7475

7576
**Learn more about Split:**
7677

77-
Visit [split.io/product](https://www.split.io/product) for an overview of Split, or visit our documentation at [docs.split.io](https://help.split.io/hc/en-us) for more detailed information.
78+
Visit [split.io/product](https://www.split.io/product) for an overview of Split, or visit our documentation at [help.split.io](https://help.split.io) for more detailed information.

admin/__tests__/healthcheck.test.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,23 @@ const { expectError } = require('../../utils/testWrapper/index');
44

55
describe('healthcheck', () => {
66
// Testing authorization
7-
test('should be 401 if auth is not passed', async (done) => {
7+
test('should be 401 if auth is not passed', async () => {
88
const response = await request(app)
99
.get('/admin/healthcheck');
1010
expectError(response, 401, 'Unauthorized');
11-
done();
1211
});
1312

14-
test('should be 401 if auth does not match', async (done) => {
13+
test('should be 401 if auth does not match', async () => {
1514
const response = await request(app)
1615
.get('/admin/healthcheck')
1716
.set('Authorization', 'invalid');
1817
expectError(response, 401, 'Unauthorized');
19-
done();
2018
});
2119

22-
test('should be 200', async (done) => {
20+
test('should be 200', async () => {
2321
const response = await request(app)
2422
.get('/admin/healthcheck')
2523
.set('Authorization', 'test');
2624
expect(response.statusCode).toEqual(200);
27-
done();
2825
});
2926
});

admin/__tests__/machine.test.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
const os = require('os');
2-
const ip = require('@splitsoftware/splitio/lib/utils/ip');
2+
const ip = require('@splitsoftware/splitio/cjs/utils/ip');
33
const request = require('supertest');
44
const app = require('../../app');
55
const { expectError } = require('../../utils/testWrapper/index');
66

77
describe('machine', () => {
88
// Testing authorization
9-
test('should be 401 if auth is not passed', async (done) => {
9+
test('should be 401 if auth is not passed', async () => {
1010
const response = await request(app)
1111
.get('/admin/machine');
1212
expectError(response, 401, 'Unauthorized');
13-
done();
1413
});
1514

16-
test('should be 401 if auth does not match', async (done) => {
15+
test('should be 401 if auth does not match', async () => {
1716
const response = await request(app)
1817
.get('/admin/machine')
1918
.set('Authorization', 'invalid');
2019
expectError(response, 401, 'Unauthorized');
21-
done();
2220
});
2321

24-
test('should be 200', async (done) => {
22+
test('should be 200', async () => {
2523
const response = await request(app)
2624
.get('/admin/machine')
2725
.set('Authorization', 'test');
2826
expect(response.statusCode).toEqual(200);
2927
expect(response.body).toHaveProperty('ip', ip.address());
3028
expect(response.body).toHaveProperty('name', os.hostname());
31-
done();
3229
});
3330
});

0 commit comments

Comments
 (0)