Skip to content

Commit 2d893f9

Browse files
authored
feat: add multi stream append feature (#422)
1 parent 3484d4d commit 2d893f9

File tree

148 files changed

+15275
-9266
lines changed

Some content is hidden

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

148 files changed

+15275
-9266
lines changed

.github/workflows/benchmark.yml

Lines changed: 53 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,53 @@
1-
name: Benchmark
2-
3-
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- main
8-
workflow_dispatch:
9-
10-
jobs:
11-
benchmark:
12-
runs-on: ${{ matrix.os }}
13-
strategy:
14-
fail-fast: true
15-
matrix:
16-
os: [ ubuntu-latest ]
17-
18-
steps:
19-
- name: Checkout Repository
20-
uses: actions/checkout@v4
21-
22-
- uses: actions/setup-node@v4
23-
with:
24-
node-version-file: .github/files/.nvmrc
25-
26-
- name: Corepack
27-
run: corepack enable
28-
29-
- name: Install Dependencies
30-
run: yarn
31-
32-
- name: Build
33-
run: yarn build
34-
35-
- name: Start KurrentDB
36-
run: docker compose -f packages/benchmark/docker-compose.yml up -d
37-
38-
- name: Load Events
39-
run: yarn nx run benchmark:loadEvents
40-
41-
- name: Run Benchmarks
42-
run: |
43-
echo "Number of events: 10k"
44-
echo "Size of each event: 23bytes"
45-
echo "Node.js version: $(node --version)"
46-
echo "1 warmup iteration"
47-
echo "20 iterations"
48-
yarn nx run benchmark:benchmark | tee benchmark-bridge-client-output-${{ matrix.os }}.txt
49-
50-
- name: Upload Benchmark Results
51-
uses: actions/upload-artifact@v4
52-
with:
53-
name: benchmark-results
54-
path: benchmark-bridge-client-output-${{ matrix.os }}.txt
55-
56-
- name: Shutdown KurrentDB
57-
run: docker compose -f packages/benchmark/docker-compose.yml down
1+
name: Benchmark
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
benchmark:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: true
11+
matrix:
12+
os: [ubuntu-latest]
13+
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version-file: .github/files/.nvmrc
21+
22+
- name: Corepack
23+
run: corepack enable
24+
25+
- name: Install Dependencies
26+
run: yarn
27+
28+
- name: Build
29+
run: yarn build
30+
31+
- name: Start KurrentDB
32+
run: docker compose -f packages/benchmark/docker-compose.yml up -d
33+
34+
- name: Load Events
35+
run: yarn nx run benchmark:loadEvents
36+
37+
- name: Run Benchmarks
38+
run: |
39+
echo "Number of events: 10k"
40+
echo "Size of each event: 23bytes"
41+
echo "Node.js version: $(node --version)"
42+
echo "1 warmup iteration"
43+
echo "20 iterations"
44+
yarn nx run benchmark:benchmark | tee benchmark-bridge-client-output-${{ matrix.os }}.txt
45+
46+
- name: Upload Benchmark Results
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: benchmark-results
50+
path: benchmark-bridge-client-output-${{ matrix.os }}.txt
51+
52+
- name: Shutdown KurrentDB
53+
run: docker compose -f packages/benchmark/docker-compose.yml down

.github/workflows/build_and_lint.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Load KurrentDB Runtime Configuration
2+
on:
3+
workflow_call:
4+
inputs:
5+
runtime:
6+
description: "The runtime's name. Current options are: `ci`, `previous-lts`, `latest` and `qa`"
7+
required: true
8+
type: string
9+
10+
registry:
11+
description: "When in QA mode, the Docker registry to use"
12+
type: string
13+
required: false
14+
15+
image:
16+
description: "When in QA mode, the Docker image to use"
17+
type: string
18+
required: false
19+
20+
tag:
21+
description: "When in QA mode, the Docker image tag to use"
22+
type: string
23+
required: false
24+
25+
outputs:
26+
runtime:
27+
description: The runtime's name
28+
value: ${{ inputs.runtime }}
29+
30+
registry:
31+
description: The Docker registry
32+
value: ${{ jobs.load.outputs.registry }}
33+
34+
image:
35+
description: The Docker image
36+
value: ${{ jobs.load.outputs.image }}
37+
38+
tag:
39+
description: The Docker image tag
40+
value: ${{ jobs.load.outputs.tag }}
41+
42+
jobs:
43+
load:
44+
runs-on: ubuntu-latest
45+
outputs:
46+
registry: ${{ steps.set.outputs.registry }}
47+
image: ${{ steps.set.outputs.image }}
48+
tag: ${{ steps.set.outputs.tag }}
49+
50+
steps:
51+
- name: Set KurrentDB Runtime Configuration Properties
52+
id: set
53+
run: |
54+
case ${{ inputs.runtime }} in
55+
"qa")
56+
echo "registry=${{ inputs.registry }}" >> $GITHUB_OUTPUT
57+
echo "image=${{ inputs.image }}" >> $GITHUB_OUTPUT
58+
echo "tag=${{ inputs.tag }}" >> $GITHUB_OUTPUT
59+
;;
60+
61+
*)
62+
echo "registry=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].registry }}" >> $GITHUB_OUTPUT
63+
echo "image=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].image }}" >> $GITHUB_OUTPUT
64+
echo "tag=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].tag }}" >> $GITHUB_OUTPUT
65+
;;
66+
esac

