Skip to content

Commit 2112ec6

Browse files
authored
[DEV-747] [DEV-839] [DEV-856] Implement Multi Stream Append (#363)
* Implement Multi Stream Append
1 parent 4172236 commit 2112ec6

File tree

98 files changed

+3160
-1641
lines changed

Some content is hidden

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

98 files changed

+3160
-1641
lines changed

.github/workflows/base.yml

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +0,0 @@
1-
name: Build
2-
3-
on:
4-
workflow_call:
5-
inputs:
6-
kurrentdb-tag:
7-
description: The docker tag to use. If kurrentdb-image is empty, the action will use the values in the KURRENTDB_DOCKER_IMAGES variable (ci, lts, previous-lts).
8-
required: true
9-
type: string
10-
kurrentdb-image:
11-
description: The docker image to use. Leave this empty to use the image in the KURRENTDB_DOCKER_IMAGES variable.
12-
required: false
13-
type: string
14-
kurrentdb-registry:
15-
description: The docker registry to use. Leave this empty to use the registry in the KURRENTDB_DOCKER_IMAGES variable.
16-
required: false
17-
type: string
18-
test:
19-
description: Which test to run.
20-
required: true
21-
type: string
22-
env:
23-
KURRENTDB_TAG: ${{ inputs.kurrentdb-image != '' && inputs.kurrentdb-tag || fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.kurrentdb-tag].tag }}
24-
KURRENTDB_IMAGE: ${{ inputs.kurrentdb-image || fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.kurrentdb-tag].image }}
25-
KURRENTDB_REGISTRY: ${{ inputs.kurrentdb-registry || fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.kurrentdb-tag].registry }}
26-
jobs:
27-
test:
28-
timeout-minutes: 20
29-
strategy:
30-
fail-fast: false
31-
matrix:
32-
framework: [ net8.0, net9.0 ]
33-
os: [ ubuntu-latest ]
34-
configuration: [ release ]
35-
runs-on: ${{ matrix.os }}
36-
name: ${{ inputs.test }} (${{ matrix.os }}, ${{ matrix.framework }})
37-
steps:
38-
- name: Echo docker details
39-
shell: bash
40-
run: |
41-
echo "${{env.KURRENTDB_REGISTRY}}"
42-
echo "${{env.KURRENTDB_IMAGE}}"
43-
echo "${{env.KURRENTDB_TAG}}"
44-
45-
- name: Checkout
46-
uses: actions/checkout@v4
47-
with:
48-
fetch-depth: 0
49-
50-
- name: Login to Cloudsmith via docker.cloudsmith.io
51-
uses: docker/login-action@v3
52-
with:
53-
registry: docker.cloudsmith.io
54-
username: ${{ secrets.CLOUDSMITH_CICD_USER }}
55-
password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
56-
57-
- name: Login to Cloudsmith via docker.kurrent.io
58-
uses: docker/login-action@v3
59-
with:
60-
registry: docker.kurrent.io
61-
username: ${{ secrets.CLOUDSMITH_CICD_USER }}
62-
password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
63-
64-
- name: Login to Cloudsmith via docker.eventstore.com
65-
uses: docker/login-action@v3
66-
with:
67-
registry: docker.eventstore.com
68-
username: ${{ secrets.CLOUDSMITH_CICD_USER }}
69-
password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
70-
71-
- name: Pull KurrentDB Image
72-
shell: bash
73-
run: |
74-
docker pull ${{ env.KURRENTDB_REGISTRY }}/${{ env.KURRENTDB_IMAGE}}:${{ env.KURRENTDB_TAG}}
75-
76-
- name: Install dotnet SDKs
77-
uses: actions/setup-dotnet@v3
78-
with:
79-
dotnet-version: |
80-
8.0.x
81-
9.0.x
82-
83-
- name: Generate certificates
84-
shell: bash
85-
run: sudo ./gencert.sh
86-
87-
- name: Restore dependencies
88-
shell: bash
89-
run: dotnet restore
90-
91-
- name: Run Tests
92-
shell: bash
93-
env:
94-
ES_DOCKER_TAG: ${{env.KURRENTDB_TAG}}
95-
ES_DOCKER_REGISTRY: ${{env.KURRENTDB_REGISTRY}}/${{env.KURRENTDB_IMAGE}}
96-
KURRENTDB_LICENSE_KEY: ${{ secrets.KURRENTDB_TEST_LICENSE_KEY }}
97-
run: |
98-
dotnet test --configuration ${{ matrix.configuration }} --blame \
99-
--logger:"GitHubActions;report-warnings=false" --logger:"console;verbosity=normal" \
100-
--framework ${{ matrix.framework }} \
101-
--filter "Category=Target:${{ inputs.test }}" \
102-
test/KurrentDB.Client.Tests

