Skip to content
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
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CI
on:
pull_request:
paths-ignore:
- "docs/**"
- "samples/**"
- "**.md"
push:
branches:
- trunk
Expand All @@ -15,5 +19,5 @@ jobs:
name: Tests (CI)
uses: ./.github/workflows/tests.yml
with:
image: ${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES).ci.fullname }}
runtime: ci
secrets: inherit
46 changes: 46 additions & 0 deletions .github/workflows/load-configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Load KurrentDB Runtime Configuration
on:
workflow_call:
inputs:
runtime:
description: "The runtime's name. Current options are: `ci`, `previous-lts`, `latest`"
type: string

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 }}

full_image_name:
description: The full Docker image name (including registry, image, and tag)
value: ${{ jobs.load.outputs.full_image_name }}

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

steps:
- name: Set KurrentDB Runtime Configuration Properties
id: set
run: |
echo "registry=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].registry }}" >> $GITHUB_OUTPUT
echo "tag=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].tag }}" >> $GITHUB_OUTPUT
echo "image=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].image }}" >> $GITHUB_OUTPUT
echo "full_image_name=${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)[inputs.runtime].fullname }}" >> $GITHUB_OUTPUT
10 changes: 8 additions & 2 deletions .github/workflows/lts.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: LTS
on:
pull_request:
paths-ignore:
- "docs/**"
- "samples/**"
- "**.md"
push:
branches:
- trunk
Expand All @@ -15,7 +19,7 @@ jobs:
name: Tests (LTS)
uses: ./.github/workflows/tests.yml
with:
image: ${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES).lts.fullname }}
runtime: lts
secrets: inherit

# Will be removed in the future
Expand All @@ -24,5 +28,7 @@ jobs:

uses: ./.github/workflows/plugins-tests.yml
with:
image: "docker.eventstore.com/eventstore-ee/eventstoredb-commercial:24.2.0-jammy"
registry: docker.eventstore.com/eventstore-ee
image: eventstoredb-commercial
tag: 24.2.0-jammy
secrets: inherit
12 changes: 10 additions & 2 deletions .github/workflows/plugins-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ name: enterprise plugins tests workflow
on:
workflow_call:
inputs:
registry:
required: true
type: string
image:
required: true
type: string
tag:
required: true
type: string

jobs:
single_node:
Expand Down Expand Up @@ -46,7 +52,7 @@ jobs:
- name: Execute Gradle build
run: ./gradlew ci --tests ${{ matrix.test }}Tests
env:
KURRENTDB_IMAGE: ${{ inputs.image }}
KURRENTDB_IMAGE: ${{inputs.registry}}/${{ inputs.image }}:${{ inputs.tag }}
SECURE: true

- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -81,7 +87,9 @@ jobs:
- name: Set up cluster with Docker Compose
run: docker compose up -d
env:
KURRENTDB_IMAGE: ${{ inputs.image }}
KURRENTDB_DOCKER_REGISTRY: ${{ inputs.registry }}
KURRENTDB_DOCKER_IMAGE: ${{ inputs.image }}
KURRENTDB_DOCKER_TAG: ${{ inputs.tag }}

- name: Generate user certificates
run: docker compose --file configure-user-certs-for-tests.yml up
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/previous-lts.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Previous LTS
on:
pull_request:
paths-ignore:
- "docs/**"
- "samples/**"
- "**.md"
push:
branches:
- trunk
Expand All @@ -15,5 +19,5 @@ jobs:
name: Tests (Previous LTS)
uses: ./.github/workflows/tests.yml
with:
image: ${{ fromJSON(vars.KURRENTDB_DOCKER_IMAGES)['previous-lts'].fullname }}
runtime: previous-lts
secrets: inherit
31 changes: 14 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: tests workflow

on:
pull_request:
paths-ignore:
- "docs/**"
- "samples/**"
- "**.md"

workflow_call:
inputs:
image:
runtime:
required: true
type: string

jobs:
load_configuration:
uses: ./.github/workflows/load-configuration.yml
with:
runtime: ${{ inputs.runtime }}

single_node:
needs: load_configuration
name: Single node

strategy:
Expand Down Expand Up @@ -47,16 +47,10 @@ jobs:
- name: Execute Gradle build
run: ./gradlew ci --tests ${{ matrix.test }}Tests
env:
KURRENTDB_IMAGE: ${{ inputs.image }}

- uses: actions/upload-artifact@v4
if: failure()
with:
name: esdb_logs.tar.gz
path: /tmp/esdb_logs.tar.gz
if-no-files-found: error
KURRENTDB_IMAGE: ${{ needs.load_configuration.outputs.full_image_name }}

secure:
needs: load_configuration
name: Secure

strategy:
Expand Down Expand Up @@ -92,7 +86,7 @@ jobs:
- name: Execute Gradle build
run: ./gradlew ci --tests ${{ matrix.test }}Tests
env:
KURRENTDB_IMAGE: ${{ inputs.image }}
KURRENTDB_IMAGE: ${{ needs.load_configuration.outputs.full_image_name }}
SECURE: true