.github/workflows/main.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- main
6+
schedule:
7+
- cron: "0 3 * * 0" # Every sunday at 3am UTC.
8+
9+
jobs:
10+
build:
11+
name: Build
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
runs-on: ${{ matrix.os }}
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version-file: .github/files/.nvmrc
24+
25+
- name: NodeJS version
26+
run: node -v
27+
28+
- name: Corepack
29+
run: corepack enable
30+
31+
- name: Yarn version
32+
run: yarn --version
33+
34+
- name: Install
35+
run: yarn
36+
37+
- name: Build
38+
run: yarn build
39+
40+
validation:
41+
needs: build
42+
name: Code quality
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v3
46+
47+
- name: Corepack
48+
run: corepack enable
49+
50+
- name: Install
51+
run: yarn
52+
53+
- name: Linting
54+
run: yarn lint
55+
56+
- name: Build on Ubuntu
57+
run: yarn build
58+
59+
- name: All generated code is commited
60+
run: |
61+
git update-index --refresh
62+
git diff-index --exit-code --name-status HEAD --
63+
64+
tests:
65+
needs: validation
66+
67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
runtime: [previous-lts, lts, ci]
71+
72+
name: Tests
73+
uses: ./.github/workflows/tests.yml
74+
with:
75+
runtime: ${{ matrix.runtime }}
76+
secrets: inherit
77+
78+
plugins:
79+
needs: tests
80+
if: false
81+
name: "${{ matrix.group.name }}"
82+
strategy:
83+
fail-fast: false
84+
matrix:
85+
group:
86+
- name: plugins
87+
path: ./src/plugins
88+
env:
89+
# GitHub only passes secrets to the main repo, so we need to skip some things if they are unavailable
90+
SECRETS_AVAILABLE: ${{ secrets.EVENTSTORE_CLOUD_ID != null }}
91+
KURRENT_VERSION: "24.2.0-jammy"
92+
runs-on: ubuntu-latest
93+
steps:
94+
- uses: actions/checkout@v4
95+
96+
- uses: actions/setup-node@v4
97+
with:
98+
node-version-file: .github/files/.nvmrc
99+
100+
- name: NodeJS version
101+
run: node -v
102+
103+
- name: Corepack
104+
run: corepack enable
105+
106+
- name: Login to Cloudsmith
107+
uses: docker/login-action@v3
108+
with:
109+
registry: docker.eventstore.com
110+
username: ${{ secrets.CLOUDSMITH_CICD_USER }}
111+
password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
112+
113+
- name: Install
114+
run: yarn
115+
116+
- name: Corepack
117+
run: corepack enable
118+
119+
- name: Build
120+
run: yarn build
121+
122+
- name: Run Tests
123+
run: yarn test ${{ matrix.group.path }} --ci --run-in-band --forceExit
124+
env:
125+
KURRENT_IMAGE: "docker.eventstore.com/eventstore-ee/eventstoredb-commercial:${{ env.KURRENT_VERSION }}"

.github/workflows/qa.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,26 @@ name: QA
33
on:
44
workflow_dispatch:
55
inputs:
6+
tag:
7+
required: true
8+
type: string
9+
description: "The tag to use for the docker image"
610
image:
7-
description: 'Full image name'
811
required: true
9-
default: 'docker.kurrent.io/kurrent-staging/kurrentdb:ci'
1012
type: string
13+
description: "The docker image to use"
14+
registry:
15+
required: false
16+
type: string
17+
default: "docker.kurrent.io/kurrent-staging"
18+
description: "The docker registry to use"
1119

1220
jobs:
1321
test:
1422
name: Test
1523
uses: ./.github/workflows/tests.yml
1624
with:
25+
runtime: qa
26+
registry: ${{ inputs.registry }}
1727
image: ${{ inputs.image }}
28+
tag: ${{ inputs.tag }}

0 commit comments

Comments
 (0)