Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker-compose test #973

Merged
merged 5 commits into from
Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/complete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,11 @@ jobs:
with:
name: load-test-results
path: load-test-output/

tests-docker-compose:
needs: build-push-docker-images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test docker compose
run: ./infra/scripts/test-docker-compose.sh ${GITHUB_SHA}
7 changes: 0 additions & 7 deletions .github/workflows/master_only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,3 @@ jobs:
docker push gcr.io/kf-feast/feast-${{ matrix.component }}:latest
fi
fi

tests-docker-compose:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test docker compose
run: ./infra/scripts/test-docker-compose.sh
2 changes: 1 addition & 1 deletion infra/docker-compose/jobcontroller/jobcontroller.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
feast:
core-host: core
jobs:
polling_interval_milliseconds: 20000
polling_interval_milliseconds: 10000
job_update_timeout_seconds: 240
active_runner: direct
runners:
Expand Down
13 changes: 12 additions & 1 deletion infra/scripts/test-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ echo "
Running Docker Compose tests with pytest at 'tests/e2e'
============================================================
"
LATEST_GH_COMMIT_SHA=$1

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

# Replace FEAST_VERSION with latest github image SHA
woop marked this conversation as resolved.
Show resolved Hide resolved
export FEAST_VERSION=$LATEST_GH_COMMIT_SHA
echo "Testing docker-compose setup with version SHA, $FEAST_VERSION."

# Start Docker Compose containers
docker-compose up -d

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

# Get Feast Job Controller container IP address
export FEAST_JOB_CONTROLLER_CONTAINER_IP_ADDRESS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' feast_jobcontroller_1)

# Wait for Feast Job Controller to be ready
"${PROJECT_ROOT_DIR}"/infra/scripts/wait-for-it.sh ${FEAST_JOB_CONTROLLER_CONTAINER_IP_ADDRESS}:6570 --timeout=120

# Get Feast Online Serving container IP address
export FEAST_ONLINE_SERVING_CONTAINER_IP_ADDRESS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' feast_online_serving_1)

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

# Run e2e tests for Redis
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'
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'