From 0d4f4509c8190647859d06b065862b9da0c4cbd8 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Thu, 1 Aug 2024 02:28:05 +0000 Subject: [PATCH] Remove Eth fixturenet workflows (#906) Deletes the now-failing CI workflows for the old `fixturenet-eth` and `fixturenet-plugeth` stacks. Part of https://git.vdb.to/cerc-io/stack-orchestrator/issues/905. Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/906 Reviewed-by: David Boreham --- .../fixturenet-eth-plugeth-arm-test.yml | 57 ------------- .../workflows/fixturenet-eth-plugeth-test.yml | 57 ------------- .gitea/workflows/fixturenet-eth-test.yml | 55 ------------- .../triggers/fixturenet-eth-plugeth-arm-test | 2 - .../triggers/fixturenet-eth-plugeth-test | 3 - .gitea/workflows/triggers/fixturenet-eth-test | 2 - tests/fixturenet-eth-plugeth/run-test.sh | 44 ---------- tests/fixturenet-eth/run-test.sh | 80 ------------------- 8 files changed, 300 deletions(-) delete mode 100644 .gitea/workflows/fixturenet-eth-plugeth-arm-test.yml delete mode 100644 .gitea/workflows/fixturenet-eth-plugeth-test.yml delete mode 100644 .gitea/workflows/fixturenet-eth-test.yml delete mode 100644 .gitea/workflows/triggers/fixturenet-eth-plugeth-arm-test delete mode 100644 .gitea/workflows/triggers/fixturenet-eth-plugeth-test delete mode 100644 .gitea/workflows/triggers/fixturenet-eth-test delete mode 100755 tests/fixturenet-eth-plugeth/run-test.sh delete mode 100755 tests/fixturenet-eth/run-test.sh diff --git a/.gitea/workflows/fixturenet-eth-plugeth-arm-test.yml b/.gitea/workflows/fixturenet-eth-plugeth-arm-test.yml deleted file mode 100644 index 4117c679..00000000 --- a/.gitea/workflows/fixturenet-eth-plugeth-arm-test.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Fixturenet-Eth-Plugeth-Arm-Test - -on: - push: - branches: '*' - paths: - - '!**' - - '.gitea/workflows/triggers/fixturenet-eth-plugeth-arm-test' - schedule: # Note: coordinate with other tests to not overload runners at the same time of day - - cron: '2 14 * * *' - - -jobs: - test: - name: "Run an Ethereum plugeth fixturenet test" - runs-on: ubuntu-latest-arm - steps: - - name: "Clone project repository" - uses: actions/checkout@v3 - # At present the stock setup-python action fails on Linux/aarch64 - # Conditional steps below workaroud this by using deadsnakes for that case only - - name: "Install Python for ARM on Linux" - if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }} - uses: deadsnakes/action@v3.0.1 - with: - python-version: '3.8' - - name: "Install Python cases other than ARM on Linux" - if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }} - uses: actions/setup-python@v4 - with: - python-version: '3.8' - - name: "Print Python version" - run: python3 --version - - name: "Install shiv" - run: pip install shiv - - name: "Generate build version file" - run: ./scripts/create_build_tag_file.sh - - name: "Build local shiv package" - run: ./scripts/build_shiv_package.sh - - name: "Run fixturenet-eth tests" - run: ./tests/fixturenet-eth-plugeth/run-test.sh - - name: Notify Vulcanize Slack on CI failure - if: ${{ always() && github.ref_name == 'main' }} - uses: ravsamhq/notify-slack-action@v2 - with: - status: ${{ job.status }} - notify_when: 'failure' - env: - SLACK_WEBHOOK_URL: ${{ secrets.VULCANIZE_SLACK_CI_ALERTS }} - - name: Notify DeepStack Slack on CI failure - if: ${{ always() && github.ref_name == 'main' }} - uses: ravsamhq/notify-slack-action@v2 - with: - status: ${{ job.status }} - notify_when: 'failure' - env: - SLACK_WEBHOOK_URL: ${{ secrets.DEEPSTACK_SLACK_CI_ALERTS }} diff --git a/.gitea/workflows/fixturenet-eth-plugeth-test.yml b/.gitea/workflows/fixturenet-eth-plugeth-test.yml deleted file mode 100644 index 1ac20e30..00000000 --- a/.gitea/workflows/fixturenet-eth-plugeth-test.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Fixturenet-Eth-Plugeth-Test - -on: - push: - branches: '*' - paths: - - '!**' - - '.gitea/workflows/triggers/fixturenet-eth-plugeth-test' - schedule: # Note: coordinate with other tests to not overload runners at the same time of day - - cron: '2 14 * * *' - - -jobs: - test: - name: "Run an Ethereum plugeth fixturenet test" - runs-on: ubuntu-latest - steps: - - name: "Clone project repository" - uses: actions/checkout@v3 - # At present the stock setup-python action fails on Linux/aarch64 - # Conditional steps below workaroud this by using deadsnakes for that case only - - name: "Install Python for ARM on Linux" - if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }} - uses: deadsnakes/action@v3.0.1 - with: - python-version: '3.8' - - name: "Install Python cases other than ARM on Linux" - if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }} - uses: actions/setup-python@v4 - with: - python-version: '3.8' - - name: "Print Python version" - run: python3 --version - - name: "Install shiv" - run: pip install shiv - - name: "Generate build version file" - run: ./scripts/create_build_tag_file.sh - - name: "Build local shiv package" - run: ./scripts/build_shiv_package.sh - - name: "Run fixturenet-eth tests" - run: ./tests/fixturenet-eth-plugeth/run-test.sh - - name: Notify Vulcanize Slack on CI failure - if: ${{ always() && github.ref_name == 'main' }} - uses: ravsamhq/notify-slack-action@v2 - with: - status: ${{ job.status }} - notify_when: 'failure' - env: - SLACK_WEBHOOK_URL: ${{ secrets.VULCANIZE_SLACK_CI_ALERTS }} - - name: Notify DeepStack Slack on CI failure - if: ${{ always() && github.ref_name == 'main' }} - uses: ravsamhq/notify-slack-action@v2 - with: - status: ${{ job.status }} - notify_when: 'failure' - env: - SLACK_WEBHOOK_URL: ${{ secrets.DEEPSTACK_SLACK_CI_ALERTS }} diff --git a/.gitea/workflows/fixturenet-eth-test.yml b/.gitea/workflows/fixturenet-eth-test.yml deleted file mode 100644 index 4d0f3503..00000000 --- a/.gitea/workflows/fixturenet-eth-test.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Fixturenet-Eth-Test - -on: - push: - branches: '*' - paths: - - '!**' - - '.gitea/workflows/triggers/fixturenet-eth-test' - - -jobs: - test: - name: "Run an Ethereum fixturenet test" - runs-on: ubuntu-latest - steps: - - name: "Clone project repository" - uses: actions/checkout@v3 - # At present the stock setup-python action fails on Linux/aarch64 - # Conditional steps below workaroud this by using deadsnakes for that case only - - name: "Install Python for ARM on Linux" - if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }} - uses: deadsnakes/action@v3.0.1 - with: - python-version: '3.8' - - name: "Install Python cases other than ARM on Linux" - if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }} - uses: actions/setup-python@v4 - with: - python-version: '3.8' - - name: "Print Python version" - run: python3 --version - - name: "Install shiv" - run: pip install shiv - - name: "Generate build version file" - run: ./scripts/create_build_tag_file.sh - - name: "Build local shiv package" - run: ./scripts/build_shiv_package.sh - - name: "Run fixturenet-eth tests" - run: ./tests/fixturenet-eth/run-test.sh - - name: Notify Vulcanize Slack on CI failure - if: ${{ always() && github.ref_name == 'main' }} - uses: ravsamhq/notify-slack-action@v2 - with: - status: ${{ job.status }} - notify_when: 'failure' - env: - SLACK_WEBHOOK_URL: ${{ secrets.VULCANIZE_SLACK_CI_ALERTS }} - - name: Notify DeepStack Slack on CI failure - if: ${{ always() && github.ref_name == 'main' }} - uses: ravsamhq/notify-slack-action@v2 - with: - status: ${{ job.status }} - notify_when: 'failure' - env: - SLACK_WEBHOOK_URL: ${{ secrets.DEEPSTACK_SLACK_CI_ALERTS }} diff --git a/.gitea/workflows/triggers/fixturenet-eth-plugeth-arm-test b/.gitea/workflows/triggers/fixturenet-eth-plugeth-arm-test deleted file mode 100644 index 0e6e5d1e..00000000 --- a/.gitea/workflows/triggers/fixturenet-eth-plugeth-arm-test +++ /dev/null @@ -1,2 +0,0 @@ -Change this file to trigger running the fixturenet-eth-plugeth-arm-test CI job - diff --git a/.gitea/workflows/triggers/fixturenet-eth-plugeth-test b/.gitea/workflows/triggers/fixturenet-eth-plugeth-test deleted file mode 100644 index ca2c643e..00000000 --- a/.gitea/workflows/triggers/fixturenet-eth-plugeth-test +++ /dev/null @@ -1,3 +0,0 @@ -Change this file to trigger running the fixturenet-eth-plugeth-test CI job -trigger -trigger diff --git a/.gitea/workflows/triggers/fixturenet-eth-test b/.gitea/workflows/triggers/fixturenet-eth-test deleted file mode 100644 index 7d12834e..00000000 --- a/.gitea/workflows/triggers/fixturenet-eth-test +++ /dev/null @@ -1,2 +0,0 @@ -Change this file to trigger running the fixturenet-eth-test CI job - diff --git a/tests/fixturenet-eth-plugeth/run-test.sh b/tests/fixturenet-eth-plugeth/run-test.sh deleted file mode 100755 index 1a961b56..00000000 --- a/tests/fixturenet-eth-plugeth/run-test.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -set -e -if [ -n "$CERC_SCRIPT_DEBUG" ]; then - set -x -fi -set -e -echo "Running stack-orchestrator Ethereum plugeth fixturenet test" -# Bit of a hack, test the most recent package -TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 ) -CERC_STACK_NAME=fixturenet-plugeth-tx -# Set a new unique repo dir -export CERC_REPO_BASE_DIR=$(mktemp -d stack-orchestrator-fixturenet-eth-test.XXXXXXXXXX) -echo "Testing this package: $TEST_TARGET_SO" -echo "Test version command" -reported_version_string=$( $TEST_TARGET_SO version ) -echo "Version reported is: ${reported_version_string}" -echo "Cloning repositories into: $CERC_REPO_BASE_DIR" -$TEST_TARGET_SO --stack $CERC_STACK_NAME setup-repositories -echo "Building containers" -$TEST_TARGET_SO --stack $CERC_STACK_NAME build-containers -echo "Images in registry:" -docker image ls -echo "Deploying the cluster" -$TEST_TARGET_SO --stack $CERC_STACK_NAME deploy up -# Verify that the fixturenet is up and running -$TEST_TARGET_SO --stack $CERC_STACK_NAME deploy ps -$TEST_TARGET_SO --stack $CERC_STACK_NAME deploy exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh -initial_block_number=$($TEST_TARGET_SO --stack fixturenet-plugeth-tx deploy exec foundry "cast block-number") -# Check that the block number increases some time later -sleep 12 -subsequent_block_number=$($TEST_TARGET_SO --stack $CERC_STACK_NAME deploy exec foundry "cast block-number") -block_number_difference=$((subsequent_block_number - initial_block_number)) -# Block height difference should be between 1 and some small number -if [[ $block_number_difference -gt 1 && $block_number_difference -lt 10 ]]; then - echo "Test passed" - test_result=0 -else - echo "Test failed: block numbers were ${initial_block_number} and ${subsequent_block_number}" - test_result=1 -fi -$TEST_TARGET_SO --stack $CERC_STACK_NAME deploy down -echo "Removing cloned repositories" -rm -rf $CERC_REPO_BASE_DIR -exit $test_result diff --git a/tests/fixturenet-eth/run-test.sh b/tests/fixturenet-eth/run-test.sh deleted file mode 100755 index 743880e6..00000000 --- a/tests/fixturenet-eth/run-test.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env bash -set -e -if [ -n "$CERC_SCRIPT_DEBUG" ]; then - set -x -fi - -echo "$(date +"%Y-%m-%d %T"): Running stack-orchestrator Ethereum fixturenet test" -# Bit of a hack, test the most recent package -TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 ) -# Set a new unique repo dir -export CERC_REPO_BASE_DIR=$(mktemp -d stack-orchestrator-fixturenet-eth-test.XXXXXXXXXX) -echo "$(date +"%Y-%m-%d %T"): Testing this package: $TEST_TARGET_SO" -echo "$(date +"%Y-%m-%d %T"): Test version command" -reported_version_string=$( $TEST_TARGET_SO version ) -echo "$(date +"%Y-%m-%d %T"): Version reported is: ${reported_version_string}" -echo "$(date +"%Y-%m-%d %T"): Cloning repositories into: $CERC_REPO_BASE_DIR" -$TEST_TARGET_SO --stack fixturenet-eth setup-repositories -echo "$(date +"%Y-%m-%d %T"): Building containers" -$TEST_TARGET_SO --stack fixturenet-eth build-containers -echo "$(date +"%Y-%m-%d %T"): Starting stack" -$TEST_TARGET_SO --stack fixturenet-eth deploy up -echo "$(date +"%Y-%m-%d %T"): Stack started" -# Verify that the fixturenet is up and running -$TEST_TARGET_SO --stack fixturenet-eth deploy ps -# echo "$(date +"%Y-%m-%d %T"): Getting stack status" -# $TEST_TARGET_SO --stack fixturenet-eth deploy exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh - -timeout=900 # 15 minutes -echo "$(date +"%Y-%m-%d %T"): Getting initial block number. Timeout set to $timeout seconds" -start_time=$(date +%s) -elapsed_time=0 -initial_block_number=0 -while [ "$initial_block_number" -eq 0 ] && [ $elapsed_time -lt $timeout ]; do - sleep 10 - echo "$(date +"%Y-%m-%d %T"): Waiting for initial block..." - initial_block_number=$($TEST_TARGET_SO --stack fixturenet-eth deploy exec foundry "cast block-number") - current_time=$(date +%s) - elapsed_time=$((current_time - start_time)) -done - -subsequent_block_number=$initial_block_number - -# if initial block was 0 after timeout, assume chain did not start successfully and skip finding subsequent block -if [[ $initial_block_number -gt 0 ]]; then - timeout=300 - echo "$(date +"%Y-%m-%d %T"): Getting subsequent block number. Timeout set to $timeout seconds" - start_time=$(date +%s) - elapsed_time=0 - # wait for 5 blocks or timeout - while [ "$subsequent_block_number" -le $((initial_block_number + 5)) ] && [ $elapsed_time -lt $timeout ]; do - sleep 10 - echo "$(date +"%Y-%m-%d %T"): Waiting for five blocks or $timeout seconds..." - subsequent_block_number=$($TEST_TARGET_SO --stack fixturenet-eth deploy exec foundry "cast block-number") - current_time=$(date +%s) - elapsed_time=$((current_time - start_time)) - done -fi - -# will return 0 if either of the above loops timed out -block_number_difference=$((subsequent_block_number - initial_block_number)) - -echo "$(date +"%Y-%m-%d %T"): Results of block height queries:" -echo "Initial block height: $initial_block_number" -echo "Subsequent block height: $subsequent_block_number" - -# Block height difference should be between 1 and some small number -if [[ $block_number_difference -gt 1 && $block_number_difference -lt 100 ]]; then - echo "Test passed" - test_result=0 -else - echo "Test failed: block numbers were ${initial_block_number} and ${subsequent_block_number}" - echo "Logs from stack:" - $TEST_TARGET_SO --stack fixturenet-eth deploy logs - test_result=1 -fi -$TEST_TARGET_SO --stack fixturenet-eth deploy down --delete-volumes -echo "$(date +"%Y-%m-%d %T"): Removing cloned repositories" -rm -rf $CERC_REPO_BASE_DIR -echo "$(date +"%Y-%m-%d %T"): Test finished" -exit $test_result