Merge pull request #168 from vulcanize/feature/re-test-v1.10.19

RE-test release with correct commit hash
This commit is contained in:
Abdul Rabbani 2022-06-17 13:16:32 -04:00 committed by GitHub
commit a63640933e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 37 deletions

View File

@ -27,6 +27,10 @@ jobs:
BUILD_HOSTNAME: ${{ secrets.BUILD_HOSTNAME }} BUILD_HOSTNAME: ${{ secrets.BUILD_HOSTNAME }}
BUILD_USERNAME: ${{ secrets.BUILD_USERNAME }} BUILD_USERNAME: ${{ secrets.BUILD_USERNAME }}
BUILD_KEY: ${{ secrets.BUILD_KEY }} BUILD_KEY: ${{ secrets.BUILD_KEY }}
with:
STACK_ORCHESTRATOR_REF: "b3cb26e93b7e387d96417c81f880a3b8699b67db"
GO_ETHEREUM_REF: "d629c99d84cb8d20b89e46c1d9f852c7409829f2"
IPLD_ETH_DB_REF: "48eb594ea95763bda8e51590f105f7a2657ac6d4"
build: build:
name: Run docker build name: Run docker build
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -8,30 +8,35 @@ temp_dir=$(mktemp -d)
cd $temp_dir cd $temp_dir
git clone -b $(cat /tmp/git_head_ref) "https://github.com/$(cat /tmp/git_repository).git" git clone -b $(cat /tmp/git_head_ref) "https://github.com/$(cat /tmp/git_repository).git"
cd ipld-eth-server cd ipld-eth-server
mkdir -p out
## Remove the branch and github related info. This way future runs wont be confused. ## Remove the branch and github related info. This way future runs wont be confused.
rm -f /tmp/git_head_ref /tmp/git_repository rm -f /tmp/git_head_ref /tmp/git_repository
# Remove existing docker-tsdb directory # Setup the DB
rm -rf out/docker-tsdb/ cd $temp_dir
git clone "https://github.com/vulcanize/ipld-eth-db.git"; cd ipld-eth-db; git checkout $(cat /tmp/ipld_eth_db_ref)
# Copy over files to setup TimescaleDB # Spin Up DB using Stack Orchestrator
ID=$(docker create vulcanize/ipld-eth-db:v4.1.1-alpha) cd $temp_dir
docker cp $ID:/app/docker-tsdb out/docker-tsdb/ git clone "https://github.com/vulcanize/stack-orchestrator.git"; cd stack-orchestrator; git checkout $(cat /tmp/stack_orchestrator_ref)
docker rm -v $ID
# Spin up TimescaleDB cd ${temp_dir}/stack-orchestrator
docker-compose -f out/docker-tsdb/docker-compose.test.yml -f docker-compose.yml up ipld-eth-db echo vulcanize_ipld_eth_db=${temp_dir}/ipld-eth-db > ./config.sh
trap "docker-compose -f out/docker-tsdb/docker-compose.test.yml -f docker-compose.yml down --remove-orphans --volumes; cd $start_dir ; rm -r $temp_dir" SIGINT SIGTERM ERR
sleep 45 ## Remove existing containers if they are present
docker-compose -f docker/local/docker-compose-db-sharding.yml --env-file ./config.sh down -v --remove-orphans;
trap 'cd ${temp_dir}/stack-orchestrator; docker-compose -f docker/local/docker-compose-db-sharding.yml --env-file ./config.sh down -v --remove-orphans; ' SIGINT SIGTERM
docker-compose -f docker/local/docker-compose-db-sharding.yml --env-file ./config.sh up -d
# Remove old logs so there's no confusion, then run test # Remove old logs so there's no confusion, then run test
rm -f /tmp/test.log /tmp/return_test.txt rm -f /tmp/test.log /tmp/return_test.txt
PGPASSWORD=password DATABASE_USER=vdbm DATABASE_PORT=8066 DATABASE_PASSWORD=password DATABASE_HOSTNAME=127.0.0.1 DATABASE_NAME=vulcanize_testing_v4 make test > /tmp/test.log cd ${temp_dir}/ipld-eth-server
PGPASSWORD=password DATABASE_USER=vdbm DATABASE_PORT=8077 DATABASE_PASSWORD=password DATABASE_HOSTNAME=localhost DATABASE_NAME=vulcanize_testing make test > /tmp/test.log
echo $? > /tmp/return_test.txt echo $? > /tmp/return_test.txt
# Clean up # Clean up
docker-compose -f out/docker-tsdb/docker-compose.test.yml -f docker-compose.yml down --remove-orphans --volumes
cd ${temp_dir}/stack-orchestrator; docker-compose -f docker/local/docker-compose-db-sharding.yml --env-file ./config.sh down -v --remove-orphans
cd $start_dir cd $start_dir
rm -fr $temp_dir rm -fr $temp_dir

