Skip to content

fix: OOM prevention - memory exhaustion protection #1495

fix: OOM prevention - memory exhaustion protection

fix: OOM prevention - memory exhaustion protection #1495

Workflow file for this run

name: PATH E2E Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
# --------------------------------------------- #
# Phase 1. Build Docker Image
# --------------------------------------------- #
build-and-test-docker-image:
name: Build & test Docker image
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export Docker image
uses: docker/build-push-action@v6
with:
build-args: |
IMAGE_TAG=path-image
GITHUB_TOKEN=${{ github.token }}
push: false
load: true
tags: path-image
- name: Test the image works
run: |
docker image ls -a
docker inspect path-image || exit 1
- name: Export image to TAR file
run: |
docker save path-image -o ${{ runner.temp }}/path-image.tar
- name: Upload artifact for use by E2E tests
uses: actions/upload-artifact@v4
with:
name: path-image
path: ${{ runner.temp }}/path-image.tar
retention-days: 1
# ------------------------------------ #
# Phase 2. E2E Tests
# ------------------------------------ #
run-e2e-tests-shannon:
name: Run E2E tests - HTTP Requests
runs-on: "ubuntu-22.04"
# TODO(@olshansky): Investigate why this job occasionally hangs indefinitely.
# Adding explicit timeout to fail fast instead of waiting for GitHub's default 6-hour timeout.
# The Go test itself has a 5min timeout (e2e/main_test.go:84), so 10min should be plenty.
timeout-minutes: 10
needs:
- build-and-test-docker-image
strategy:
matrix:
# DEV_NOTE: Add new services here if they should be tested as part of the Shannon E2E CI suite
service_id: [eth, pocket, xrplevm]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Download Docker image artifact from previous job
uses: actions/download-artifact@v4
with:
name: path-image
path: ${{ runner.temp }}
- name: Load Docker image
run: |
docker load --input ${{ runner.temp }}/path-image.tar
docker image ls -a
- name: copy Shannon E2E config
run: make config_prepare_shannon_e2e
- name: update Shannon E2E config from secrets
env:
SHANNON_GATEWAY_ADDRESS: ${{ secrets.SHANNON_GATEWAY_ADDRESS }}
SHANNON_GATEWAY_PRIVATE_KEY: ${{ secrets.SHANNON_GATEWAY_PRIVATE_KEY }}
SHANNON_OWNED_APPS_PRIVATE_KEYS: ${{ secrets.SHANNON_OWNED_APPS_PRIVATE_KEYS}}
run: ./e2e/scripts/ci/update_shannon_config_from_secrets.sh
- name: Set Docker container to log to stdout in CI environment
run: ./e2e/scripts/ci/set_docker_log.sh
- name: Run E2E test - Service ID ${{ matrix.service_id }}
# eg. make test_e2e_evm_shannon eth
run: make e2e_test ${{ matrix.service_id }}
run-e2e-tests-websockets:
name: Run E2E tests - WebSockets
runs-on: "ubuntu-22.04"
needs:
- build-and-test-docker-image
strategy:
matrix:
# DEV_NOTE: Add new services here if they should be tested as part of the Shannon E2E CI suite
service_id: [xrplevm, eth]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Download Docker image artifact from previous job
uses: actions/download-artifact@v4
with:
name: path-image
path: ${{ runner.temp }}
- name: Load Docker image
run: |
docker load --input ${{ runner.temp }}/path-image.tar
docker image ls -a
- name: copy Shannon E2E config
run: make config_prepare_shannon_e2e
- name: update Shannon E2E config from secrets
env:
SHANNON_GATEWAY_ADDRESS: ${{ secrets.SHANNON_GATEWAY_ADDRESS }}
SHANNON_GATEWAY_PRIVATE_KEY: ${{ secrets.SHANNON_GATEWAY_PRIVATE_KEY }}
SHANNON_OWNED_APPS_PRIVATE_KEYS: ${{ secrets.SHANNON_OWNED_APPS_PRIVATE_KEYS}}
run: ./e2e/scripts/ci/update_shannon_config_from_secrets.sh
- name: Set Docker container to log to stdout in CI environment
run: ./e2e/scripts/ci/set_docker_log.sh
- name: Run Websocket E2E test - Service ID ${{ matrix.service_id }}
run: make e2e_test_websocket ${{ matrix.service_id }}