From 731f86e44ccd69572b93ca5c45940a61bafcc37a Mon Sep 17 00:00:00 2001 From: Rob Meng Date: Mon, 18 Sep 2023 15:17:45 -0400 Subject: [PATCH] add health check to wait for all service ready before next step (#501) aws integration tests are flaky because we didn't wait for the services to become healthy. (we only waited for the localstack service, this PR adds wait for sub services) --- .github/workflows/node.yml | 3 ++- docker-compose.yml | 3 +++ node/src/integration_test/test.ts | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index ebe253c4..b03a93ae 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -9,6 +9,7 @@ on: - node/** - rust/ffi/node/** - .github/workflows/node.yml + - docker-compose.yml env: # Disable full debug symbol generation to speed up CI build and keep memory down @@ -133,7 +134,7 @@ jobs: cache: 'npm' cache-dependency-path: node/package-lock.json - name: start local stack - run: docker compose -f ../docker-compose.yml up -d + run: docker compose -f ../docker-compose.yml up -d --wait - name: create s3 run: aws s3 mb s3://lancedb-integtest --endpoint $AWS_ENDPOINT - name: create ddb diff --git a/docker-compose.yml b/docker-compose.yml index 8a8a924d..f46ef168 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,3 +13,6 @@ services: - AWS_SECRET_ACCESS_KEY=SECRETKEY healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:4566/health" ] + interval: 5s + retries: 3 + start_period: 10s diff --git a/node/src/integration_test/test.ts b/node/src/integration_test/test.ts index c138221c..f86a5070 100644 --- a/node/src/integration_test/test.ts +++ b/node/src/integration_test/test.ts @@ -24,7 +24,7 @@ chai.use(chaiAsPromised) describe('LanceDB AWS Integration test', function () { it('s3+ddb schema is processed correctly', async function () { - this.timeout(5000) + this.timeout(15000) // WARNING: specifying engine is NOT a publicly supported feature in lancedb yet // THE API WILL CHANGE