From 0875571f63fc55d7f6c992a6ccb6251e783c88ba Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Wed, 10 May 2023 08:58:17 +0200 Subject: [PATCH 1/6] chore: docker-compose postgres healthcheck * instead of sleep in CI --- .github/workflows/integration-tests-r2dbc.yml | 4 +--- .../paradox/guide/1-event-sourced-shopping-cart.md | 2 +- .../src/main/paradox/guide/2-service-to-service.md | 8 ++++---- .../src/main/paradox/guide/3-active-active.md | 4 ++-- .../grpc/shopping-analytics-service-java/README.md | 2 +- .../docker-compose.yml | 6 ++++++ .../grpc/shopping-analytics-service-scala/README.md | 2 +- .../docker-compose.yml | 6 ++++++ samples/grpc/shopping-cart-service-java/README.md | 2 +- .../shopping-cart-service-java/docker-compose.yml | 6 ++++++ samples/grpc/shopping-cart-service-scala/README.md | 2 +- .../shopping-cart-service-scala/docker-compose.yml | 6 ++++++ .../replicated/shopping-cart-service-java/README.md | 2 +- .../shopping-cart-service-java/docker-compose.yml | 12 ++++++++++++ .../replicated/shopping-cart-service-scala/README.md | 2 +- .../shopping-cart-service-scala/docker-compose.yml | 12 ++++++++++++ 16 files changed, 62 insertions(+), 16 deletions(-) diff --git a/.github/workflows/integration-tests-r2dbc.yml b/.github/workflows/integration-tests-r2dbc.yml index 8c4316f19..b701c9e08 100644 --- a/.github/workflows/integration-tests-r2dbc.yml +++ b/.github/workflows/integration-tests-r2dbc.yml @@ -48,9 +48,7 @@ jobs: - name: Start DB run: |- - docker-compose -f docker-files/docker-compose-postgres.yml up -d - # TODO: could we poll the port instead of sleep? - sleep 10 + docker-compose -f docker-files/docker-compose-postgres.yml up --build --detach --wait docker exec -i postgres_db psql -U postgres -t < akka-projection-r2dbc/ddl-scripts/create_tables_postgres.sql - name: Run integration tests with with Scala and Java ${{ matrix.jdkVersion }} diff --git a/akka-distributed-cluster-docs/src/main/paradox/guide/1-event-sourced-shopping-cart.md b/akka-distributed-cluster-docs/src/main/paradox/guide/1-event-sourced-shopping-cart.md index 9f79d1ae6..293c278e1 100644 --- a/akka-distributed-cluster-docs/src/main/paradox/guide/1-event-sourced-shopping-cart.md +++ b/akka-distributed-cluster-docs/src/main/paradox/guide/1-event-sourced-shopping-cart.md @@ -147,7 +147,7 @@ Before running the sample locally you will need to run a PostgreSQL instance in `docker-compose.yml`. Run it and create the needed database schema: ```shell -docker-compose up -d +docker-compose up --build --detach --wait docker exec -i postgres_db psql -U postgres -t < ddl-scripts/create_tables.sql ``` diff --git a/akka-distributed-cluster-docs/src/main/paradox/guide/2-service-to-service.md b/akka-distributed-cluster-docs/src/main/paradox/guide/2-service-to-service.md index d6a702d27..c7ba65225 100644 --- a/akka-distributed-cluster-docs/src/main/paradox/guide/2-service-to-service.md +++ b/akka-distributed-cluster-docs/src/main/paradox/guide/2-service-to-service.md @@ -191,7 +191,7 @@ your own workstation. Docker, a JDK and @java[maven]@scala[sbt] is all that need 1. Start a local PostgresSQL server on default port 5432. The `docker-compose.yml` included in the shopping-cart project starts everything required for running locally. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection @@ -248,7 +248,7 @@ your own workstation. Docker, a JDK and @java[maven]@scala[sbt] is all that need 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection @@ -313,7 +313,7 @@ your own workstation. Docker, a JDK and @java[maven]@scala[sbt] is all that need 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. Note that for convenience this service and the shopping cart service is sharing the same database, in an actual service consuming events the consuming services are expected to have their own separate databases. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection @@ -339,7 +339,7 @@ your own workstation. Docker, a JDK and @java[maven]@scala[sbt] is all that need 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. Note that for convenience this service and the shopping cart service is sharing the same database, in an actual service consuming events the consuming services are expected to have their own separate databases. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/akka-distributed-cluster-docs/src/main/paradox/guide/3-active-active.md b/akka-distributed-cluster-docs/src/main/paradox/guide/3-active-active.md index 84a5a94fb..c9f341c07 100644 --- a/akka-distributed-cluster-docs/src/main/paradox/guide/3-active-active.md +++ b/akka-distributed-cluster-docs/src/main/paradox/guide/3-active-active.md @@ -159,7 +159,7 @@ The complete sample can be downloaded from github, the replicated shopping cart: 1. Start two local PostgresSQL servers, on ports 5101 and 5201. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection @@ -236,7 +236,7 @@ The complete sample can be downloaded from github, the replicated shopping cart: 1. Start two local PostgresSQL servers, on ports 5101 and 5201. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/grpc/shopping-analytics-service-java/README.md b/samples/grpc/shopping-analytics-service-java/README.md index 3bfe6b669..b495e8d9b 100644 --- a/samples/grpc/shopping-analytics-service-java/README.md +++ b/samples/grpc/shopping-analytics-service-java/README.md @@ -3,7 +3,7 @@ 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. Note that for convenience this service and the shopping cart service is sharing the same database, in an actual service consuming events the consuming services are expected to have their own separate databases. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/grpc/shopping-analytics-service-java/docker-compose.yml b/samples/grpc/shopping-analytics-service-java/docker-compose.yml index 062c62444..366c5a10a 100644 --- a/samples/grpc/shopping-analytics-service-java/docker-compose.yml +++ b/samples/grpc/shopping-analytics-service-java/docker-compose.yml @@ -8,3 +8,9 @@ services: environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + healthcheck: + test: ['CMD', 'pg_isready', "-q", "-d", "postgres", "-U", "postgres"] + interval: 5s + retries: 5 + start_period: 5s + timeout: 5s diff --git a/samples/grpc/shopping-analytics-service-scala/README.md b/samples/grpc/shopping-analytics-service-scala/README.md index 316e1f174..fbdf316f9 100644 --- a/samples/grpc/shopping-analytics-service-scala/README.md +++ b/samples/grpc/shopping-analytics-service-scala/README.md @@ -3,7 +3,7 @@ 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. Note that for convenience this service and the shopping cart service is sharing the same database, in an actual service consuming events the consuming services are expected to have their own separate databases. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/grpc/shopping-analytics-service-scala/docker-compose.yml b/samples/grpc/shopping-analytics-service-scala/docker-compose.yml index 062c62444..366c5a10a 100644 --- a/samples/grpc/shopping-analytics-service-scala/docker-compose.yml +++ b/samples/grpc/shopping-analytics-service-scala/docker-compose.yml @@ -8,3 +8,9 @@ services: environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + healthcheck: + test: ['CMD', 'pg_isready', "-q", "-d", "postgres", "-U", "postgres"] + interval: 5s + retries: 5 + start_period: 5s + timeout: 5s diff --git a/samples/grpc/shopping-cart-service-java/README.md b/samples/grpc/shopping-cart-service-java/README.md index ac7a5cc48..a5c59eaae 100644 --- a/samples/grpc/shopping-cart-service-java/README.md +++ b/samples/grpc/shopping-cart-service-java/README.md @@ -3,7 +3,7 @@ 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/grpc/shopping-cart-service-java/docker-compose.yml b/samples/grpc/shopping-cart-service-java/docker-compose.yml index 062c62444..366c5a10a 100644 --- a/samples/grpc/shopping-cart-service-java/docker-compose.yml +++ b/samples/grpc/shopping-cart-service-java/docker-compose.yml @@ -8,3 +8,9 @@ services: environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + healthcheck: + test: ['CMD', 'pg_isready', "-q", "-d", "postgres", "-U", "postgres"] + interval: 5s + retries: 5 + start_period: 5s + timeout: 5s diff --git a/samples/grpc/shopping-cart-service-scala/README.md b/samples/grpc/shopping-cart-service-scala/README.md index fb289747b..c3ef381b9 100644 --- a/samples/grpc/shopping-cart-service-scala/README.md +++ b/samples/grpc/shopping-cart-service-scala/README.md @@ -3,7 +3,7 @@ 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/grpc/shopping-cart-service-scala/docker-compose.yml b/samples/grpc/shopping-cart-service-scala/docker-compose.yml index 062c62444..366c5a10a 100644 --- a/samples/grpc/shopping-cart-service-scala/docker-compose.yml +++ b/samples/grpc/shopping-cart-service-scala/docker-compose.yml @@ -8,3 +8,9 @@ services: environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + healthcheck: + test: ['CMD', 'pg_isready', "-q", "-d", "postgres", "-U", "postgres"] + interval: 5s + retries: 5 + start_period: 5s + timeout: 5s diff --git a/samples/replicated/shopping-cart-service-java/README.md b/samples/replicated/shopping-cart-service-java/README.md index 710f8cc85..6c6bd2393 100644 --- a/samples/replicated/shopping-cart-service-java/README.md +++ b/samples/replicated/shopping-cart-service-java/README.md @@ -3,7 +3,7 @@ 1. Start two local PostgresSQL servers, on ports 5101 and 5201. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/replicated/shopping-cart-service-java/docker-compose.yml b/samples/replicated/shopping-cart-service-java/docker-compose.yml index bf9c444bc..b13c5bda8 100644 --- a/samples/replicated/shopping-cart-service-java/docker-compose.yml +++ b/samples/replicated/shopping-cart-service-java/docker-compose.yml @@ -8,6 +8,12 @@ services: environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + healthcheck: + test: ['CMD', 'pg_isready', "-q", "-d", "postgres", "-U", "postgres"] + interval: 5s + retries: 5 + start_period: 5s + timeout: 5s postgres-db-2: image: postgres:latest container_name: postgres_db_2 @@ -16,3 +22,9 @@ services: environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + healthcheck: + test: ['CMD', 'pg_isready', "-q", "-d", "postgres", "-U", "postgres"] + interval: 5s + retries: 5 + start_period: 5s + timeout: 5s diff --git a/samples/replicated/shopping-cart-service-scala/README.md b/samples/replicated/shopping-cart-service-scala/README.md index 1f5cd462a..04e3f1761 100644 --- a/samples/replicated/shopping-cart-service-scala/README.md +++ b/samples/replicated/shopping-cart-service-scala/README.md @@ -3,7 +3,7 @@ 1. Start two local PostgresSQL servers, on ports 5101 and 5201. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up -d + docker-compose up --build --detach --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/replicated/shopping-cart-service-scala/docker-compose.yml b/samples/replicated/shopping-cart-service-scala/docker-compose.yml index bf9c444bc..b13c5bda8 100644 --- a/samples/replicated/shopping-cart-service-scala/docker-compose.yml +++ b/samples/replicated/shopping-cart-service-scala/docker-compose.yml @@ -8,6 +8,12 @@ services: environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + healthcheck: + test: ['CMD', 'pg_isready', "-q", "-d", "postgres", "-U", "postgres"] + interval: 5s + retries: 5 + start_period: 5s + timeout: 5s postgres-db-2: image: postgres:latest container_name: postgres_db_2 @@ -16,3 +22,9 @@ services: environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + healthcheck: + test: ['CMD', 'pg_isready', "-q", "-d", "postgres", "-U", "postgres"] + interval: 5s + retries: 5 + start_period: 5s + timeout: 5s From 25a44926206e4c3340d2f94bf2b21dd87922cb2b Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Wed, 10 May 2023 10:21:15 +0200 Subject: [PATCH 2/6] one more --- docker-files/docker-compose-postgres.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-files/docker-compose-postgres.yml b/docker-files/docker-compose-postgres.yml index 062c62444..366c5a10a 100644 --- a/docker-files/docker-compose-postgres.yml +++ b/docker-files/docker-compose-postgres.yml @@ -8,3 +8,9 @@ services: environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + healthcheck: + test: ['CMD', 'pg_isready', "-q", "-d", "postgres", "-U", "postgres"] + interval: 5s + retries: 5 + start_period: 5s + timeout: 5s From 2ac1e1e1f021c6d3234a3a31680b56b57a00223d Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Mon, 22 May 2023 10:38:12 +0200 Subject: [PATCH 3/6] remove --build --detach --- .github/workflows/integration-tests-r2dbc.yml | 2 +- .../main/paradox/guide/1-event-sourced-shopping-cart.md | 2 +- .../src/main/paradox/guide/2-service-to-service.md | 8 ++++---- .../src/main/paradox/guide/3-active-active.md | 4 ++-- samples/grpc/shopping-analytics-service-java/README.md | 2 +- samples/grpc/shopping-analytics-service-scala/README.md | 2 +- samples/grpc/shopping-cart-service-java/README.md | 2 +- samples/grpc/shopping-cart-service-scala/README.md | 2 +- samples/replicated/shopping-cart-service-java/README.md | 2 +- samples/replicated/shopping-cart-service-scala/README.md | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/integration-tests-r2dbc.yml b/.github/workflows/integration-tests-r2dbc.yml index b701c9e08..a7669aaa2 100644 --- a/.github/workflows/integration-tests-r2dbc.yml +++ b/.github/workflows/integration-tests-r2dbc.yml @@ -48,7 +48,7 @@ jobs: - name: Start DB run: |- - docker-compose -f docker-files/docker-compose-postgres.yml up --build --detach --wait + docker-compose -f docker-files/docker-compose-postgres.yml up --wait docker exec -i postgres_db psql -U postgres -t < akka-projection-r2dbc/ddl-scripts/create_tables_postgres.sql - name: Run integration tests with with Scala and Java ${{ matrix.jdkVersion }} diff --git a/akka-distributed-cluster-docs/src/main/paradox/guide/1-event-sourced-shopping-cart.md b/akka-distributed-cluster-docs/src/main/paradox/guide/1-event-sourced-shopping-cart.md index 293c278e1..541608cb5 100644 --- a/akka-distributed-cluster-docs/src/main/paradox/guide/1-event-sourced-shopping-cart.md +++ b/akka-distributed-cluster-docs/src/main/paradox/guide/1-event-sourced-shopping-cart.md @@ -147,7 +147,7 @@ Before running the sample locally you will need to run a PostgreSQL instance in `docker-compose.yml`. Run it and create the needed database schema: ```shell -docker-compose up --build --detach --wait +docker-compose up --wait docker exec -i postgres_db psql -U postgres -t < ddl-scripts/create_tables.sql ``` diff --git a/akka-distributed-cluster-docs/src/main/paradox/guide/2-service-to-service.md b/akka-distributed-cluster-docs/src/main/paradox/guide/2-service-to-service.md index c7ba65225..f00fa1d8a 100644 --- a/akka-distributed-cluster-docs/src/main/paradox/guide/2-service-to-service.md +++ b/akka-distributed-cluster-docs/src/main/paradox/guide/2-service-to-service.md @@ -191,7 +191,7 @@ your own workstation. Docker, a JDK and @java[maven]@scala[sbt] is all that need 1. Start a local PostgresSQL server on default port 5432. The `docker-compose.yml` included in the shopping-cart project starts everything required for running locally. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection @@ -248,7 +248,7 @@ your own workstation. Docker, a JDK and @java[maven]@scala[sbt] is all that need 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection @@ -313,7 +313,7 @@ your own workstation. Docker, a JDK and @java[maven]@scala[sbt] is all that need 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. Note that for convenience this service and the shopping cart service is sharing the same database, in an actual service consuming events the consuming services are expected to have their own separate databases. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection @@ -339,7 +339,7 @@ your own workstation. Docker, a JDK and @java[maven]@scala[sbt] is all that need 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. Note that for convenience this service and the shopping cart service is sharing the same database, in an actual service consuming events the consuming services are expected to have their own separate databases. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/akka-distributed-cluster-docs/src/main/paradox/guide/3-active-active.md b/akka-distributed-cluster-docs/src/main/paradox/guide/3-active-active.md index c9f341c07..1dfbc6fed 100644 --- a/akka-distributed-cluster-docs/src/main/paradox/guide/3-active-active.md +++ b/akka-distributed-cluster-docs/src/main/paradox/guide/3-active-active.md @@ -159,7 +159,7 @@ The complete sample can be downloaded from github, the replicated shopping cart: 1. Start two local PostgresSQL servers, on ports 5101 and 5201. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection @@ -236,7 +236,7 @@ The complete sample can be downloaded from github, the replicated shopping cart: 1. Start two local PostgresSQL servers, on ports 5101 and 5201. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/grpc/shopping-analytics-service-java/README.md b/samples/grpc/shopping-analytics-service-java/README.md index b495e8d9b..35ce8a2a8 100644 --- a/samples/grpc/shopping-analytics-service-java/README.md +++ b/samples/grpc/shopping-analytics-service-java/README.md @@ -3,7 +3,7 @@ 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. Note that for convenience this service and the shopping cart service is sharing the same database, in an actual service consuming events the consuming services are expected to have their own separate databases. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/grpc/shopping-analytics-service-scala/README.md b/samples/grpc/shopping-analytics-service-scala/README.md index fbdf316f9..59437c3c3 100644 --- a/samples/grpc/shopping-analytics-service-scala/README.md +++ b/samples/grpc/shopping-analytics-service-scala/README.md @@ -3,7 +3,7 @@ 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. Note that for convenience this service and the shopping cart service is sharing the same database, in an actual service consuming events the consuming services are expected to have their own separate databases. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/grpc/shopping-cart-service-java/README.md b/samples/grpc/shopping-cart-service-java/README.md index a5c59eaae..aa37ddc9d 100644 --- a/samples/grpc/shopping-cart-service-java/README.md +++ b/samples/grpc/shopping-cart-service-java/README.md @@ -3,7 +3,7 @@ 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/grpc/shopping-cart-service-scala/README.md b/samples/grpc/shopping-cart-service-scala/README.md index c3ef381b9..f3324f7b8 100644 --- a/samples/grpc/shopping-cart-service-scala/README.md +++ b/samples/grpc/shopping-cart-service-scala/README.md @@ -3,7 +3,7 @@ 1. Start a local PostgresSQL server on default port 5432. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/replicated/shopping-cart-service-java/README.md b/samples/replicated/shopping-cart-service-java/README.md index 6c6bd2393..ae4185b24 100644 --- a/samples/replicated/shopping-cart-service-java/README.md +++ b/samples/replicated/shopping-cart-service-java/README.md @@ -3,7 +3,7 @@ 1. Start two local PostgresSQL servers, on ports 5101 and 5201. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection diff --git a/samples/replicated/shopping-cart-service-scala/README.md b/samples/replicated/shopping-cart-service-scala/README.md index 04e3f1761..4ee9342d2 100644 --- a/samples/replicated/shopping-cart-service-scala/README.md +++ b/samples/replicated/shopping-cart-service-scala/README.md @@ -3,7 +3,7 @@ 1. Start two local PostgresSQL servers, on ports 5101 and 5201. The included `docker-compose.yml` starts everything required for running locally. ```shell - docker-compose up --build --detach --wait + docker-compose up --wait # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection From 9515620bfd4540feb07d0b77d50294c356332d02 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Mon, 22 May 2023 10:38:53 +0200 Subject: [PATCH 4/6] ubuntu-23.04 --- .github/workflows/checks.yml | 8 ++++---- .github/workflows/dependency-submission.yml | 2 +- .github/workflows/fossa.yml | 2 +- .github/workflows/integration-tests-cassandra.yml | 2 +- .github/workflows/integration-tests-grpc.yml | 2 +- .github/workflows/integration-tests-jdbc.yml | 2 +- .github/workflows/integration-tests-kafka.yml | 2 +- .github/workflows/integration-tests-r2dbc.yml | 4 ++-- .github/workflows/integration-tests-slick.yml | 2 +- .github/workflows/release-drafter.yml | 2 +- .github/workflows/release.yml | 4 ++-- .github/workflows/unit-tests.yml | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 18f73c0e1..e30ac508f 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -13,7 +13,7 @@ permissions: jobs: check-code-style: name: Check Code Style - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 steps: - name: Checkout # https://github.com/actions/checkout/releases @@ -46,7 +46,7 @@ jobs: check-code-compilation: name: Check Code Compilation - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 steps: - name: Checkout # https://github.com/actions/checkout/releases @@ -78,7 +78,7 @@ jobs: check-docs: name: Check Docs - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 steps: - name: Checkout # https://github.com/actions/checkout/releases @@ -110,7 +110,7 @@ jobs: check-samples: name: Check Sample Projects - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 steps: - name: Checkout # https://github.com/actions/checkout/releases diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml index c90b8e770..479126104 100644 --- a/.github/workflows/dependency-submission.yml +++ b/.github/workflows/dependency-submission.yml @@ -14,7 +14,7 @@ jobs: dependency-graph: name: Update Dependency Graph if: github.event.repository.fork == false - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 permissions: contents: write steps: diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index f1c785fb3..09ed90308 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -11,7 +11,7 @@ permissions: jobs: fossa: name: Fossa - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 if: github.repository == 'akka/akka-projection' steps: - name: Checkout diff --git a/.github/workflows/integration-tests-cassandra.yml b/.github/workflows/integration-tests-cassandra.yml index f9f5b108e..4addd7050 100644 --- a/.github/workflows/integration-tests-cassandra.yml +++ b/.github/workflows/integration-tests-cassandra.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test Integration for Cassandra - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-tests-grpc.yml b/.github/workflows/integration-tests-grpc.yml index 9d7f0989d..468ab5227 100644 --- a/.github/workflows/integration-tests-grpc.yml +++ b/.github/workflows/integration-tests-grpc.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test Integration for gRPC - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-tests-jdbc.yml b/.github/workflows/integration-tests-jdbc.yml index 8580e9507..5f2a1267c 100644 --- a/.github/workflows/integration-tests-jdbc.yml +++ b/.github/workflows/integration-tests-jdbc.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test Integration for JDBC - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-tests-kafka.yml b/.github/workflows/integration-tests-kafka.yml index 7ee03725a..ad2f72afe 100644 --- a/.github/workflows/integration-tests-kafka.yml +++ b/.github/workflows/integration-tests-kafka.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test Integration for Kafka - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-tests-r2dbc.yml b/.github/workflows/integration-tests-r2dbc.yml index a7669aaa2..eeed54fb6 100644 --- a/.github/workflows/integration-tests-r2dbc.yml +++ b/.github/workflows/integration-tests-r2dbc.yml @@ -10,7 +10,7 @@ on: jobs: test-r2dbc-postgres: name: Run r2dbc test with Postgres - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 if: github.repository == 'akka/akka-projection' strategy: fail-fast: false @@ -57,7 +57,7 @@ jobs: test-r2dbc-yugabyte: name: Run r2dbc tests with Yugabyte - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 if: github.repository == 'akka/akka-projection' strategy: fail-fast: false diff --git a/.github/workflows/integration-tests-slick.yml b/.github/workflows/integration-tests-slick.yml index a482f6c49..e8a4dcb52 100644 --- a/.github/workflows/integration-tests-slick.yml +++ b/.github/workflows/integration-tests-slick.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test Integration for Slick - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index fbba35a52..9c0c15f55 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -11,7 +11,7 @@ permissions: jobs: update_release_draft: - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 permissions: contents: write steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2367b24a..c5dece8d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: # the release environment provides access to secrets required in the release process # https://github.com/akka/akka-projection/settings/environments environment: release - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 steps: - name: Checkout # https://github.com/actions/checkout/releases @@ -57,7 +57,7 @@ jobs: # the release environment provides access to secrets required in the release process # https://github.com/akka/akka-projection/settings/environments environment: release - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 steps: - name: Checkout # https://github.com/actions/checkout/releases diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index d636afcba..8035a9849 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test - runs-on: ubuntu-22.04 + runs-on: ubuntu-23.04 strategy: fail-fast: false matrix: From 067b29617a8b65826faf15ebfa85c72c3141d46a Mon Sep 17 00:00:00 2001 From: Peter Vlugter <59895+pvlugter@users.noreply.github.com> Date: Tue, 8 Aug 2023 11:52:22 +1200 Subject: [PATCH 5/6] Revert "ubuntu-23.04" This reverts commit 9515620bfd4540feb07d0b77d50294c356332d02. --- .github/workflows/checks.yml | 8 ++++---- .github/workflows/dependency-submission.yml | 2 +- .github/workflows/fossa.yml | 2 +- .github/workflows/integration-tests-cassandra.yml | 2 +- .github/workflows/integration-tests-grpc.yml | 2 +- .github/workflows/integration-tests-jdbc.yml | 2 +- .github/workflows/integration-tests-kafka.yml | 2 +- .github/workflows/integration-tests-r2dbc.yml | 4 ++-- .github/workflows/integration-tests-slick.yml | 2 +- .github/workflows/release-drafter.yml | 2 +- .github/workflows/release.yml | 4 ++-- .github/workflows/unit-tests.yml | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index e30ac508f..18f73c0e1 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -13,7 +13,7 @@ permissions: jobs: check-code-style: name: Check Code Style - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 steps: - name: Checkout # https://github.com/actions/checkout/releases @@ -46,7 +46,7 @@ jobs: check-code-compilation: name: Check Code Compilation - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 steps: - name: Checkout # https://github.com/actions/checkout/releases @@ -78,7 +78,7 @@ jobs: check-docs: name: Check Docs - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 steps: - name: Checkout # https://github.com/actions/checkout/releases @@ -110,7 +110,7 @@ jobs: check-samples: name: Check Sample Projects - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 steps: - name: Checkout # https://github.com/actions/checkout/releases diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml index 479126104..c90b8e770 100644 --- a/.github/workflows/dependency-submission.yml +++ b/.github/workflows/dependency-submission.yml @@ -14,7 +14,7 @@ jobs: dependency-graph: name: Update Dependency Graph if: github.event.repository.fork == false - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 permissions: contents: write steps: diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index 09ed90308..f1c785fb3 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -11,7 +11,7 @@ permissions: jobs: fossa: name: Fossa - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 if: github.repository == 'akka/akka-projection' steps: - name: Checkout diff --git a/.github/workflows/integration-tests-cassandra.yml b/.github/workflows/integration-tests-cassandra.yml index 4addd7050..f9f5b108e 100644 --- a/.github/workflows/integration-tests-cassandra.yml +++ b/.github/workflows/integration-tests-cassandra.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test Integration for Cassandra - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-tests-grpc.yml b/.github/workflows/integration-tests-grpc.yml index 468ab5227..9d7f0989d 100644 --- a/.github/workflows/integration-tests-grpc.yml +++ b/.github/workflows/integration-tests-grpc.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test Integration for gRPC - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-tests-jdbc.yml b/.github/workflows/integration-tests-jdbc.yml index 5f2a1267c..8580e9507 100644 --- a/.github/workflows/integration-tests-jdbc.yml +++ b/.github/workflows/integration-tests-jdbc.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test Integration for JDBC - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-tests-kafka.yml b/.github/workflows/integration-tests-kafka.yml index ad2f72afe..7ee03725a 100644 --- a/.github/workflows/integration-tests-kafka.yml +++ b/.github/workflows/integration-tests-kafka.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test Integration for Kafka - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/integration-tests-r2dbc.yml b/.github/workflows/integration-tests-r2dbc.yml index eeed54fb6..a7669aaa2 100644 --- a/.github/workflows/integration-tests-r2dbc.yml +++ b/.github/workflows/integration-tests-r2dbc.yml @@ -10,7 +10,7 @@ on: jobs: test-r2dbc-postgres: name: Run r2dbc test with Postgres - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 if: github.repository == 'akka/akka-projection' strategy: fail-fast: false @@ -57,7 +57,7 @@ jobs: test-r2dbc-yugabyte: name: Run r2dbc tests with Yugabyte - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 if: github.repository == 'akka/akka-projection' strategy: fail-fast: false diff --git a/.github/workflows/integration-tests-slick.yml b/.github/workflows/integration-tests-slick.yml index e8a4dcb52..a482f6c49 100644 --- a/.github/workflows/integration-tests-slick.yml +++ b/.github/workflows/integration-tests-slick.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test Integration for Slick - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 9c0c15f55..fbba35a52 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -11,7 +11,7 @@ permissions: jobs: update_release_draft: - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 permissions: contents: write steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5dece8d9..e2367b24a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: # the release environment provides access to secrets required in the release process # https://github.com/akka/akka-projection/settings/environments environment: release - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 steps: - name: Checkout # https://github.com/actions/checkout/releases @@ -57,7 +57,7 @@ jobs: # the release environment provides access to secrets required in the release process # https://github.com/akka/akka-projection/settings/environments environment: release - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 steps: - name: Checkout # https://github.com/actions/checkout/releases diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 8035a9849..d636afcba 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -13,7 +13,7 @@ permissions: jobs: test: name: Build and Test - runs-on: ubuntu-23.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: From 0c02bd2d5e026fd5a95764a3604a6304193ab129 Mon Sep 17 00:00:00 2001 From: Peter Vlugter <59895+pvlugter@users.noreply.github.com> Date: Tue, 8 Aug 2023 11:54:11 +1200 Subject: [PATCH 6/6] docker-compose (v1) -> docker compose (v2) --- .github/workflows/integration-tests-r2dbc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests-r2dbc.yml b/.github/workflows/integration-tests-r2dbc.yml index a7669aaa2..bba1f91ec 100644 --- a/.github/workflows/integration-tests-r2dbc.yml +++ b/.github/workflows/integration-tests-r2dbc.yml @@ -48,7 +48,7 @@ jobs: - name: Start DB run: |- - docker-compose -f docker-files/docker-compose-postgres.yml up --wait + docker compose -f docker-files/docker-compose-postgres.yml up --wait docker exec -i postgres_db psql -U postgres -t < akka-projection-r2dbc/ddl-scripts/create_tables_postgres.sql - name: Run integration tests with with Scala and Java ${{ matrix.jdkVersion }}