View File

@ -8,6 +8,16 @@ on:
required: true required: true
BUILD_KEY: BUILD_KEY:
required: true required: true
inputs:
STACK_ORCHESTRATOR_REF:
required: true
type: string
GO_ETHEREUM_REF:
required: true
type: string
IPLD_ETH_DB_REF:
required: true
type: string
jobs: jobs:
build: build:
@ -36,6 +46,8 @@ jobs:
- name: Output variables to files - name: Output variables to files
run: | run: |
echo $GITHUB_REPOSITORY > /tmp/git_repository echo $GITHUB_REPOSITORY > /tmp/git_repository
echo ${{ inputs.IPLD_ETH_DB_REF }} > /tmp/ipld_eth_db_ref
echo ${{ inputs.STACK_ORCHESTRATOR_REF }} > /tmp/stack_orchestrator_ref
[ -z "$GITHUB_HEAD_REF" ] && echo $GITHUB_REF_NAME > /tmp/git_head_ref || echo $GITHUB_HEAD_REF > /tmp/git_head_ref [ -z "$GITHUB_HEAD_REF" ] && echo $GITHUB_REF_NAME > /tmp/git_head_ref || echo $GITHUB_HEAD_REF > /tmp/git_head_ref
echo "-----BEGIN OPENSSH PRIVATE KEY-----" >> /tmp/key echo "-----BEGIN OPENSSH PRIVATE KEY-----" >> /tmp/key
echo ${{ env.BUILD_KEY }} >> /tmp/key echo ${{ env.BUILD_KEY }} >> /tmp/key
@ -43,11 +55,15 @@ jobs:
chmod 400 /tmp/key chmod 400 /tmp/key
cat /tmp/git_repository cat /tmp/git_repository
cat /tmp/git_head_ref cat /tmp/git_head_ref
cat /tmp/stack_orchestrator_ref
cat /tmp/ipld_eth_db_ref
- name: Raw SCP - name: Raw SCP
run: | run: |
scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key /tmp/git_repository ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_repository
scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key /tmp/git_head_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key /tmp/git_head_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/git_head_ref
scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key /tmp/stack_orchestrator_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/stack_orchestrator_ref
scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key /tmp/ipld_eth_db_ref ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/ipld_eth_db_ref
scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key .github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh scp -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key .github/workflows/run_unit_test.sh ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }}:/tmp/run_unit_test.sh
- name: Trigger Unit Test - name: Trigger Unit Test
@ -68,9 +84,6 @@ jobs:
integrationtest: integrationtest:
name: Run integration tests name: Run integration tests
env: env:
STACK_ORCHESTRATOR_REF: 418957a1f745c921b21286c13bb033f922a91ae9
GO_ETHEREUM_REF: "v1.10.18-statediff-4.0.2-alpha"
IPLD_ETH_DB_REF: 91d30b9ea1acecd0a7f4307390a98bf3e289b8d7
GOPATH: /tmp/go GOPATH: /tmp/go
DB_WRITE: true DB_WRITE: true
ETH_FORWARD_ETH_CALLS: false ETH_FORWARD_ETH_CALLS: false
@ -89,17 +102,17 @@ jobs:
path: "./ipld-eth-server" path: "./ipld-eth-server"
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
ref: ${{ env.STACK_ORCHESTRATOR_REF }} ref: ${{ inputs.STACK_ORCHESTRATOR_REF }}
path: "./stack-orchestrator/" path: "./stack-orchestrator/"
repository: vulcanize/stack-orchestrator repository: vulcanize/stack-orchestrator
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
ref: ${{ env.GO_ETHEREUM_REF }} ref: ${{ inputs.GO_ETHEREUM_REF }}
repository: vulcanize/go-ethereum repository: vulcanize/go-ethereum
path: "./go-ethereum/" path: "./go-ethereum/"
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
ref: ${{ env.IPLD_ETH_DB_REF }} ref: ${{ inputs.IPLD_ETH_DB_REF }}
repository: vulcanize/ipld-eth-db repository: vulcanize/ipld-eth-db
path: "./ipld-eth-db/" path: "./ipld-eth-db/"
- name: Create config file - name: Create config file
@ -112,9 +125,6 @@ jobs:
echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh
echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh
echo eth_http_path=$ETH_HTTP_PATH >> ./config.sh echo eth_http_path=$ETH_HTTP_PATH >> ./config.sh
echo ipld_eth_server_db_dependency=access-node >> ./config.sh
echo go_ethereum_db_dependency=access-node >> ./config.sh
echo connecting_db_name=vulcanize_testing_v4 >> ./config.sh
echo watched_address_gap_filler_enabled=false >> ./config.sh echo watched_address_gap_filler_enabled=false >> ./config.sh
echo watched_address_gap_filler_interval=5 >> ./config.sh echo watched_address_gap_filler_interval=5 >> ./config.sh
cat ./config.sh cat ./config.sh
@ -127,11 +137,10 @@ jobs:
- name: Run docker compose - name: Run docker compose
run: | run: |
docker-compose \ docker-compose \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-db-migration.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-db-sharding.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-timescale-db.yml" \
--env-file "$GITHUB_WORKSPACE/config.sh" \ --env-file "$GITHUB_WORKSPACE/config.sh" \
up -d --build up -d --build
- name: Test - name: Test
@ -144,9 +153,6 @@ jobs:
integrationtest_forwardethcalls: integrationtest_forwardethcalls:
name: Run integration tests for direct proxy fall-through of eth_calls name: Run integration tests for direct proxy fall-through of eth_calls
env: env:
STACK_ORCHESTRATOR_REF: 418957a1f745c921b21286c13bb033f922a91ae9
GO_ETHEREUM_REF: "v1.10.18-statediff-4.0.2-alpha"
IPLD_ETH_DB_REF: 91d30b9ea1acecd0a7f4307390a98bf3e289b8d7
GOPATH: /tmp/go GOPATH: /tmp/go
DB_WRITE: false DB_WRITE: false
ETH_FORWARD_ETH_CALLS: true ETH_FORWARD_ETH_CALLS: true
@ -165,17 +171,17 @@ jobs:
path: "./ipld-eth-server" path: "./ipld-eth-server"
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
ref: ${{ env.STACK_ORCHESTRATOR_REF }} ref: ${{ inputs.STACK_ORCHESTRATOR_REF }}
path: "./stack-orchestrator/" path: "./stack-orchestrator/"
repository: vulcanize/stack-orchestrator repository: vulcanize/stack-orchestrator
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
ref: ${{ env.GO_ETHEREUM_REF }} ref: ${{ inputs.GO_ETHEREUM_REF }}
repository: vulcanize/go-ethereum repository: vulcanize/go-ethereum
path: "./go-ethereum/" path: "./go-ethereum/"
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
ref: ${{ env.IPLD_ETH_DB_REF }} ref: ${{ inputs.IPLD_ETH_DB_REF }}
repository: vulcanize/ipld-eth-db repository: vulcanize/ipld-eth-db
path: "./ipld-eth-db/" path: "./ipld-eth-db/"
- name: Create config file - name: Create config file
@ -188,9 +194,6 @@ jobs:
echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh
echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh
echo eth_http_path=$ETH_HTTP_PATH >> ./config.sh echo eth_http_path=$ETH_HTTP_PATH >> ./config.sh
echo ipld_eth_server_db_dependency=access-node >> ./config.sh
echo go_ethereum_db_dependency=access-node >> ./config.sh
echo connecting_db_name=vulcanize_testing_v4 >> ./config.sh
echo watched_address_gap_filler_enabled=false >> ./config.sh echo watched_address_gap_filler_enabled=false >> ./config.sh
echo watched_address_gap_filler_interval=5 >> ./config.sh echo watched_address_gap_filler_interval=5 >> ./config.sh
cat ./config.sh cat ./config.sh
@ -203,11 +206,10 @@ jobs:
- name: Run docker compose - name: Run docker compose
run: | run: |
docker-compose \ docker-compose \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-db-migration.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-db-sharding.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-timescale-db.yml" \
--env-file "$GITHUB_WORKSPACE/config.sh" \ --env-file "$GITHUB_WORKSPACE/config.sh" \
up -d --build up -d --build
- name: Test - name: Test