diff --git a/.github/workflows/configs/docker-compose.yml b/.github/workflows/configs/docker-compose.yml index fb425391cea..ccb473068f0 100644 --- a/.github/workflows/configs/docker-compose.yml +++ b/.github/workflows/configs/docker-compose.yml @@ -43,11 +43,6 @@ services: - "9000:8080" volumes: - weaviate_data:/var/lib/weaviate - healthcheck: - test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/v1/.well-known/ready"] - interval: 10s - timeout: 5s - retries: 5 networks: bifrost_network: ipv4_address: 172.38.0.12 diff --git a/.github/workflows/scripts/test-api-integrations.sh b/.github/workflows/scripts/test-api-integrations.sh index 4ba059ebd95..46fbd4eb377 100755 --- a/.github/workflows/scripts/test-api-integrations.sh +++ b/.github/workflows/scripts/test-api-integrations.sh @@ -102,6 +102,24 @@ if [ $ELAPSED -ge $MAX_WAIT ]; then exit 1 fi +echo "โณ Waiting for Weaviate readiness via host..." +WEAVIATE_WAIT=60 +WEAVIATE_ELAPSED=0 +WEAVIATE_READY=false +while [ $WEAVIATE_ELAPSED -lt $WEAVIATE_WAIT ]; do + if curl -fsS -o /dev/null "http://localhost:9000/v1/.well-known/ready"; then + WEAVIATE_READY=true + echo "โœ… Weaviate ready (${WEAVIATE_ELAPSED}s)" + break + fi + sleep 2 + WEAVIATE_ELAPSED=$((WEAVIATE_ELAPSED + 2)) +done +if [ "$WEAVIATE_READY" = false ]; then + echo "โŒ Weaviate failed readiness check within ${WEAVIATE_WAIT}s" + exit 1 +fi + echo "๐Ÿ”„ Resetting PostgreSQL database..." POSTGRES_CONTAINER=$(docker compose -f "$COMPOSE_FILE" ps -q postgres) if [ -n "$POSTGRES_CONTAINER" ]; then diff --git a/.github/workflows/scripts/test-bifrost-http.sh b/.github/workflows/scripts/test-bifrost-http.sh index e6f289c8636..1508c0ba340 100755 --- a/.github/workflows/scripts/test-bifrost-http.sh +++ b/.github/workflows/scripts/test-bifrost-http.sh @@ -139,6 +139,24 @@ if [ "$SERVICES_READY" = false ]; then exit 1 fi +echo "โณ Waiting for Weaviate readiness via host..." +WEAVIATE_WAIT=60 +WEAVIATE_ELAPSED=0 +WEAVIATE_READY=false +while [ $WEAVIATE_ELAPSED -lt $WEAVIATE_WAIT ]; do + if curl -fsS -o /dev/null "http://localhost:9000/v1/.well-known/ready"; then + WEAVIATE_READY=true + echo "โœ… Weaviate ready (${WEAVIATE_ELAPSED}s)" + break + fi + sleep 2 + WEAVIATE_ELAPSED=$((WEAVIATE_ELAPSED + 2)) +done +if [ "$WEAVIATE_READY" = false ]; then + echo "โŒ Weaviate failed readiness check within ${WEAVIATE_WAIT}s" + exit 1 +fi + for config in "${CONFIGS_TO_TEST[@]}"; do echo " ๐Ÿ” Testing with config: $config" config_path="$CONFIGS_DIR/$config" diff --git a/.github/workflows/scripts/test-e2e-ui.sh b/.github/workflows/scripts/test-e2e-ui.sh index e0f7d79d93b..f2890eafc17 100755 --- a/.github/workflows/scripts/test-e2e-ui.sh +++ b/.github/workflows/scripts/test-e2e-ui.sh @@ -79,6 +79,24 @@ if [ "$SERVICES_READY" = false ]; then exit 1 fi +echo "โณ Waiting for Weaviate readiness via host..." +WEAVIATE_WAIT=60 +WEAVIATE_ELAPSED=0 +WEAVIATE_READY=false +while [ $WEAVIATE_ELAPSED -lt $WEAVIATE_WAIT ]; do + if curl -fsS -o /dev/null "http://localhost:9000/v1/.well-known/ready"; then + WEAVIATE_READY=true + echo "โœ… Weaviate ready (${WEAVIATE_ELAPSED}s)" + break + fi + sleep 2 + WEAVIATE_ELAPSED=$((WEAVIATE_ELAPSED + 2)) +done +if [ "$WEAVIATE_READY" = false ]; then + echo "โŒ Weaviate failed readiness check within ${WEAVIATE_WAIT}s" + exit 1 +fi + # Reset PostgreSQL database to clean state echo "๐Ÿงน Resetting PostgreSQL database..." docker exec -e PGPASSWORD=bifrost_password "$(docker compose -f "$CONFIGS_DIR/docker-compose.yml" ps -q postgres)" \