Skip to content

Commit 8df416c

Browse files
hanabi1224elmattic
andauthored
fix(ci): run offline RPC checks in sequence to mitigate OOM issue (#5569)
Co-authored-by: Guillaume Potier <elmattic@users.noreply.github.com>
1 parent deb4860 commit 8df416c

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

scripts/tests/api_compare/docker-compose.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,13 @@ services:
111111
echo $MINER_WORKER_KEY | forest-wallet --remote-wallet import
112112
api-serve:
113113
profiles:
114-
- offline-rpc-server
114+
- include-offline-rpc
115115
depends_on:
116116
init:
117117
condition: service_completed_successfully
118+
# Run offline RPC tests in sequence to mitigate OOM issue on CI
119+
api-compare:
120+
condition: service_completed_successfully
118121
build:
119122
context: ../../../.
120123
dockerfile: ${FOREST_DOCKERFILE_OVERRIDE:-Dockerfile}
@@ -126,6 +129,7 @@ services:
126129
environment:
127130
- FIL_PROOFS_PARAMETER_CACHE=${FIL_PROOFS_PARAMETER_CACHE}
128131
- FULLNODE_API_INFO=/dns/api-serve/tcp/${FOREST_OFFLINE_RPC_PORT}/http
132+
- FOREST_ETH_MAPPINGS_RANGE=300
129133
entrypoint: [ "/bin/bash", "-c" ]
130134
command:
131135
- |
@@ -236,9 +240,10 @@ services:
236240
--filter-file /data/filter-list \
237241
--miner-address ${MINER_ADDRESS} \
238242
--worker-address ${MINER_WORKER_ADDRESS}
243+
FULLNODE_API_INFO=$$FOREST_API_INFO forest-cli shutdown --force
239244
api-compare-offline:
240245
profiles:
241-
- offline-rpc-server
246+
- include-offline-rpc
242247
depends_on:
243248
lotus-sync-wait:
244249
condition: service_completed_successfully
@@ -267,6 +272,7 @@ services:
267272
--lotus $$LOTUS_API_INFO \
268273
--n-tipsets 5 \
269274
--filter-file /data/filter-list-offline
275+
FULLNODE_API_INFO=$$FOREST_API_INFO forest-cli shutdown --force
270276
post-setup:
271277
depends_on:
272278
api-compare:
@@ -281,7 +287,7 @@ services:
281287
echo "Success"
282288
post-setup-offline:
283289
profiles:
284-
- offline-rpc-server
290+
- include-offline-rpc
285291
depends_on:
286292
api-compare-offline:
287293
condition: service_completed_successfully

scripts/tests/api_compare/setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pushd "${PARENT_PATH}"
1010
source .env
1111

1212
# This should not be needed in GH. It is useful for running locally.
13-
docker compose down --remove-orphans
13+
docker compose --profile include-offline-rpc down --remove-orphans
1414
docker compose rm -f
1515
# Cleanup data volumes
1616
# docker volume rm -f api_compare_node-data
@@ -19,6 +19,6 @@ docker compose rm -f
1919
# Ideally, we could use `--wait` and `--wait-timeout` to wait for services
2020
# to be up. However, `compose` does not distinct between services and
2121
# init containers. See more: https://github.com/docker/compose/issues/10596
22-
docker compose up --build --force-recreate --detach --timestamps
22+
docker compose --profile include-offline-rpc up --build --force-recreate --detach --timestamps
2323

2424
popd

0 commit comments

Comments
 (0)