From e5acd65a9734cf145a1deab18130f25837653c7e Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Fri, 22 May 2020 14:11:41 +0800 Subject: [PATCH 1/5] Fix poll interface of docker compose interval causing timeout errors in test The poll interval of Feast core was set at 10ms. As a result, feast core hogged CPU time from the rest of test code/serving, resulting in nodeterministic timeouts. This changes the poll interval of Feast Core in the Docker Compose test to 30s --- infra/docker-compose/.env.sample | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infra/docker-compose/.env.sample b/infra/docker-compose/.env.sample index f3de7330630..786c00f5a7c 100644 --- a/infra/docker-compose/.env.sample +++ b/infra/docker-compose/.env.sample @@ -8,7 +8,7 @@ FEAST_CORE_IMAGE=gcr.io/kf-feast/feast-core FEAST_CORE_CONFIG=direct-runner.yml FEAST_CORE_GCP_SERVICE_ACCOUNT_KEY=placeholder.json FEAST_STREAM_OPTIONS_BOOTSTRAPSERVERS=kafka:9092 -FEAST_JOBS_POLLING_INTERVAL_MILLISECONDS=10 +FEAST_JOBS_POLLING_INTERVAL_MILLISECONDS=30000 # Feast Serving Batch (BigQuery) FEAST_BATCH_SERVING_CONFIG=batch-serving.yml @@ -22,4 +22,4 @@ FEAST_ONLINE_SERVING_CONFIG=online-serving.yml FEAST_ONLINE_STORE_CONFIG=redis-store.yml # Jupyter -FEAST_JUPYTER_GCP_SERVICE_ACCOUNT_KEY=placeholder.json \ No newline at end of file +FEAST_JUPYTER_GCP_SERVICE_ACCOUNT_KEY=placeholder.json From 6e687bfd3206c210f25e3e2d4ec6b4b3790d3f89 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Fri, 22 May 2020 14:17:57 +0800 Subject: [PATCH 2/5] Remove old v0.4 unused config from docker-compose setup --- infra/docker-compose/.env.sample | 2 -- infra/docker-compose/docker-compose.batch.yml | 3 +-- infra/docker-compose/docker-compose.online.yml | 3 +-- infra/docker-compose/serving/bq-store.yml | 9 --------- infra/docker-compose/serving/redis-store.yml | 9 --------- 5 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 infra/docker-compose/serving/bq-store.yml delete mode 100644 infra/docker-compose/serving/redis-store.yml diff --git a/infra/docker-compose/.env.sample b/infra/docker-compose/.env.sample index 786c00f5a7c..c8073eb5696 100644 --- a/infra/docker-compose/.env.sample +++ b/infra/docker-compose/.env.sample @@ -12,14 +12,12 @@ FEAST_JOBS_POLLING_INTERVAL_MILLISECONDS=30000 # Feast Serving Batch (BigQuery) FEAST_BATCH_SERVING_CONFIG=batch-serving.yml -FEAST_BATCH_STORE_CONFIG=bq-store.yml FEAST_BATCH_SERVING_GCP_SERVICE_ACCOUNT_KEY=placeholder.json FEAST_BATCH_JOB_STAGING_LOCATION=gs://your-gcs-bucket/staging # Feast Serving Online (Redis) FEAST_SERVING_IMAGE=gcr.io/kf-feast/feast-serving FEAST_ONLINE_SERVING_CONFIG=online-serving.yml -FEAST_ONLINE_STORE_CONFIG=redis-store.yml # Jupyter FEAST_JUPYTER_GCP_SERVICE_ACCOUNT_KEY=placeholder.json diff --git a/infra/docker-compose/docker-compose.batch.yml b/infra/docker-compose/docker-compose.batch.yml index 247dd0b6719..71f61d634a5 100644 --- a/infra/docker-compose/docker-compose.batch.yml +++ b/infra/docker-compose/docker-compose.batch.yml @@ -5,7 +5,6 @@ services: image: ${FEAST_SERVING_IMAGE}:${FEAST_VERSION} volumes: - ./serving/${FEAST_BATCH_SERVING_CONFIG}:/etc/feast/application.yml - - ./serving/${FEAST_BATCH_STORE_CONFIG}:/etc/feast/store.yml - ./gcp-service-accounts/${FEAST_BATCH_SERVING_GCP_SERVICE_ACCOUNT_KEY}:/etc/gcloud/service-accounts/key.json depends_on: - redis @@ -26,4 +25,4 @@ services: redis: image: redis:5-alpine ports: - - "6379:6379" \ No newline at end of file + - "6379:6379" diff --git a/infra/docker-compose/docker-compose.online.yml b/infra/docker-compose/docker-compose.online.yml index ed96f0e0963..b01d0882fb4 100644 --- a/infra/docker-compose/docker-compose.online.yml +++ b/infra/docker-compose/docker-compose.online.yml @@ -5,7 +5,6 @@ services: image: ${FEAST_SERVING_IMAGE}:${FEAST_VERSION} volumes: - ./serving/${FEAST_ONLINE_SERVING_CONFIG}:/etc/feast/application.yml - - ./serving/${FEAST_ONLINE_STORE_CONFIG}:/etc/feast/store.yml depends_on: - redis ports: @@ -20,4 +19,4 @@ services: redis: image: redis:5-alpine ports: - - "6379:6379" \ No newline at end of file + - "6379:6379" diff --git a/infra/docker-compose/serving/bq-store.yml b/infra/docker-compose/serving/bq-store.yml deleted file mode 100644 index cdebee3497f..00000000000 --- a/infra/docker-compose/serving/bq-store.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: warehouse -type: BIGQUERY -bigquery_config: - project_id: - dataset_id: -subscriptions: -- name: "*" - project: "*" - version: "*" \ No newline at end of file diff --git a/infra/docker-compose/serving/redis-store.yml b/infra/docker-compose/serving/redis-store.yml deleted file mode 100644 index 16870be94d7..00000000000 --- a/infra/docker-compose/serving/redis-store.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: serving -type: REDIS -redis_config: - host: redis - port: 6379 -subscriptions: -- name: "*" - project: "*" - version: "*" From ddd1c2cc5a8ab9b29118a083c1733e4e44fb4ec5 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Fri, 22 May 2020 14:30:32 +0800 Subject: [PATCH 3/5] Update batch-serving.yml serving config to v0.5 format --- infra/docker-compose/.env.sample | 8 ++--- .../docker-compose/serving/batch-serving.yml | 30 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/infra/docker-compose/.env.sample b/infra/docker-compose/.env.sample index c8073eb5696..468ae914863 100644 --- a/infra/docker-compose/.env.sample +++ b/infra/docker-compose/.env.sample @@ -10,13 +10,13 @@ FEAST_CORE_GCP_SERVICE_ACCOUNT_KEY=placeholder.json FEAST_STREAM_OPTIONS_BOOTSTRAPSERVERS=kafka:9092 FEAST_JOBS_POLLING_INTERVAL_MILLISECONDS=30000 -# Feast Serving Batch (BigQuery) +# Feast Serving +FEAST_SERVING_IMAGE=gcr.io/kf-feast/feast-serving +# Feast Serving - Batch (BigQuery) FEAST_BATCH_SERVING_CONFIG=batch-serving.yml FEAST_BATCH_SERVING_GCP_SERVICE_ACCOUNT_KEY=placeholder.json FEAST_BATCH_JOB_STAGING_LOCATION=gs://your-gcs-bucket/staging - -# Feast Serving Online (Redis) -FEAST_SERVING_IMAGE=gcr.io/kf-feast/feast-serving +# Feast Serving - Online (Redis) FEAST_ONLINE_SERVING_CONFIG=online-serving.yml # Jupyter diff --git a/infra/docker-compose/serving/batch-serving.yml b/infra/docker-compose/serving/batch-serving.yml index 0b1c3fbf96c..375380bcee3 100644 --- a/infra/docker-compose/serving/batch-serving.yml +++ b/infra/docker-compose/serving/batch-serving.yml @@ -1,14 +1,20 @@ feast: core-host: core - core-grpc-port: 6565 - store: - config-path: /etc/feast/store.yml - - jobs: - store-type: REDIS - store-options: - host: redis - port: 6379 - -grpc: - port: 6567 + active-store: batch + stores: + - name: historical + type: BIGQUERY + # Changes required for batch serving to work + # Please see https://api.docs.feast.dev/grpc/feast.core.pb.html#Store for configuration options + config: + project_id: my_project + dataset_id: my_dataset + staging_location: gs://mybucket/myprefix + initial_retry_delay_seconds: 1 + total_timeout_seconds: 21600 + subscriptions: + - name: "*" + project: "*" + job_store: + redis_host: redis + redis_port: 6379 From 936fde7d34c4366593b5f0cf5d20e86cfdc2289a Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Fri, 22 May 2020 14:47:44 +0800 Subject: [PATCH 4/5] Split out core specific config in docker-compose's .env.sample into core.yml --- infra/docker-compose/.env.sample | 4 +--- infra/docker-compose/core/core.yml | 14 ++++++++++++++ infra/docker-compose/docker-compose.yml | 4 +--- 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 infra/docker-compose/core/core.yml diff --git a/infra/docker-compose/.env.sample b/infra/docker-compose/.env.sample index 468ae914863..a267f5e8577 100644 --- a/infra/docker-compose/.env.sample +++ b/infra/docker-compose/.env.sample @@ -5,10 +5,8 @@ FEAST_REPOSITORY_VERSION=v0.5-branch # Feast Core FEAST_CORE_IMAGE=gcr.io/kf-feast/feast-core -FEAST_CORE_CONFIG=direct-runner.yml +FEAST_CORE_CONFIG=core.yml FEAST_CORE_GCP_SERVICE_ACCOUNT_KEY=placeholder.json -FEAST_STREAM_OPTIONS_BOOTSTRAPSERVERS=kafka:9092 -FEAST_JOBS_POLLING_INTERVAL_MILLISECONDS=30000 # Feast Serving FEAST_SERVING_IMAGE=gcr.io/kf-feast/feast-serving diff --git a/infra/docker-compose/core/core.yml b/infra/docker-compose/core/core.yml new file mode 100644 index 00000000000..99d8d6c7ddb --- /dev/null +++ b/infra/docker-compose/core/core.yml @@ -0,0 +1,14 @@ +feast: + jobs: + polling_interval_milliseconds: 30000 + job_update_timeout_seconds: 240 + active_runner: direct + runners: + - name: direct + type: DirectRunner + options: {} + stream: + type: kafka + options: + topic: feast-features + bootstrapServers: kafka:9092 diff --git a/infra/docker-compose/docker-compose.yml b/infra/docker-compose/docker-compose.yml index d327b8e3c80..ab4cf3858a8 100644 --- a/infra/docker-compose/docker-compose.yml +++ b/infra/docker-compose/docker-compose.yml @@ -9,8 +9,6 @@ services: environment: DB_HOST: db GOOGLE_APPLICATION_CREDENTIALS: /etc/gcloud/service-accounts/key.json - FEAST_STREAM_OPTIONS_BOOTSTRAPSERVERS: ${FEAST_STREAM_OPTIONS_BOOTSTRAPSERVERS} - FEAST_JOBS_POLLING_INTERVAL_MILLISECONDS: ${FEAST_JOBS_POLLING_INTERVAL_MILLISECONDS} restart: on-failure depends_on: - db @@ -66,4 +64,4 @@ services: environment: POSTGRES_PASSWORD: password ports: - - "5432:5432" \ No newline at end of file + - "5432:5432" From 887053e7e1f1ff9f08b95184573e7081d37e3951 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Fri, 22 May 2020 14:58:02 +0800 Subject: [PATCH 5/5] Add github badge for docker-compose tests status in README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3da4109f9b8..12f8a5c9221 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # Feast - Feature Store for Machine Learning [![Unit Tests](https://github.com/feast-dev/feast/workflows/unit%20tests/badge.svg?branch=master)](https://github.com/feast-dev/feast/actions?query=workflow%3A%22unit+tests%22+branch%3Amaster) +![Docker Compose Tests](https://github.com/feast-dev/feast/workflows/docker%20compose%20tests/badge.svg?branch=master) [![Code Standards](https://github.com/feast-dev/feast/workflows/code%20standards/badge.svg?branch=master)](https://github.com/feast-dev/feast/actions?query=workflow%3A%22code+standards%22+branch%3Amaster) [![Docs latest](https://img.shields.io/badge/Docs-latest-blue.svg)](https://docs.feast.dev/) [![GitHub Release](https://img.shields.io/github/release/feast-dev/feast.svg?style=flat)](https://github.com/feast-dev/feast/releases) + ## Overview Feast (Feature Store) is a tool for managing and serving machine learning features. Feast is the bridge between models and data.