Skip to content

Commit

Permalink
Merge branch 'main' into e35_fix_nil_values_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
awskii committed May 16, 2024
2 parents b704b0f + 3e93af6 commit 5dbd916
Show file tree
Hide file tree
Showing 733 changed files with 30,812 additions and 28,969 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Please make sure your contributions adhere to our coding guidelines:
(i.e. uses [gofmt](https://golang.org/cmd/gofmt/)).
* Code must be documented adhering to the official Go
[commentary](https://golang.org/doc/effective_go.html#commentary) guidelines.
* Pull requests need to be based on and opened against the `devel` branch.
* Pull requests need to be based on and opened against the `main` branch.
* Commit messages should be prefixed with the package(s) they modify.
* E.g. "eth, rpc: make trace configs optional"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check
on:
push:
branches:
- devel
- main
workflow_dispatch:

jobs:
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ name: CI
on:
push:
branches:
- devel
- alpha
- e35
- main
- 'release/**'
pull_request:
branches:
- devel
- alpha
- e35
- main
- 'release/**'
types:
- opened
Expand All @@ -34,7 +30,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
Expand Down Expand Up @@ -96,7 +92,7 @@ jobs:
uses: al-cheb/[email protected]
with:
minimum-size: 8GB
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
Expand All @@ -122,8 +118,8 @@ jobs:
run: cd erigon-lib && make test-no-fuzz

docker-build-check:
# don't run this on devel - the PR must have run it to be merged and it misleads that this pushes the docker image
if: (${{ github.event_name == 'push' || !github.event.pull_request.draft }}) && ${{ github.ref != 'refs/heads/devel' }} && ${{ github.ref != 'refs/heads/e35' }}
# don't run this on main - the PR must have run it to be merged and it misleads that this pushes the docker image
if: (${{ github.event_name == 'push' || !github.event.pull_request.draft }}) && ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-22.04

steps:
Expand All @@ -144,7 +140,7 @@ jobs:
# ubuntu-22.04
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
#
# - name: run automated testing
# run: BUILD_ERIGON=1 ./tests/automated-testing/run.sh
53 changes: 0 additions & 53 deletions .github/workflows/coverage.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/download-page.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/hive-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: AutoModality/action-clean@v1
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch git tags for "git describe"

Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ name: Manifest Check
on:
push:
branches:
- devel
- e35
- main
- 'release/**'
paths:
- 'go.mod'
pull_request:
branches:
- devel
- e35
- main
- 'release/**'
paths:
- 'go.mod'
Expand All @@ -27,7 +25,7 @@ jobs:
modified: ${{ steps.check-modified.outputs.modified }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2 # Ensures we fetch enough history to compare

Expand All @@ -45,7 +43,7 @@ jobs:
# runs-on: ${{ matrix.os }}
#
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# - uses: actions/setup-go@v4
# with:
# go-version: '1.21'
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/qa-clean-exit-block-downloading.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ name: QA - Clean exit (block downloading)
on:
push:
branches:
- 'release/**'
- main
- 'release/3.*'
pull_request:
branches:
- devel
- 'release/**'
- main
- 'release/3.*'
types:
- ready_for_review
workflow_dispatch: # Run manually

jobs:
long-running-test:
runs-on: self-hosted
runs-on: [self-hosted, Erigon3]
env:
ERIGON_REFERENCE_DATA_DIR: /opt/erigon-versions/reference-version/datadir
ERIGON_TESTBED_DATA_DIR: /opt/erigon-testbed/datadir
Expand All @@ -24,11 +26,6 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Clean Erigon Build Directory
run: |
make clean
Expand All @@ -44,7 +41,6 @@ jobs:
- name: Restore Erigon Testbed Data Directory
run: |
rm -rf $ERIGON_TESTBED_DATA_DIR/chaindata
rsync -a --delete $ERIGON_REFERENCE_DATA_DIR/ $ERIGON_TESTBED_DATA_DIR/
- name: Run Erigon, send ctrl-c and check for clean exiting
Expand All @@ -53,18 +49,19 @@ jobs:
set +e # Disable exit on error
# Run Erigon, send ctrl-c and check logs
python3 $ERIGON_QA_PATH/test_system/qa-tests/clean-exit/run_and_check_clean_exit.py ${{ github.workspace }}/build/bin $ERIGON_TESTBED_DATA_DIR $WORKING_TIME_SECONDS
python3 $ERIGON_QA_PATH/test_system/qa-tests/clean-exit/run_and_check_clean_exit.py ${{ github.workspace }}/build/bin $ERIGON_TESTBED_DATA_DIR $WORKING_TIME_SECONDS Erigon3
# Capture monitoring script exit status
test_exit_status=$?

# Save the subsection reached status
echo "::set-output name=test_executed::true"

# Clean up Erigon process if it's still running
if kill -0 $ERIGON_PID 2> /dev/null; then
echo "Terminating Erigon"
kill $ERIGON_PID
wait $ERIGON_PID
else
echo "Erigon has already terminated"
fi

# Check test runner script exit status
Expand All @@ -76,18 +73,23 @@ jobs:
echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT"
fi

- name: Delete Erigon Testbed Data Directory
if: always()
run: |
rm -rf $ERIGON_TESTBED_DATA_DIR
- name: Resume the Erigon instance dedicated to db maintenance
run: |
python3 $ERIGON_QA_PATH/test_system/db-producer/resume_production.py || true
- name: Save test results
if: always()
if: steps.test_step.outputs.test_executed == 'true'
env:
TEST_RESULT: ${{ steps.test_step.outputs.TEST_RESULT }}
run: python3 $ERIGON_QA_PATH/test_system/qa-tests/uploads/upload_test_results.py --repo erigon --commit $(git rev-parse HEAD) --test_name clean-exit-block-downloading --outcome $TEST_RESULT --result_file ${{ github.workspace }}/result.json

- name: Upload test results
if: always()
if: steps.test_step.outputs.test_executed == 'true'
uses: actions/upload-artifact@v4
with:
name: test-results
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/qa-clean-exit-snapshot-downloading.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ name: QA - Clean exit (snapshot downloading)
on:
push:
branches:
- devel
- 'release/**'
- main
- 'release/3.*'
pull_request:
branches:
- devel
- 'release/**'
- main
- 'release/3.*'
types:
- ready_for_review
workflow_dispatch: # Run manually

jobs:
long-running-test:
Expand All @@ -24,14 +25,10 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Clean Erigon Build Directory
- name: Clean Erigon Build & Data Directories
run: |
make clean
rm -rf $ERIGON_DATA_DIR
- name: Build Erigon
run: |
Expand All @@ -48,23 +45,21 @@ jobs:
set +e # Disable exit on error
# Run Erigon, send ctrl-c and check logs
python3 $ERIGON_QA_PATH/test_system/qa-tests/clean-exit/run_and_check_clean_exit.py ${{ github.workspace }}/build/bin $ERIGON_DATA_DIR $WORKING_TIME_SECONDS
python3 $ERIGON_QA_PATH/test_system/qa-tests/clean-exit/run_and_check_clean_exit.py ${{ github.workspace }}/build/bin $ERIGON_DATA_DIR $WORKING_TIME_SECONDS Erigon3
# Capture monitoring script exit status
test_exit_status=$?

# Save the subsection reached status
echo "::set-output name=test_executed::true"

# Clean up Erigon process if it's still running
if kill -0 $ERIGON_PID 2> /dev/null; then
echo "Terminating Erigon"
kill $ERIGON_PID
wait $ERIGON_PID
else
echo "Erigon has already terminated"
fi

# Clean up Erigon build and data directories
rm -rf $ERIGON_DATA_DIR

# Check test runner script exit status
if [ $test_exit_status -eq 0 ]; then
echo "Tests completed successfully"
Expand All @@ -74,18 +69,23 @@ jobs:
echo "TEST_RESULT=failure" >> "$GITHUB_OUTPUT"
fi

- name: Clean up Erigon data directory
if: always()
run: |
rm -rf $ERIGON_DATA_DIR
- name: Resume the Erigon instance dedicated to db maintenance
run: |
python3 $ERIGON_QA_PATH/test_system/db-producer/resume_production.py || true
- name: Save test results
if: always()
if: steps.test_step.outputs.test_executed == 'true'
env:
TEST_RESULT: ${{ steps.test_step.outputs.TEST_RESULT }}
run: python3 $ERIGON_QA_PATH/test_system/qa-tests/uploads/upload_test_results.py --repo erigon --commit $(git rev-parse HEAD) --test_name clean-exit-snapshot-downloading --outcome $TEST_RESULT --result_file ${{ github.workspace }}/result.json

- name: Upload test results
if: always()
if: steps.test_step.outputs.test_executed == 'true'
uses: actions/upload-artifact@v4
with:
name: test-results
Expand Down
Loading

0 comments on commit 5dbd916

Please sign in to comment.