Skip to content

Commit 8b04cf1

Browse files
authored
Fix Docker Compose tests for Feast 0.5 (#725)
* Update Docker Compose tests to Feast 0.5 * Set lower job polling rate for Docker Compose
1 parent 2d8d7ac commit 8b04cf1

6 files changed

Lines changed: 32 additions & 18 deletions

File tree

infra/docker-compose/.env.sample

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# General
22
COMPOSE_PROJECT_NAME=feast
33
FEAST_VERSION=latest
4-
FEAST_REPOSITORY_VERSION=v0.4.7
4+
FEAST_REPOSITORY_VERSION=v0.5-branch
55

66
# Feast Core
77
FEAST_CORE_IMAGE=gcr.io/kf-feast/feast-core
88
FEAST_CORE_CONFIG=direct-runner.yml
99
FEAST_CORE_GCP_SERVICE_ACCOUNT_KEY=placeholder.json
10+
FEAST_STREAM_OPTIONS_BOOTSTRAPSERVERS=kafka:9092
11+
FEAST_JOBS_POLLING_INTERVAL_MILLISECONDS=10
1012

1113
# Feast Serving Batch (BigQuery)
1214
FEAST_BATCH_SERVING_CONFIG=batch-serving.yml

infra/docker-compose/core/direct-runner.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

infra/docker-compose/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ services:
99
environment:
1010
DB_HOST: db
1111
GOOGLE_APPLICATION_CREDENTIALS: /etc/gcloud/service-accounts/key.json
12+
FEAST_STREAM_OPTIONS_BOOTSTRAPSERVERS: ${FEAST_STREAM_OPTIONS_BOOTSTRAPSERVERS}
13+
FEAST_JOBS_POLLING_INTERVAL_MILLISECONDS: ${FEAST_JOBS_POLLING_INTERVAL_MILLISECONDS}
1214
restart: on-failure
1315
depends_on:
1416
- db

infra/docker-compose/jupyter/startup.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ set -ex
55
# Clone Feast repository into Jupyter container
66
git clone -b ${FEAST_REPOSITORY_VERSION} --single-branch https://github.com/feast-dev/feast.git || true
77

8+
# Install Python dependencies
9+
make -C feast/ compile-protos-python
10+
811
# Install CI requirements (only needed for running tests)
912
pip install -r feast/sdk/python/requirements-ci.txt
1013

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
feast:
22
core-host: core
3-
core-grpc-port: 6565
4-
store:
5-
config-path: /etc/feast/store.yml
6-
jobs:
7-
store-type: REDIS
8-
store-options:
9-
host: redis
10-
port: 6379
11-
12-
grpc:
13-
port: 6566
3+
active_store: online
4+
stores:
5+
- name: online
6+
type: REDIS
7+
config:
8+
host: redis
9+
port: 6379
10+
subscriptions:
11+
- name: "*"
12+
project: "*"

infra/scripts/test-docker-compose.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ Running Docker Compose tests with pytest at 'tests/e2e'
88
============================================================
99
"
1010

11+
clean_up () {
12+
ARG=$?
13+
14+
# Shut down docker-compose images
15+
docker-compose -f docker-compose.yml -f docker-compose.online.yml down
16+
17+
# Remove configuration file
18+
rm .env
19+
20+
exit $ARG
21+
}
22+
23+
trap clean_up EXIT
24+
1125
export PROJECT_ROOT_DIR=$(git rev-parse --show-toplevel)
1226
export COMPOSE_INTERACTIVE_NO_CLI=1
1327

@@ -30,6 +44,3 @@ ${PROJECT_ROOT_DIR}/infra/scripts/wait-for-it.sh ${JUPYTER_DOCKER_CONTAINER_IP_A
3044

3145
# Run e2e tests for Redis
3246
docker exec feast_jupyter_1 bash -c 'cd feast/tests/e2e/ && pytest -s basic-ingest-redis-serving.py --core_url core:6565 --serving_url=online-serving:6566'
33-
34-
# Shut down docker-compose images
35-
docker-compose -f docker-compose.yml -f docker-compose.online.yml down

0 commit comments

Comments
 (0)