- uses: actions/upload-artifact@v4
Expand All @@ -102,6 +96,7 @@ jobs:
path: /tmp/esdb_logs.tar.gz

cluster:
needs: load_configuration
name: Cluster

strategy:
Expand All @@ -123,7 +118,9 @@ jobs:
- name: Set up cluster with Docker Compose
run: docker compose up -d
env:
KURRENTDB_IMAGE: ${{ inputs.image }}
KURRENTDB_DOCKER_REGISTRY: ${{ needs.load_configuration.outputs.registry }}
KURRENTDB_DOCKER_IMAGE: ${{ needs.load_configuration.outputs.image }}
KURRENTDB_DOCKER_TAG: ${{ needs.load_configuration.outputs.tag }}

- name: Set up JDK 8
uses: actions/setup-java@v3
Expand Down
46 changes: 15 additions & 31 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.5"

services:
volumes-provisioner:
image: hasnat/volumes-provisioner
Expand All @@ -26,71 +24,57 @@ services:
- volumes-provisioner

esdb-node1: &template
image: ${KURRENTDB_IMAGE:-docker.kurrent.io/eventstore/eventstoredb-ee:lts}
image: ${KURRENTDB_DOCKER_REGISTRY:-docker.kurrent.io/eventstore}/${KURRENTDB_DOCKER_IMAGE:-eventstoredb-ee}:${KURRENTDB_DOCKER_TAG:-lts}
env_file:
- vars.env
environment:
- EVENTSTORE_GOSSIP_SEED=172.30.240.12:2113,172.30.240.13:2113
- EVENTSTORE_INT_IP=172.30.240.11
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node1/node.crt
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node1/node.key
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2111
- EVENTSTORE_REPLICATION_IP=172.30.240.11
- EVENTSTORE_CERTIFICATE_FILE=/etc/kurrentdb/certs/node1/node.crt
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/kurrentdb/certs/node1/node.key
- EVENTSTORE_ADVERTISE_NODE_PORT_TO_CLIENT_AS=2111
ports:
- 2111:2113
networks:
clusternetwork:
ipv4_address: 172.30.240.11
volumes:
- ./certs:/etc/eventstore/certs
- ./certs:/etc/kurrentdb/certs
restart: unless-stopped
depends_on:
- cert-gen

esdb-node2:
<<: *template
env_file:
- vars.env
environment:
- EVENTSTORE_GOSSIP_SEED=172.30.240.11:2113,172.30.240.13:2113
- EVENTSTORE_INT_IP=172.30.240.12
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node2/node.crt
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node2/node.key
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2112
- EVENTSTORE_REPLICATION_IP=172.30.240.12
- EVENTSTORE_CERTIFICATE_FILE=/etc/kurrentdb/certs/node2/node.crt
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/kurrentdb/certs/node2/node.key
- EVENTSTORE_ADVERTISE_NODE_PORT_TO_CLIENT_AS=2112
ports:
- 2112:2113
networks:
clusternetwork:
ipv4_address: 172.30.240.12
volumes:
- ./certs:/etc/eventstore/certs
restart: unless-stopped
depends_on:
- cert-gen

esdb-node3:
<<: *template
env_file:
- vars.env
environment:
- EVENTSTORE_GOSSIP_SEED=172.30.240.11:2113,172.30.240.12:2113
- EVENTSTORE_INT_IP=172.30.240.13
- EVENTSTORE_CERTIFICATE_FILE=/etc/eventstore/certs/node3/node.crt
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/eventstore/certs/node3/node.key
- EVENTSTORE_ADVERTISE_HTTP_PORT_TO_CLIENT_AS=2113
- EVENTSTORE_REPLICATION_IP=172.30.240.13
- EVENTSTORE_CERTIFICATE_FILE=/etc/kurrentdb/certs/node3/node.crt
- EVENTSTORE_CERTIFICATE_PRIVATE_KEY_FILE=/etc/kurrentdb/certs/node3/node.key
- EVENTSTORE_ADVERTISE_NODE_PORT_TO_CLIENT_AS=2113
ports:
- 2113:2113
networks:
clusternetwork:
ipv4_address: 172.30.240.13
volumes:
- ./certs:/etc/eventstore/certs
restart: unless-stopped
depends_on:
- cert-gen

networks:
clusternetwork:
name: eventstoredb.local
name: kurrentdb.local
driver: bridge
ipam:
driver: default
Expand Down
1 change: 0 additions & 1 deletion src/main/java/io/kurrent/dbclient/ReadAllOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ public class ReadAllOptions extends OptionsWithPositionAndResolveLinkTosBase<Rea
private long maxCount;

private ReadAllOptions() {
super(OperationKind.Streaming);
this.direction = Direction.Forwards;
this.maxCount = Long.MAX_VALUE;
}
Expand Down
1 change: 0 additions & 1 deletion src/main/java/io/kurrent/dbclient/ReadStreamOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ public class ReadStreamOptions extends OptionsWithStartRevisionAndResolveLinkTos
private long maxCount;

private ReadStreamOptions() {
super(OperationKind.Streaming);
this.direction = Direction.Forwards;
this.maxCount = Long.MAX_VALUE;
}
Expand Down
Loading
Loading