-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: test metrics for proxy passing env
- Loading branch information
Showing
5 changed files
with
53 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,22 +14,18 @@ jobs: | |
go-version: "1.21" | ||
check-latest: true | ||
cache: false | ||
- name: Set environment variable | ||
run: echo "METRIC_DATABASE_ENABLED=false" >> $GITHUB_ENV | ||
- name: pull pre-built images | ||
run: sudo docker compose -f ci.docker-compose.yml pull | ||
- name: check env vars | ||
run: sudo echo "METRIC_DATABASE_ENABLED=$METRIC_DATABASE_ENABLED" | ||
run: sudo docker compose -f ci.docker-compose.yml -f ci.docker-compose-no-metrics-proxy.yml pull | ||
- name: build and start proxy service and it's dependencies | ||
run: sudo docker compose -f ci.docker-compose.yml up -d --build proxy redis | ||
run: sudo docker compose -f ci.docker-compose.yml -f ci.docker-compose-no-metrics-proxy.yml up -d --build proxy redis | ||
- name: wait for proxy service to be running | ||
run: bash ${GITHUB_WORKSPACE}/scripts/wait-for-proxy-service-running.sh | ||
env: | ||
PROXY_CONTAINER_PORT: 7777 | ||
- name: run e2e tests | ||
run: SKIP_METRICS=true make e2e-test | ||
- name: print proxy service logs | ||
run: sudo docker compose -f ci.docker-compose.yml logs proxy | ||
run: sudo docker compose -f ci.docker-compose-no-metrics-proxy.yml logs proxy | ||
# because we especially want the logs if the test(s) fail 😅 | ||
if: always() | ||
# Finally, "Post Run jpribyl/[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ jobs: | |
check-latest: true | ||
cache: true | ||
- name: pull pre-built images | ||
run: sudo docker compose -f ci.docker-compose.yml pull | ||
run: sudo docker compose -f ci.docker-compose.yml -f ci.docker-compose-proxy.yml pull | ||
# In this step, this action saves a list of existing images, | ||
# the cache is created without them in the post run. | ||
# It also restores the cache if it exists. | ||
|
@@ -25,7 +25,7 @@ jobs: | |
# Ignore the failure of a step and avoid terminating the job. | ||
continue-on-error: true | ||
- name: build and start proxy service and it's dependencies | ||
run: sudo docker compose -f ci.docker-compose.yml up -d --build | ||
run: sudo docker compose -f ci.docker-compose.yml -f ci.docker-compose-proxy.yml up -d --build | ||
- name: wait for proxy service to be running | ||
run: bash ${GITHUB_WORKSPACE}/scripts/wait-for-proxy-service-running.sh | ||
env: | ||
|
@@ -39,7 +39,7 @@ jobs: | |
- name: run e2e tests | ||
run: make e2e-test | ||
- name: print proxy service logs | ||
run: sudo docker compose -f ci.docker-compose.yml logs proxy | ||
run: sudo docker compose -f ci.docker-compose-proxy.yml logs proxy | ||
# because we especially want the logs if the test(s) fail 😅 | ||
if: always() | ||
# Finally, "Post Run jpribyl/[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
services: | ||
# run proxy service to observe, route, and scale requests to kava api endpoints | ||
proxy: | ||
build: | ||
dockerfile: ci.Dockerfile | ||
env_file: .env | ||
environment: | ||
METRIC_DATABASE_ENABLED: "false" | ||
PROXY_HEIGHT_BASED_ROUTING_ENABLED: "true" | ||
PROXY_SHARDED_ROUTING_ENABLED: "true" | ||
# use public testnet as backend origin server to avoid having | ||
# to self-host a beefy Github Action runner | ||
# to build and run a kava node each execution | ||
PROXY_BACKEND_HOST_URL_MAP: localhost:7777>https://evmrpcdata.internal.testnet.proxy.kava.io,localhost:7778>https://evmrpc.internal.testnet.proxy.kava.io | ||
PROXY_PRUNING_BACKEND_HOST_URL_MAP: localhost:7777>https://evmrpc.internal.testnet.proxy.kava.io | ||
# fake the shards by defining shards with existing backends | ||
PROXY_SHARD_BACKEND_HOST_URL_MAP: localhost:7777>10|https://evmrpcdata.internal.testnet.proxy.kava.io|20|https://evmrpcdata.internal.testnet.proxy.kava.io | ||
EVM_QUERY_SERVICE_URL: https://evmrpc.internal.testnet.proxy.kava.io | ||
ports: | ||
- "${PROXY_HOST_PORT}:${PROXY_CONTAINER_PORT}" | ||
- "${TEST_UNCONFIGURED_PROXY_PORT}:${PROXY_CONTAINER_PORT}" | ||
- "${PROXY_CONTAINER_EVM_RPC_PRUNING_PORT}:${PROXY_CONTAINER_PORT}" | ||
- "${PROXY_HOST_DEBUG_PORT}:${PROXY_CONTAINER_DEBUG_PORT}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
services: | ||
# run proxy service to observe, route, and scale requests to kava api endpoints | ||
proxy: | ||
build: | ||
dockerfile: ci.Dockerfile | ||
env_file: .env | ||
environment: | ||
PROXY_HEIGHT_BASED_ROUTING_ENABLED: "true" | ||
PROXY_SHARDED_ROUTING_ENABLED: "true" | ||
# use public testnet as backend origin server to avoid having | ||
# to self-host a beefy Github Action runner | ||
# to build and run a kava node each execution | ||
PROXY_BACKEND_HOST_URL_MAP: localhost:7777>https://evmrpcdata.internal.testnet.proxy.kava.io,localhost:7778>https://evmrpc.internal.testnet.proxy.kava.io | ||
PROXY_PRUNING_BACKEND_HOST_URL_MAP: localhost:7777>https://evmrpc.internal.testnet.proxy.kava.io | ||
# fake the shards by defining shards with existing backends | ||
PROXY_SHARD_BACKEND_HOST_URL_MAP: localhost:7777>10|https://evmrpcdata.internal.testnet.proxy.kava.io|20|https://evmrpcdata.internal.testnet.proxy.kava.io | ||
EVM_QUERY_SERVICE_URL: https://evmrpc.internal.testnet.proxy.kava.io | ||
ports: | ||
- "${PROXY_HOST_PORT}:${PROXY_CONTAINER_PORT}" | ||
- "${TEST_UNCONFIGURED_PROXY_PORT}:${PROXY_CONTAINER_PORT}" | ||
- "${PROXY_CONTAINER_EVM_RPC_PRUNING_PORT}:${PROXY_CONTAINER_PORT}" | ||
- "${PROXY_HOST_DEBUG_PORT}:${PROXY_CONTAINER_DEBUG_PORT}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters