mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 04:08:01 -05:00
* feat: first commit for transaction exclusion api service * feat: removed debug logs and improved params error handling * fix: jacocoRootReport error * feat: improved json request param parsings * feat: added docker container and github workflow pipeline for transaction exclusion api * feat: added rejection stage in response and use txHash and rejectReason as primary key of tables * feat: separate database into read and write config and each with dedicated connection * fix: e2e testing error * feat: removed redundant commands in Makefile * feat: updated transaction exclusion api default image tag in compose file * feat: added metric and change param name from reasonMessage to reason * feat: added integration and unit tests and use reasonMessage for both request and response * fix: transaction-exclusion-api unit test * feat: added e2e tests and remove reasonMessage from get response and redundant codes * feat: updated README.md and removed abi file * feat: updated image version of transaction exclusion api service in compose file * feat: updated README and added more test cases * feat: updated transaction exclusion api default image tag in compose file * feat: decoupled transaction exclusion api from coordinator package * feat: removed unnecessary dependencies to prover client * feat: moved persistence:db package to jvm-libs * feat: removed migration file dir location config from transaction exclusion api * fix: db migration location for fee history integration test * changed db column name timestamp to reject_timestamp and add dto for ModuleOverflow to remove all jackson dependencies in core module * feat: rejected transaction dao and config refactoring * feat: removed repository service and using persistence retryer * feat: updated transaction exclusion api default image tag in compose file * feat: updated log and increase retry backoff delay to avoid repetitive error logs * feat: added support of list request on save method and added dto for RejectedTransaction * feat: revised gradle.build dependencies * feat: switch from shadow jar to zipped jar * feat: updated transaction exclusion api default image tag in compose file * feat: updated sql and tables and changes for PR comments * feat: improved log message for duplicate key error * feat: updated transaction exclusion api default image tag in compose file * feat: avoid redundant logs on periodic db cleanup * feat: revised request handlers plus better test assertions on insertion * fix: test case * feat: parse save method json request with jackson * feat: extracted db migrations from the coordinator and transaction-exclusion app * feat: decoupled coordinator modules from jvm-libs persistence db test module * feat: updated dockerfile of transaction-exclusion-api * feat: removed the find check before metric increment on save rejected transaction * feat: updated docker base image for tx-exclusion-api image buid and queryable window config * feat: skip migration scripts on read db instance * feat: updated more percise jvm-libs change filtering on transaction-exclusion-api * feat: updated coordinator config for geth node l2 gas pricing recipients * feat: update runners with specific version and removed the use of retry for transaction exclusion api testing * feat: add integration test for transaction exclusion app * feat: update local stack docker compose and workflow for transaction exclusion * feat: add e2e test for transaction exclusion * feat: skip the sequencer test in transaction exclusion e2e test * feat: revert sequencer config poa-block-txs-selection-max-time * feat: remove incorrect comment * feat: added explicitly assertion if tx exclusion is not defined and simplify the localStackPostgresDbOnly in build.gradle * feat: remove beforeAll in test suite with it.concurrent * feat: set coordinator config blob-compressor-version as V1_0_1 explicitly for traces-v2 * feat: update coordinator config test * feat: change default prefix not to be coordinator specific * feat: place persistence:db under jvm-libs:generic and fixed conflicts from latest main * fix: remove dependency to resolve circular dependency issue * test: switch from localStackPostgresDbOnlyComposeUp to localStackComposeUp * feat: replace GITHUB_SHA with github.event.pull_request.head.sha in computing commit tag * feat: update filter change file lists for transaction exclusion api
180 lines
6.4 KiB
YAML
180 lines
6.4 KiB
YAML
name: Reusable run e2e tests
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
commit_tag:
|
|
description: 'The commit tag to use'
|
|
required: true
|
|
type: string
|
|
untested_tag_suffix:
|
|
description: 'The untested tag suffix to use'
|
|
required: true
|
|
type: string
|
|
tracing-engine:
|
|
description: Variable option for running tests against [besu] or [geth] stack
|
|
required: true
|
|
type: string
|
|
e2e-tests-with-ssh:
|
|
description: Run end to end tests with ability to ssh into environment
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
e2e-tests-logs-dump:
|
|
description: Dump logs after running end to end tests
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
e2e-tests-containers-list:
|
|
description: List containers before starting end to end tests
|
|
required: false
|
|
type: boolean
|
|
default: true
|
|
workflow_call:
|
|
inputs:
|
|
commit_tag:
|
|
required: true
|
|
type: string
|
|
untested_tag_suffix:
|
|
required: true
|
|
type: string
|
|
tracing-engine:
|
|
description: Variable option for running tests against [besu] or [geth] stack
|
|
required: true
|
|
type: string
|
|
e2e-tests-with-ssh:
|
|
description: Run end to end tests with ability to ssh into environment
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
e2e-tests-logs-dump:
|
|
description: Dump logs after running end to end tests
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
e2e-tests-containers-list:
|
|
description: List containers before starting end to end tests
|
|
required: false
|
|
type: boolean
|
|
default: true
|
|
outputs:
|
|
tests_outcome:
|
|
value: ${{ jobs.run-e2e-tests.outputs.tests_outcome }}
|
|
secrets:
|
|
DOCKERHUB_USERNAME:
|
|
required: true
|
|
DOCKERHUB_TOKEN:
|
|
required: true
|
|
|
|
jobs:
|
|
run-e2e-tests:
|
|
env:
|
|
COORDINATOR_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
|
|
POSTMAN_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
|
|
PROVER_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
|
|
TRACES_API_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
|
|
TRANSACTION_EXCLUSION_API_TAG: ${{ inputs.commit_tag }}-${{ inputs.untested_tag_suffix }}
|
|
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
|
|
outputs:
|
|
tests_outcome: ${{ steps.run_e2e_tests.outcome }}
|
|
runs-on: [self-hosted, ubuntu-22.04, X64, large]
|
|
steps:
|
|
- name: Setup upterm session
|
|
if: ${{ inputs.e2e-tests-with-ssh }}
|
|
uses: lhotari/action-upterm@v1
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Setup nodejs environment
|
|
uses: ./.github/actions/setup-nodejs
|
|
with:
|
|
pnpm-install-options: '--frozen-lockfile --prefer-offline'
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Create directory for conflated traces
|
|
run: |
|
|
mkdir -p tmp/local/traces/v2/conflated
|
|
chmod -R a+w tmp/local/traces/v2/conflated
|
|
- name: Restore cached images
|
|
id: restore-cached-images
|
|
uses: actions/cache/restore@v4.0.2
|
|
with:
|
|
path: ~/docker-images
|
|
key: cached-images
|
|
restore-keys: |
|
|
cached-
|
|
- name: Pull all images with retry
|
|
uses: nick-fields/retry@v2
|
|
with:
|
|
max_attempts: 10
|
|
retry_on: error
|
|
retry_wait_seconds: 30
|
|
timeout_minutes: 10
|
|
command: |
|
|
make pull-all-images
|
|
- name: Spin up fresh environment with geth tracing with retry
|
|
if: ${{ inputs.tracing-engine == 'geth' }}
|
|
uses: nick-fields/retry@v2
|
|
with:
|
|
max_attempts: 10
|
|
retry_on: error
|
|
retry_wait_seconds: 30
|
|
timeout_minutes: 10
|
|
command: |
|
|
make start-all
|
|
on_retry_command: |
|
|
make clean-environment
|
|
- name: Spin up fresh environment with besu tracing with retry
|
|
if: ${{ inputs.tracing-engine == 'besu' }}
|
|
uses: nick-fields/retry@v2
|
|
with:
|
|
max_attempts: 10
|
|
retry_on: error
|
|
retry_wait_seconds: 30
|
|
timeout_minutes: 10
|
|
command: |
|
|
make start-all-traces-v2
|
|
on_retry_command: |
|
|
make clean-environment
|
|
- name: List docker containers/images
|
|
if: ${{ always() && inputs.e2e-tests-containers-list }}
|
|
continue-on-error: true
|
|
run: |
|
|
docker ps -la && docker images
|
|
docker container ls -a
|
|
- name: Run e2e tests
|
|
id: run_e2e_tests
|
|
timeout-minutes: 25
|
|
run: |
|
|
pnpm run -F e2e test:e2e:local
|
|
- name: Show e2e tests result
|
|
if: always()
|
|
run: |
|
|
echo "E2E_TESTS_RESULT: ${{ steps.run_e2e_tests.outcome }}"
|
|
- name: Dump logs
|
|
if: ${{ failure() && inputs.e2e-tests-logs-dump }}
|
|
run: |
|
|
mkdir -p docker_logs
|
|
docker ps -a >> docker_logs/docker_ps.txt
|
|
docker logs coordinator --since 1h &>> docker_logs/coordinator.txt
|
|
docker logs prover --since 1h &>> docker_logs/prover.txt
|
|
docker logs prover-v3 --since 1h &>> docker_logs/prover-v3.txt;
|
|
docker logs shomei --since 1h &>> docker_logs/shomei.txt
|
|
docker logs zkbesu-shomei --since 1h &>> docker_logs/zkbesu-shomei.txt
|
|
docker logs shomei-frontend --since 1h &>> docker_logs/shomei-frontend.txt
|
|
docker logs postman --since 1h &>> docker_logs/postman.txt
|
|
docker logs traces-node --since 1h &>> docker_logs/traces-node.txt
|
|
docker logs traces-node-v2 --since 1h &>> docker_logs/traces-node-v2.txt;
|
|
docker logs l2-node-besu --since 1h &>> docker_logs/l2-node-besu.txt;
|
|
docker logs transaction-exclusion-api --since 1h &>> docker_logs/transaction-exclusion-api.txt
|
|
docker logs sequencer --since 1h &>> docker_logs/sequencer.txt
|
|
- name: Archive debug logs
|
|
uses: actions/upload-artifact@v4
|
|
if: ${{ failure() && inputs.e2e-tests-logs-dump }}
|
|
with:
|
|
name: end-2-end-debug-logs
|
|
if-no-files-found: error
|
|
path: |
|
|
docker_logs/**/*
|