From 7f38303930e2eff72438084c486a92c85de8addf Mon Sep 17 00:00:00 2001 From: exaby73 Date: Tue, 23 Jul 2024 13:00:55 +0530 Subject: [PATCH 01/12] fix: Rework health checks to use cypher-shell --- .github/workflows/integration-test-cluster-neo4j-5.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index 1dcaa958..42a7631d 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -53,7 +53,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server1 - --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" + --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -74,7 +74,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server2 - --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" + --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -95,7 +95,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server3 - --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" + --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -116,7 +116,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname read-server4 - --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" + --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" From 52c6e7191804194665966affcfa2c16e8ea3a169 Mon Sep 17 00:00:00 2001 From: exaby73 Date: Tue, 23 Jul 2024 13:08:42 +0530 Subject: [PATCH 02/12] chore: add database property to cypher-shell command --- .github/workflows/integration-test-cluster-neo4j-5.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index 42a7631d..65f17224 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -53,7 +53,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server1 - --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest || exit 1" + --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest -d neo4j || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -74,7 +74,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server2 - --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest || exit 1" + --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest -d neo4j || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -95,7 +95,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server3 - --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest || exit 1" + --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest -d neo4j || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -116,7 +116,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname read-server4 - --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest || exit 1" + --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest -d neo4j || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" From 6c3165d60024f3b1746e19f4d46c97f702022022 Mon Sep 17 00:00:00 2001 From: exaby73 Date: Tue, 23 Jul 2024 15:17:04 +0530 Subject: [PATCH 03/12] feat: Update health check cmd to use status endpoint --- .github/workflows/integration-test-cluster-neo4j-5.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index 65f17224..47ea8fb4 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -53,7 +53,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server1 - --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest -d neo4j || exit 1" + --health-cmd "curl -s -H 'Authorization: Basic bmVvNGo6dGVzdHRlc3Q=' localhost:7474/db/system/cluster/status | grep -q '\"healthy\":true' || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -74,7 +74,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server2 - --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest -d neo4j || exit 1" + --health-cmd "curl -s -H 'Authorization: Basic bmVvNGo6dGVzdHRlc3Q=' localhost:7474/db/system/cluster/status | grep -q '\"healthy\":true' || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -95,7 +95,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server3 - --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest -d neo4j || exit 1" + --health-cmd "curl -s -H 'Authorization: Basic bmVvNGo6dGVzdHRlc3Q=' localhost:7474/db/system/cluster/status | grep -q '\"healthy\":true' || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -116,7 +116,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname read-server4 - --health-cmd "echo 'RETURN true' | cypher-shell -u neo4j -p testtest -d neo4j || exit 1" + --health-cmd "curl -s -H 'Authorization: Basic bmVvNGo6dGVzdHRlc3Q=' localhost:7474/db/system/cluster/status | grep -q '\"healthy\":true' || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" From c14a7cff392ee3ec9f427fe3ef916490651e6805 Mon Sep 17 00:00:00 2001 From: exaby73 Date: Tue, 23 Jul 2024 15:29:12 +0530 Subject: [PATCH 04/12] wip: attempt logging in healthcheck --- .github/scripts/healthcheck.sh | 13 +++++++++++++ .../workflows/integration-test-cluster-neo4j-5.yml | 8 ++++---- 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 .github/scripts/healthcheck.sh diff --git a/.github/scripts/healthcheck.sh b/.github/scripts/healthcheck.sh new file mode 100644 index 00000000..037ea8ca --- /dev/null +++ b/.github/scripts/healthcheck.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +echo "$(date): Attempting health check..." +HEALTH_STATUS=$(curl -s -H "Authorization: Basic bmVvNGo6dGVzdHRlc3Q=" localhost:7474/db/system/cluster/status | tee /proc/1/fd/1 | grep -oP '"healthy":\s*\K[^,}]*' | sed 's/"//g') + +if [ "$HEALTH_STATUS" = "true" ]; then + echo "$(date): Neo4j is healthy!" + exit 0 +else + echo "$(date): Neo4j is not healthy yet." + exit 1 +fi diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index 47ea8fb4..af100789 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -53,7 +53,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server1 - --health-cmd "curl -s -H 'Authorization: Basic bmVvNGo6dGVzdHRlc3Q=' localhost:7474/db/system/cluster/status | grep -q '\"healthy\":true' || exit 1" + --health-cmd "../scripts/healthcheck.sh" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -74,7 +74,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server2 - --health-cmd "curl -s -H 'Authorization: Basic bmVvNGo6dGVzdHRlc3Q=' localhost:7474/db/system/cluster/status | grep -q '\"healthy\":true' || exit 1" + --health-cmd "../scripts/healthcheck.sh" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -95,7 +95,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server3 - --health-cmd "curl -s -H 'Authorization: Basic bmVvNGo6dGVzdHRlc3Q=' localhost:7474/db/system/cluster/status | grep -q '\"healthy\":true' || exit 1" + --health-cmd "../scripts/healthcheck.sh" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -116,7 +116,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname read-server4 - --health-cmd "curl -s -H 'Authorization: Basic bmVvNGo6dGVzdHRlc3Q=' localhost:7474/db/system/cluster/status | grep -q '\"healthy\":true' || exit 1" + --health-cmd "../scripts/healthcheck.sh" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" From 9b9ed3410f41e4ab952d3dcb9eb5086444b9ec12 Mon Sep 17 00:00:00 2001 From: exaby73 Date: Tue, 23 Jul 2024 16:18:08 +0530 Subject: [PATCH 05/12] revert: Healthcheck changes --- .github/scripts/healthcheck.sh | 13 ------------- .../workflows/integration-test-cluster-neo4j-5.yml | 8 ++++---- 2 files changed, 4 insertions(+), 17 deletions(-) delete mode 100644 .github/scripts/healthcheck.sh diff --git a/.github/scripts/healthcheck.sh b/.github/scripts/healthcheck.sh deleted file mode 100644 index 037ea8ca..00000000 --- a/.github/scripts/healthcheck.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -e - -echo "$(date): Attempting health check..." -HEALTH_STATUS=$(curl -s -H "Authorization: Basic bmVvNGo6dGVzdHRlc3Q=" localhost:7474/db/system/cluster/status | tee /proc/1/fd/1 | grep -oP '"healthy":\s*\K[^,}]*' | sed 's/"//g') - -if [ "$HEALTH_STATUS" = "true" ]; then - echo "$(date): Neo4j is healthy!" - exit 0 -else - echo "$(date): Neo4j is not healthy yet." - exit 1 -fi diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index af100789..1dcaa958 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -53,7 +53,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server1 - --health-cmd "../scripts/healthcheck.sh" + --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -74,7 +74,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server2 - --health-cmd "../scripts/healthcheck.sh" + --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -95,7 +95,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server3 - --health-cmd "../scripts/healthcheck.sh" + --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -116,7 +116,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname read-server4 - --health-cmd "../scripts/healthcheck.sh" + --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" From 39162eba245e310ddeee5686d06a4be756d0d8a0 Mon Sep 17 00:00:00 2001 From: exaby73 Date: Tue, 23 Jul 2024 16:40:44 +0530 Subject: [PATCH 06/12] fix: env vars --- .../integration-test-cluster-neo4j-5.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index 1dcaa958..e356435b 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -47,8 +47,8 @@ jobs: NEO4J_initial_server_mode__constraint: PRIMARY NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000 NEO4J_ACCEPT_LICENSE_AGREEMENT: yes - NEO4j_server_bolt_advertised_address: localhost:7687 - NEO4j_server_http_advertised_address: localhost:7474 + NEO4J_server_bolt_advertised_address: localhost:7687 + NEO4J_server_http_advertised_address: localhost:7474 NEO4J_PLUGINS: '["apoc"]' NEO4J_AUTH: neo4j/testtest options: >- @@ -68,8 +68,8 @@ jobs: NEO4J_initial_server_mode__constraint: PRIMARY NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000 NEO4J_ACCEPT_LICENSE_AGREEMENT: yes - NEO4j_server_bolt_advertised_address: localhost:8687 - NEO4j_server_http_advertised_address: localhost:8474 + NEO4J_server_bolt_advertised_address: localhost:8687 + NEO4J_server_http_advertised_address: localhost:8474 NEO4J_PLUGINS: '["apoc"]' NEO4J_AUTH: neo4j/testtest options: >- @@ -89,8 +89,8 @@ jobs: NEO4J_initial_server_mode__constraint: PRIMARY NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000 NEO4J_ACCEPT_LICENSE_AGREEMENT: yes - NEO4j_server_bolt_advertised_address: localhost:9687 - NEO4j_server_http_advertised_address: localhost:9474 + NEO4J_server_bolt_advertised_address: localhost:9687 + NEO4J_server_http_advertised_address: localhost:9474 NEO4J_PLUGINS: '["apoc"]' NEO4J_AUTH: neo4j/testtest options: >- @@ -110,8 +110,8 @@ jobs: NEO4J_initial_server_mode__constraint: SECONDARY NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000 NEO4J_ACCEPT_LICENSE_AGREEMENT: yes - NEO4j_server_bolt_advertised_address: localhost:10687 - NEO4j_server_http_advertised_address: localhost:10474 + NEO4J_server_bolt_advertised_address: localhost:10687 + NEO4J_server_http_advertised_address: localhost:10474 NEO4J_PLUGINS: '["apoc"]' NEO4J_AUTH: neo4j/testtest options: >- From 2da7166ccdf7f8815e02e6f80c838fcd1e888a53 Mon Sep 17 00:00:00 2001 From: exaby73 Date: Tue, 23 Jul 2024 16:47:24 +0530 Subject: [PATCH 07/12] fix: env vars --- .../integration-test-cluster-neo4j-5.yml | 16 +++++++-------- docker-compose.yml | 20 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index e356435b..2668a868 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -47,8 +47,8 @@ jobs: NEO4J_initial_server_mode__constraint: PRIMARY NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000 NEO4J_ACCEPT_LICENSE_AGREEMENT: yes - NEO4J_server_bolt_advertised_address: localhost:7687 - NEO4J_server_http_advertised_address: localhost:7474 + NEO4J_server_bolt_advertised__address: localhost:7687 + NEO4J_server_http_advertised__address: localhost:7474 NEO4J_PLUGINS: '["apoc"]' NEO4J_AUTH: neo4j/testtest options: >- @@ -68,8 +68,8 @@ jobs: NEO4J_initial_server_mode__constraint: PRIMARY NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000 NEO4J_ACCEPT_LICENSE_AGREEMENT: yes - NEO4J_server_bolt_advertised_address: localhost:8687 - NEO4J_server_http_advertised_address: localhost:8474 + NEO4J_server_bolt_advertised__address: localhost:8687 + NEO4J_server_http_advertised__address: localhost:8474 NEO4J_PLUGINS: '["apoc"]' NEO4J_AUTH: neo4j/testtest options: >- @@ -89,8 +89,8 @@ jobs: NEO4J_initial_server_mode__constraint: PRIMARY NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000 NEO4J_ACCEPT_LICENSE_AGREEMENT: yes - NEO4J_server_bolt_advertised_address: localhost:9687 - NEO4J_server_http_advertised_address: localhost:9474 + NEO4J_server_bolt_advertised__address: localhost:9687 + NEO4J_server_http_advertised__address: localhost:9474 NEO4J_PLUGINS: '["apoc"]' NEO4J_AUTH: neo4j/testtest options: >- @@ -110,8 +110,8 @@ jobs: NEO4J_initial_server_mode__constraint: SECONDARY NEO4J_dbms_cluster_discovery_endpoints: server1:5000,server2:5000,server3:5000 NEO4J_ACCEPT_LICENSE_AGREEMENT: yes - NEO4J_server_bolt_advertised_address: localhost:10687 - NEO4J_server_http_advertised_address: localhost:10474 + NEO4J_server_bolt_advertised__address: localhost:10687 + NEO4J_server_http_advertised__address: localhost:10474 NEO4J_PLUGINS: '["apoc"]' NEO4J_AUTH: neo4j/testtest options: >- diff --git a/docker-compose.yml b/docker-compose.yml index 6dbf3a8e..4345a7a8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -61,8 +61,8 @@ services: - "11474:7474" environment: <<: *common-env - NEO4j_server_bolt_advertised_address: localhost:11687 - NEO4j_server_http_advertised_address: localhost:11474 + NEO4J_server_bolt_advertised__address: localhost:11687 + NEO4J_server_http_advertised__address: localhost:11474 server1: <<: *common-cluster @@ -73,8 +73,8 @@ services: - "7474:7474" environment: <<: *common-core-env - NEO4j_server_bolt_advertised_address: localhost:7687 - NEO4j_server_http_advertised_address: localhost:7474 + NEO4J_server_bolt_advertised__address: localhost:7687 + NEO4J_server_http_advertised__address: localhost:7474 server2: <<: *common-cluster @@ -85,8 +85,8 @@ services: - "8474:7474" environment: <<: *common-core-env - NEO4j_server_bolt_advertised_address: localhost:8687 - NEO4j_server_http_advertised_address: localhost:8474 + NEO4J_server_bolt_advertised__address: localhost:8687 + NEO4J_server_http_advertised__address: localhost:8474 server3: <<: *common-cluster @@ -97,8 +97,8 @@ services: - "9687:7687" environment: <<: *common-core-env - NEO4j_server_bolt_advertised_address: localhost:9687 - NEO4j_server_http_advertised_address: localhost:9474 + NEO4J_server_bolt_advertised__address: localhost:9687 + NEO4J_server_http_advertised__address: localhost:9474 server4: <<: *common-cluster @@ -110,5 +110,5 @@ services: environment: <<: *common-cluster-env NEO4J_initial_server_mode__constraint: 'SECONDARY' - NEO4j_server_bolt_advertised_address: localhost:10687 - NEO4j_server_http_advertised_address: localhost:10474 + NEO4J_server_bolt_advertised__address: localhost:10687 + NEO4J_server_http_advertised__address: localhost:10474 From 10fd047199f41bec93dd5f186e364f75c42dabbb Mon Sep 17 00:00:00 2001 From: exaby73 Date: Tue, 23 Jul 2024 16:58:33 +0530 Subject: [PATCH 08/12] wip: Attempt to use server1 as connection --- .github/workflows/integration-test-cluster-neo4j-5.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index 2668a868..1d46c7b7 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -12,7 +12,7 @@ jobs: tests: runs-on: ubuntu-latest env: - CONNECTION: neo4j://neo4j:testtest@localhost:7687 + CONNECTION: neo4j://neo4j:testtest@server1:7687 name: "Running on PHP 8.1 with a Neo4j 5.20-enterprise cluster" steps: From 5abccfc864716c2d868f9d9a505a588f5d2552c1 Mon Sep 17 00:00:00 2001 From: exaby73 Date: Tue, 23 Jul 2024 17:30:57 +0530 Subject: [PATCH 09/12] wip: Downgrade to 5.10 --- .github/workflows/integration-test-cluster-neo4j-5.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index 1d46c7b7..4437ed26 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest env: CONNECTION: neo4j://neo4j:testtest@server1:7687 - name: "Running on PHP 8.1 with a Neo4j 5.20-enterprise cluster" + name: "Running on PHP 8.1 with a Neo4j 5.10-enterprise cluster" steps: - uses: actions/checkout@v2 @@ -38,7 +38,7 @@ jobs: services: server1: - image: neo4j:5.20-enterprise + image: neo4j:5.10-enterprise ports: - 7687:7687 - 7473:7473 @@ -59,7 +59,7 @@ jobs: --health-timeout "15s" --health-retries "5" server2: - image: neo4j:5.20-enterprise + image: neo4j:5.10-enterprise ports: - 8687:7687 - 8473:7473 @@ -80,7 +80,7 @@ jobs: --health-timeout "15s" --health-retries "5" server3: - image: neo4j:5.20-enterprise + image: neo4j:5.10-enterprise ports: - 9474:7474 - 9473:7473 @@ -101,7 +101,7 @@ jobs: --health-timeout "15s" --health-retries "5" read-server4: - image: neo4j:5.20-enterprise + image: neo4j:5.10-enterprise ports: - 10474:7474 - 10473:7473 From 510994a2ff75526a7122a26d7329ea9db58894d8 Mon Sep 17 00:00:00 2001 From: exaby73 Date: Tue, 23 Jul 2024 17:31:22 +0530 Subject: [PATCH 10/12] revert: back to localhost --- .github/workflows/integration-test-cluster-neo4j-5.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index 4437ed26..53a6e358 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -12,7 +12,7 @@ jobs: tests: runs-on: ubuntu-latest env: - CONNECTION: neo4j://neo4j:testtest@server1:7687 + CONNECTION: neo4j://neo4j:testtest@localhost:7687 name: "Running on PHP 8.1 with a Neo4j 5.10-enterprise cluster" steps: From 7573fa6a0823c2206dd39ab7bf35ea14c0561839 Mon Sep 17 00:00:00 2001 From: exaby73 Date: Tue, 23 Jul 2024 17:50:00 +0530 Subject: [PATCH 11/12] wip: Update healthcheck to reflect docker-compose.yml --- .github/workflows/integration-test-cluster-neo4j-5.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index 53a6e358..ab93247b 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -53,7 +53,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server1 - --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" + --health-cmd "wget --no-verbose --tries=1 --spider localhost:7474 || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -74,7 +74,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server2 - --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" + --health-cmd "wget --no-verbose --tries=1 --spider localhost:7474 || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -95,7 +95,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname server3 - --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" + --health-cmd "wget --no-verbose --tries=1 --spider localhost:7474 || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" @@ -116,7 +116,7 @@ jobs: NEO4J_AUTH: neo4j/testtest options: >- --hostname read-server4 - --health-cmd "wget -q --method=HEAD http://localhost:7474 || exit 1" + --health-cmd "wget --no-verbose --tries=1 --spider localhost:7474 || exit 1" --health-start-period "60s" --health-interval "30s" --health-timeout "15s" From ff55b7ecf2155f4627b29894d7d199c310122e5f Mon Sep 17 00:00:00 2001 From: exaby73 Date: Fri, 26 Jul 2024 17:38:22 +0530 Subject: [PATCH 12/12] wip: Add 60 second sleep before tests --- .github/workflows/integration-test-cluster-neo4j-5.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/integration-test-cluster-neo4j-5.yml b/.github/workflows/integration-test-cluster-neo4j-5.yml index ab93247b..e6765bf3 100644 --- a/.github/workflows/integration-test-cluster-neo4j-5.yml +++ b/.github/workflows/integration-test-cluster-neo4j-5.yml @@ -27,6 +27,8 @@ jobs: progress: yes php_version: 8.1 version: 2 + - name: Wait for 60 seconds for Neo4j cluster to start + run: echo "Sleeping for 60 seconds" && sleep 60 - uses: php-actions/phpunit@v3 with: configuration: phpunit.xml.dist