From 1b14ee11370cf61fa15f59ee0aa8bda51f97b0f4 Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Tue, 4 Jun 2024 14:40:51 +1000 Subject: [PATCH 1/5] ci: Update GitHub Actions workflow for Xatu stack --- .github/workflows/sentry-smoke-test.yaml | 54 +++++++++--------------- 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/.github/workflows/sentry-smoke-test.yaml b/.github/workflows/sentry-smoke-test.yaml index db64e19a..023f086d 100644 --- a/.github/workflows/sentry-smoke-test.yaml +++ b/.github/workflows/sentry-smoke-test.yaml @@ -18,18 +18,12 @@ jobs: run: | docker build -t ethpandaops/xatu:local . echo "Xatu image is built." - - name: Install Kurtosis - run: | - echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list - sudo apt update - sudo apt install kurtosis-cli - name: Create Kurtosis config file run: | - cat < network_params.yaml + cat < ~/network_params.yaml participants: - el_type: geth cl_type: teku - cl_image: ethpandaops/teku:master-16c4354 - el_type: nethermind cl_type: prysm - el_type: erigon @@ -56,38 +50,28 @@ jobs: - voluntary_exit - contribution_and_proof < Date: Tue, 4 Jun 2024 14:44:09 +1000 Subject: [PATCH 2/5] ci: Update wait-on command in smoke test workflow --- .github/workflows/sentry-smoke-test.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sentry-smoke-test.yaml b/.github/workflows/sentry-smoke-test.yaml index 023f086d..4662925c 100644 --- a/.github/workflows/sentry-smoke-test.yaml +++ b/.github/workflows/sentry-smoke-test.yaml @@ -67,10 +67,8 @@ jobs: run: | echo "Waiting for Xatu services to start..." wait-on: | - http://localhost:${{ env.API_PORT }} - http-get://localhost:2121 - tcp:localhost:3232 - file://very-important-secrets.txt + tcp:localhost:9001 + tcp:localhost:9000 - name: Add all xatu-sentry containers to the xatu network run: | From 507abac5c1bf0e740bcf59c24b38644dbd5fd2f0 Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Tue, 4 Jun 2024 14:51:14 +1000 Subject: [PATCH 3/5] feat: Update Kurtosis config file path --- .github/workflows/sentry-smoke-test.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sentry-smoke-test.yaml b/.github/workflows/sentry-smoke-test.yaml index 4662925c..4ee374e9 100644 --- a/.github/workflows/sentry-smoke-test.yaml +++ b/.github/workflows/sentry-smoke-test.yaml @@ -20,7 +20,7 @@ jobs: echo "Xatu image is built." - name: Create Kurtosis config file run: | - cat < ~/network_params.yaml + cat < /tmp/network_params.yaml participants: - el_type: geth cl_type: teku @@ -56,9 +56,10 @@ jobs: run: | docker compose up --detach --quiet-pull & - name: Setup kurtosis testnet and run assertoor tests + id: kurtosis-setup uses: ethpandaops/kurtosis-assertoor-github-action@v1 with: - ethereum_package_args: ~/network_params.yaml + ethereum_package_args: /tmp/network_params.yaml await_assertoor_tests: false enclave_name: xatu - uses: JarvusInnovations/background-action@v1 @@ -69,7 +70,11 @@ jobs: wait-on: | tcp:localhost:9001 tcp:localhost:9000 - + - name: Show all kurtosis containers + env: + SERVICES: ${{ steps.kurtosis-setup.outputs.services }} + run: | + echo $SERVICES - name: Add all xatu-sentry containers to the xatu network run: | for container in $(docker ps --filter name=xatu-sentry --format "{{.Names}}"); do docker network connect xatu_xatu-net $container; echo $container; docker restart $container; done From b36b91fc609e33057912bb0af162cdbf6c62c148 Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Tue, 4 Jun 2024 15:25:29 +1000 Subject: [PATCH 4/5] chore: Remove unnecessary GitHub workflow step --- .github/workflows/sentry-smoke-test.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/sentry-smoke-test.yaml b/.github/workflows/sentry-smoke-test.yaml index 4ee374e9..05461b7f 100644 --- a/.github/workflows/sentry-smoke-test.yaml +++ b/.github/workflows/sentry-smoke-test.yaml @@ -62,14 +62,6 @@ jobs: ethereum_package_args: /tmp/network_params.yaml await_assertoor_tests: false enclave_name: xatu - - uses: JarvusInnovations/background-action@v1 - name: Wait for Xatu stack to start - with: - run: | - echo "Waiting for Xatu services to start..." - wait-on: | - tcp:localhost:9001 - tcp:localhost:9000 - name: Show all kurtosis containers env: SERVICES: ${{ steps.kurtosis-setup.outputs.services }} From 845a661c6e84bfacc967553df5f00ac29a5f83d6 Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Tue, 4 Jun 2024 16:10:22 +1000 Subject: [PATCH 5/5] fix: Update ClickHouse container name in smoke test workflow --- .github/workflows/sentry-smoke-test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sentry-smoke-test.yaml b/.github/workflows/sentry-smoke-test.yaml index 05461b7f..2d1a4a94 100644 --- a/.github/workflows/sentry-smoke-test.yaml +++ b/.github/workflows/sentry-smoke-test.yaml @@ -118,7 +118,7 @@ jobs: # Check for any data in the tables before digging in to the individual sentries for table in "${tables[@]}"; do pretty_print "Checking $table table..." "none" - data_count=$(docker exec clickhouse-01 clickhouse-client --query "SELECT COUNT(*) FROM default.$table" || true) + data_count=$(docker exec xatu-clickhouse-01 clickhouse-client --query "SELECT COUNT(*) FROM default.$table" || true) if [[ $data_count -gt 0 ]]; then pretty_print "$table table has $data_count entries" "green" else @@ -134,7 +134,7 @@ jobs: for sentry in "${all_sentries[@]}"; do pretty_print "Checking $table table for $sentry..." "none" while true; do - data_count=$(docker exec clickhouse-01 clickhouse-client --query "SELECT COUNT(*) FROM default.$table WHERE meta_client_name = '$sentry'" || true) + data_count=$(docker exec xatu-clickhouse-01 clickhouse-client --query "SELECT COUNT(*) FROM default.$table WHERE meta_client_name = '$sentry'" || true) if [[ $data_count -gt 0 ]]; then pretty_print "$table has $data_count entries from $sentry" "green" break