This is an automated email from the ASF dual-hosted git repository.

akshat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new b8230eb6593 Fix race condition in standard ITs: wait for MySQL 
readiness before starting Druid services (#18800)
b8230eb6593 is described below

commit b8230eb65930728f6f7cdb81c723c94d54825462
Author: Akshat Jain <[email protected]>
AuthorDate: Tue Dec 2 16:54:36 2025 +0530

    Fix race condition in standard ITs: wait for MySQL readiness before 
starting Druid services (#18800)
---
 integration-tests/docker/docker-compose.base.yml    |  5 +++++
 ...pose.cds-coordinator-metadata-query-disabled.yml | 15 ++++++++++-----
 ...ker-compose.cds-task-schema-publish-disabled.yml | 15 ++++++++++-----
 ...docker-compose.centralized-datasource-schema.yml | 15 ++++++++++-----
 .../docker/docker-compose.cli-indexer.yml           | 15 ++++++++++-----
 .../docker/docker-compose.ldap-security.yml         | 21 ++++++++++++++-------
 .../docker/docker-compose.query-error-test.yml      | 15 ++++++++++-----
 .../docker/docker-compose.query-retry-test.yml      | 15 ++++++++++-----
 integration-tests/docker/docker-compose.yml         | 15 ++++++++++-----
 9 files changed, 89 insertions(+), 42 deletions(-)

diff --git a/integration-tests/docker/docker-compose.base.yml 
b/integration-tests/docker/docker-compose.base.yml
index 2f60212bc66..ebd6ce5c502 100644
--- a/integration-tests/docker/docker-compose.base.yml
+++ b/integration-tests/docker/docker-compose.base.yml
@@ -68,6 +68,11 @@ services:
       - 
./service-supervisords/metadata-storage.conf:/usr/lib/druid/conf/metadata-storage.conf
     env_file:
       - ./environment-configs/common
+    healthcheck:
+      test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "--silent"]
+      interval: 2s
+      timeout: 5s
+      retries: 30
 
 
 ### overlords
diff --git 
a/integration-tests/docker/docker-compose.cds-coordinator-metadata-query-disabled.yml
 
b/integration-tests/docker/docker-compose.cds-coordinator-metadata-query-disabled.yml
index b435c290ef8..569cef1d06d 100644
--- 
a/integration-tests/docker/docker-compose.cds-coordinator-metadata-query-disabled.yml
+++ 
b/integration-tests/docker/docker-compose.cds-coordinator-metadata-query-disabled.yml
@@ -42,9 +42,12 @@ services:
       - druid_coordinator_segmentMetadata_disableSegmentMetadataQueries=true
       - druid_manager_segments_useIncrementalCache=always
     depends_on:
-      - druid-overlord
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-overlord:
+        condition: service_started
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-overlord:
     extends:
@@ -55,8 +58,10 @@ services:
       - druid_centralizedDatasourceSchema_enabled=true
       - druid_manager_segments_useIncrementalCache=always
     depends_on:
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-historical:
     extends:
diff --git 
a/integration-tests/docker/docker-compose.cds-task-schema-publish-disabled.yml 
b/integration-tests/docker/docker-compose.cds-task-schema-publish-disabled.yml
index b423ad9f658..65bbef6b238 100644
--- 
a/integration-tests/docker/docker-compose.cds-task-schema-publish-disabled.yml
+++ 
b/integration-tests/docker/docker-compose.cds-task-schema-publish-disabled.yml
@@ -42,9 +42,12 @@ services:
       - druid_coordinator_segmentMetadata_metadataRefreshPeriod=PT15S
       - druid_manager_segments_useIncrementalCache=always
     depends_on:
-      - druid-overlord
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-overlord:
+        condition: service_started
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-overlord:
     extends:
@@ -56,8 +59,10 @@ services:
       - druid_centralizedDatasourceSchema_taskSchemaPublishDisabled=true
       - druid_manager_segments_useIncrementalCache=always
     depends_on:
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-historical:
     extends:
diff --git 
a/integration-tests/docker/docker-compose.centralized-datasource-schema.yml 
b/integration-tests/docker/docker-compose.centralized-datasource-schema.yml
index b47ce1533af..52a15350b5f 100644
--- a/integration-tests/docker/docker-compose.centralized-datasource-schema.yml
+++ b/integration-tests/docker/docker-compose.centralized-datasource-schema.yml
@@ -41,9 +41,12 @@ services:
       - druid_coordinator_segmentMetadata_metadataRefreshPeriod=PT15S
       - druid_manager_segments_useIncrementalCache=always
     depends_on:
-      - druid-overlord
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-overlord:
+        condition: service_started
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-overlord:
     extends:
@@ -54,8 +57,10 @@ services:
       - druid_centralizedDatasourceSchema_enabled=true
       - druid_manager_segments_useIncrementalCache=always
     depends_on:
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-historical:
     extends:
diff --git a/integration-tests/docker/docker-compose.cli-indexer.yml 
b/integration-tests/docker/docker-compose.cli-indexer.yml
index 0e4ba9c0ea2..32317162f40 100644
--- a/integration-tests/docker/docker-compose.cli-indexer.yml
+++ b/integration-tests/docker/docker-compose.cli-indexer.yml
@@ -36,8 +36,10 @@ services:
     environment:
       - DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
     depends_on:
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-coordinator:
     extends:
@@ -46,9 +48,12 @@ services:
     environment:
       - DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
     depends_on:
-      - druid-overlord
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-overlord:
+        condition: service_started
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-historical:
     extends:
diff --git a/integration-tests/docker/docker-compose.ldap-security.yml 
b/integration-tests/docker/docker-compose.ldap-security.yml
index e700edc5b94..48bea3f0f39 100644
--- a/integration-tests/docker/docker-compose.ldap-security.yml
+++ b/integration-tests/docker/docker-compose.ldap-security.yml
@@ -53,10 +53,14 @@ services:
     environment:
       - DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
     depends_on:
-      - druid-openldap
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
-      - druid-overlord
+      druid-openldap:
+        condition: service_started
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
+      druid-overlord:
+        condition: service_started
 
   druid-overlord:
     extends:
@@ -68,9 +72,12 @@ services:
     environment:
       - DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
     depends_on:
-      - druid-openldap
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-openldap:
+        condition: service_started
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-historical:
     extends:
diff --git a/integration-tests/docker/docker-compose.query-error-test.yml 
b/integration-tests/docker/docker-compose.query-error-test.yml
index f75ff2efad7..c7fed645ce5 100644
--- a/integration-tests/docker/docker-compose.query-error-test.yml
+++ b/integration-tests/docker/docker-compose.query-error-test.yml
@@ -36,8 +36,10 @@ services:
     environment:
       - DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
     depends_on:
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-coordinator:
     extends:
@@ -46,9 +48,12 @@ services:
     environment:
       - DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
     depends_on:
-      - druid-overlord
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-overlord:
+        condition: service_started
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-broker:
     extends:
diff --git a/integration-tests/docker/docker-compose.query-retry-test.yml 
b/integration-tests/docker/docker-compose.query-retry-test.yml
index 2efb859a6f8..0a5c8bfc21b 100644
--- a/integration-tests/docker/docker-compose.query-retry-test.yml
+++ b/integration-tests/docker/docker-compose.query-retry-test.yml
@@ -36,8 +36,10 @@ services:
     environment:
       - DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
     depends_on:
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-coordinator:
     extends:
@@ -46,9 +48,12 @@ services:
     environment:
       - DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
     depends_on:
-      - druid-overlord
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-overlord:
+        condition: service_started
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-broker:
     extends:
diff --git a/integration-tests/docker/docker-compose.yml 
b/integration-tests/docker/docker-compose.yml
index 277d4b27cbe..74ea2e98c4b 100644
--- a/integration-tests/docker/docker-compose.yml
+++ b/integration-tests/docker/docker-compose.yml
@@ -36,9 +36,12 @@ services:
     environment:
       - DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
     depends_on:
-      - druid-overlord
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-overlord:
+        condition: service_started
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-overlord:
     extends:
@@ -47,8 +50,10 @@ services:
     environment:
       - DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}
     depends_on:
-      - druid-metadata-storage
-      - druid-zookeeper-kafka
+      druid-metadata-storage:
+        condition: service_healthy
+      druid-zookeeper-kafka:
+        condition: service_started
 
   druid-historical:
     extends:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to