Skip to content

Commit 13074c9

Browse files
committed
add healthcheck
1 parent 4cc22b5 commit 13074c9

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ test-integration: test-integration-setup test-integration-exec test-integration-
100100
test-integration-setup: ## Start Docker services for integration tests
101101
docker compose -f dev/docker-compose-integration.yml kill
102102
docker compose -f dev/docker-compose-integration.yml rm -f
103-
docker compose -f dev/docker-compose-integration.yml up -d
103+
docker compose -f dev/docker-compose-integration.yml up -d --wait
104104
${TEST_RUNNER} python dev/provision.py
105105

106106
test-integration-exec: ## Run integration tests (excluding provision)

dev/Dockerfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,5 @@ RUN set -e && \
6565
USER spark
6666
WORKDIR ${SPARK_HOME}
6767

68-
# Health check for Spark Connect server
69-
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
70-
CMD curl -sf http://localhost:15002/ || exit 1
71-
7268
# Start Spark Connect server
7369
CMD ["sh", "-c", "SPARK_NO_DAEMONIZE=true ${SPARK_HOME}/sbin/start-connect-server.sh"]

dev/docker-compose-integration.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ services:
3636
- rest:rest
3737
- hive:hive
3838
- minio:minio
39+
healthcheck:
40+
test: ["CMD", "sh", "-c", "ss -tuln | grep :15002 || nc -z localhost 15002"]
41+
interval: 30s
42+
timeout: 10s
43+
retries: 5
44+
start_period: 90s
3945
rest:
4046
image: apache/iceberg-rest-fixture
4147
container_name: pyiceberg-rest

0 commit comments

Comments
 (0)