.github/workflows/ci.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/dispatch-ce.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/dispatch-ee.yml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +0,0 @@
1-
name: Dispatch
2-
run-name: "Dispatch [${{ inputs.correlation-id }}]"
3-
4-
on:
5-
workflow_dispatch:
6-
inputs:
7-
kurrentdb-tag:
8-
description: "The KurrentDB docker tag to use. If kurrentdb-image is empty, the action will use the values in the KURRENTDB_DOCKER_IMAGES variable (ci, lts, previous-lts)."
9-
required: true
10-
type: string
11-
kurrentdb-image:
12-
description: "The KurrentDB docker image to test against. Leave this empty to use the image in the KURRENTDB_DOCKER_IMAGES variable"
13-
required: false
14-
type: string
15-
kurrentdb-registry:
16-
description: "The docker registry containing the KurrentDB docker image. Leave this empty to use the registry in the KURRENTDB_DOCKER_IMAGES variable."
17-
required: false
18-
type: string
19-
correlation-id:
20-
type: string
21-
description: Optional CorrelationId to identify the workflow run
22-
required: false
23-
jobs:
24-
test:
25-
uses: ./.github/workflows/base.yml
26-
strategy:
27-
fail-fast: false
28-
matrix:
29-
test: [ Streams, PersistentSubscriptions, Operations, UserManagement, ProjectionManagement, Plugins ]
30-
name: Test (${{ inputs.kurrentdb-tag }})
31-
with:
32-
kurrentdb-tag: ${{ inputs.kurrentdb-tag }}
33-
kurrentdb-image: ${{ inputs.kurrentdb-image }}
34-
kurrentdb-registry: ${{ inputs.kurrentdb-registry }}
35-
test: ${{ matrix.test }}
36-
secrets: inherit

.github/workflows/dotnet.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Client
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
old:
11+
name: ${{ matrix.runtime }}
12+
uses: ./.github/workflows/test.yml
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
runtime: [ previous-lts, lts, ci ]
17+
with:
18+
runtime: ${{ matrix.runtime }}
19+
secrets: inherit
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/test.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Test
2+
3+
on:
4+
workflow_call:
5+
secrets:
6+
CLOUDSMITH_CICD_USER:
7+
required: false
8+
CLOUDSMITH_CICD_TOKEN:
9+
required: false
10+
inputs:
11+
runtime:
12+
required: true
13+
type: string
14+
15+
registry:
16+
description: "The Docker registry to use"
17+
type: string
18+
required: false
19+
20+
image:
21+
description: "The Docker image to use"
22+
type: string
23+
required: false
24+
25+
tag:
26+
description: "The Docker image tag to use"
27+
type: string
28+
required: false
29+
30+
jobs:
31+
load_configuration:
32+
uses: ./.github/workflows/load-configuration.yml
33+
with:
34+
runtime: ${{ inputs.runtime }}
35+
registry: ${{ inputs.registry }}
36+
image: ${{ inputs.image }}
37+
tag: ${{ inputs.tag }}
38+
39+
test:
40+
name: Test
41+
needs: load_configuration
42+
timeout-minutes: 10
43+
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
framework: [ net8.0, net9.0 ]
48+
test: [ Streams, PersistentSubscriptions, Operations, UserManagement, ProjectionManagement, Security, Diagnostics, Misc ]
49+
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v4
55+
with:
56+
fetch-depth: 0
57+
58+
- name: Login to Cloudsmith
59+
uses: docker/login-action@v3
60+
with:
61+
registry: docker.kurrent.io
62+
username: ${{ secrets.CLOUDSMITH_CICD_USER }}
63+
password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
64+
65+
- name: Install dotnet SDKs
66+
uses: actions/setup-dotnet@v3
67+
with:
68+
dotnet-version: |
69+
8.0.x
70+
9.0.x
71+
72+
- name: Run Tests
73+
shell: bash
74+
env:
75+
TESTCONTAINER_KURRENTDB_IMAGE: "${{ needs.load_configuration.outputs.registry }}/${{ needs.load_configuration.outputs.image }}:${{ needs.load_configuration.outputs.tag }}"
76+
run: |
77+
sudo ./gencert.sh
78+
dotnet test --configuration release --blame \
79+
--logger:"GitHubActions;report-warnings=false" --logger:"console;verbosity=normal" \
80+
--framework ${{ matrix.framework }} \
81+
--filter "Category=Target:${{ matrix.test }}" \
82+
test/KurrentDB.Client.Tests
83+

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ certs-cluster/
366366
.DS_Store
367367
docs/public
368368

369-
370-
.cache
371369
.temp
372-
node_modules
370+
.cache
371+
node_modules

0 commit comments

Comments
 (0)