Skip to content

Commit 35a9afc

Browse files
authored
Fix docker-compose test (feast-dev#973)
* Fix docker-compose test * Address PR comments * Fix docker-compose bash script * Update flag * Update polling interval
1 parent 0b09bd9 commit 35a9afc

4 files changed

Lines changed: 21 additions & 9 deletions

File tree

.github/workflows/complete.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,11 @@ jobs:
142142
with:
143143
name: load-test-results
144144
path: load-test-output/
145+
146+
tests-docker-compose:
147+
needs: build-push-docker-images
148+
runs-on: ubuntu-latest
149+
steps:
150+
- uses: actions/checkout@v2
151+
- name: Test docker compose
152+
run: ./infra/scripts/test-docker-compose.sh ${GITHUB_SHA}

.github/workflows/master_only.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,3 @@ jobs:
5959
docker push gcr.io/kf-feast/feast-${{ matrix.component }}:latest
6060
fi
6161
fi
62-
63-
tests-docker-compose:
64-
runs-on: ubuntu-latest
65-
steps:
66-
- uses: actions/checkout@v2
67-
- name: Test docker compose
68-
run: ./infra/scripts/test-docker-compose.sh

infra/docker-compose/jobcontroller/jobcontroller.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
feast:
22
core-host: core
33
jobs:
4-
polling_interval_milliseconds: 20000
4+
polling_interval_milliseconds: 10000
55
job_update_timeout_seconds: 240
66
active_runner: direct
77
runners:

infra/scripts/test-docker-compose.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ echo "
77
Running Docker Compose tests with pytest at 'tests/e2e'
88
============================================================
99
"
10+
LATEST_GH_COMMIT_SHA=$1
1011

1112
clean_up () {
1213
ARG=$?
@@ -26,6 +27,10 @@ export COMPOSE_INTERACTIVE_NO_CLI=1
2627
cd ${PROJECT_ROOT_DIR}/infra/docker-compose/
2728
cp .env.sample .env
2829

30+
# Replace FEAST_VERSION with latest github image SHA
31+
export FEAST_VERSION=$LATEST_GH_COMMIT_SHA
32+
echo "Testing docker-compose setup with version SHA, $FEAST_VERSION."
33+
2934
# Start Docker Compose containers
3035
docker-compose up -d
3136

@@ -45,11 +50,17 @@ export FEAST_CORE_CONTAINER_IP_ADDRESS=$(docker inspect -f '{{range .NetworkSett
4550
# Wait for Feast Core to be ready
4651
${PROJECT_ROOT_DIR}/infra/scripts/wait-for-it.sh ${FEAST_CORE_CONTAINER_IP_ADDRESS}:6565 --timeout=120
4752

53+
# Get Feast Job Controller container IP address
54+
export FEAST_JOB_CONTROLLER_CONTAINER_IP_ADDRESS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' feast_jobcontroller_1)
55+
56+
# Wait for Feast Job Controller to be ready
57+
"${PROJECT_ROOT_DIR}"/infra/scripts/wait-for-it.sh ${FEAST_JOB_CONTROLLER_CONTAINER_IP_ADDRESS}:6570 --timeout=120
58+
4859
# Get Feast Online Serving container IP address
4960
export FEAST_ONLINE_SERVING_CONTAINER_IP_ADDRESS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' feast_online_serving_1)
5061

5162
# Wait for Feast Online Serving to be ready
5263
${PROJECT_ROOT_DIR}/infra/scripts/wait-for-it.sh ${FEAST_ONLINE_SERVING_CONTAINER_IP_ADDRESS}:6566 --timeout=120
5364

5465
# Run e2e tests for Redis
55-
docker exec feast_jupyter_1 bash -c 'cd /feast/tests/e2e/redis && pytest --verbose -rs basic-ingest-redis-serving.py --core_url core:6565 --serving_url=online_serving:6566 --kafka_brokers=kafka:9092'
66+
docker exec feast_jupyter_1 bash -c 'cd /feast/tests/e2e/redis && pytest --verbose -rs basic-ingest-redis-serving.py --core_url core:6565 --serving_url=online_serving:6566 --jobcontroller_url=jobcontroller:6570 --kafka_brokers=kafka:9092'

0 commit comments

Comments
 (0)