Skip to content

feat: add multi stream append feature #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 53 additions & 57 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,53 @@
name: Benchmark

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

jobs:
benchmark:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: .github/files/.nvmrc

- name: Corepack
run: corepack enable

- name: Install Dependencies
run: yarn

- name: Build
run: yarn build

- name: Start KurrentDB
run: docker compose -f packages/benchmark/docker-compose.yml up -d

- name: Load Events
run: yarn nx run benchmark:loadEvents

- name: Run Benchmarks
run: |
echo "Number of events: 10k"
echo "Size of each event: 23bytes"
echo "Node.js version: $(node --version)"
echo "1 warmup iteration"
echo "20 iterations"
yarn nx run benchmark:benchmark | tee benchmark-bridge-client-output-${{ matrix.os }}.txt

- name: Upload Benchmark Results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: benchmark-bridge-client-output-${{ matrix.os }}.txt

- name: Shutdown KurrentDB
run: docker compose -f packages/benchmark/docker-compose.yml down
name: Benchmark

on:
workflow_dispatch:

jobs:
benchmark:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: .github/files/.nvmrc

- name: Corepack
run: corepack enable

- name: Install Dependencies
run: yarn

- name: Build
run: yarn build

- name: Start KurrentDB
run: docker compose -f packages/benchmark/docker-compose.yml up -d

- name: Load Events
run: yarn nx run benchmark:loadEvents

- name: Run Benchmarks
run: |
echo "Number of events: 10k"
echo "Size of each event: 23bytes"
echo "Node.js version: $(node --version)"
echo "1 warmup iteration"
echo "20 iterations"
yarn nx run benchmark:benchmark | tee benchmark-bridge-client-output-${{ matrix.os }}.txt

- name: Upload Benchmark Results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: benchmark-bridge-client-output-${{ matrix.os }}.txt

- name: Shutdown KurrentDB
run: docker compose -f packages/benchmark/docker-compose.yml down
63 changes: 0 additions & 63 deletions .github/workflows/build_and_lint.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/load-configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Load KurrentDB Runtime Configuration
on:
workflow_call:
inputs:
runtime:
description: "The runtime's name. Current options are: `ci`, `previous-lts`, `latest` and `qa`"
required: true
type: string

registry:
description: "When in QA mode, the Docker registry to use"
type: string
required: false

image:
description: "When in QA mode, the Docker image to use"
type: string
required: false

tag:
description: "When in QA mode, the Docker image tag to use"
type: string
required: false

outputs:
runtime:
description: The runtime's name
value: ${{ inputs.runtime }}

registry:
description: The Docker registry
value: ${{ jobs.load.outputs.registry }}

image:
description: The Docker image
value: ${{ jobs.load.outputs.image }}

tag:
description: The Docker image tag
value: ${{ jobs.load.outputs.tag }}

jobs:
load:
runs-on: ubuntu-latest
outputs:
registry: ${{ steps.set.outputs.registry }}
image: ${{ steps.set.outputs.image }}
tag: ${{ steps.set.outputs.tag }}

steps:
- name: Set KurrentDB Runtime Configuration Properties
id: set
run: |
case ${{ inputs.runtime }} in
"qa")
echo "registry=${{ inputs.registry }}" >> $GITHUB_OUTPUT
echo "image=${{ inputs.image }}" >> $GITHUB_OUTPUT
echo "tag=${{ inputs.tag }}" >> $GITHUB_OUTPUT
;;

*)
echo "registry=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].registry }}" >> $GITHUB_OUTPUT
echo "image=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].image }}" >> $GITHUB_OUTPUT
echo "tag=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].tag }}" >> $GITHUB_OUTPUT
;;
esac
125 changes: 125 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 3 * * 0" # Every sunday at 3am UTC.

jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: .github/files/.nvmrc

- name: NodeJS version
run: node -v

- name: Corepack
run: corepack enable

- name: Yarn version
run: yarn --version

- name: Install
run: yarn

- name: Build
run: yarn build

validation:
needs: build
name: Code quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Corepack
run: corepack enable

- name: Install
run: yarn

- name: Linting
run: yarn lint

- name: Build on Ubuntu
run: yarn build

- name: All generated code is commited
run: |
git update-index --refresh
git diff-index --exit-code --name-status HEAD --

tests:
needs: validation

strategy:
fail-fast: false
matrix:
runtime: [previous-lts, lts, ci]

name: Tests
uses: ./.github/workflows/tests.yml
with:
runtime: ${{ matrix.runtime }}
secrets: inherit

plugins:
needs: tests
if: false
name: "${{ matrix.group.name }}"
strategy:
fail-fast: false
matrix:
group:
- name: plugins
path: ./src/plugins
env:
# GitHub only passes secrets to the main repo, so we need to skip some things if they are unavailable
SECRETS_AVAILABLE: ${{ secrets.EVENTSTORE_CLOUD_ID != null }}
KURRENT_VERSION: "24.2.0-jammy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: .github/files/.nvmrc

- name: NodeJS version
run: node -v

- name: Corepack
run: corepack enable

- name: Login to Cloudsmith
uses: docker/login-action@v3
with:
registry: docker.eventstore.com
username: ${{ secrets.CLOUDSMITH_CICD_USER }}
password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}

- name: Install
run: yarn

- name: Corepack
run: corepack enable

- name: Build
run: yarn build

- name: Run Tests
run: yarn test ${{ matrix.group.path }} --ci --run-in-band --forceExit
env:
KURRENT_IMAGE: "docker.eventstore.com/eventstore-ee/eventstoredb-commercial:${{ env.KURRENT_VERSION }}"
15 changes: 13 additions & 2 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,26 @@ name: QA
on:
workflow_dispatch:
inputs:
tag:
required: true
type: string
description: "The tag to use for the docker image"
image:
description: 'Full image name'
required: true
default: 'docker.kurrent.io/kurrent-staging/kurrentdb:ci'
type: string
description: "The docker image to use"
registry:
required: false
type: string
default: "docker.kurrent.io/kurrent-staging"
description: "The docker registry to use"

jobs:
test:
name: Test
uses: ./.github/workflows/tests.yml
with:
runtime: qa
registry: ${{ inputs.registry }}
image: ${{ inputs.image }}
tag: ${{ inputs.tag }}
Loading