From 7de7139dc66a559af6daf14102bea4a50d423bce Mon Sep 17 00:00:00 2001
From: strtgbb <146047128+strtgbb@users.noreply.github.com>
Date: Wed, 9 Sep 2026 14:58:25 -0400
Subject: [PATCH 1/2] replace azure with azurite
---
ci/jobs/functional_tests.py | 21 --------------------
ci/jobs/scripts/clickhouse_proc.py | 12 ++++++++++-
tests/config/config.d/azure_storage_conf.xml | 6 ++----
tests/docker_scripts/stress_runner.sh | 1 +
4 files changed, 14 insertions(+), 26 deletions(-)
diff --git a/ci/jobs/functional_tests.py b/ci/jobs/functional_tests.py
index fd8e5c5bd79d..0a26e5582bdb 100644
--- a/ci/jobs/functional_tests.py
+++ b/ci/jobs/functional_tests.py
@@ -190,27 +190,6 @@ def main():
runner_options += f" --jobs {nproc}"
- if not info.is_local_run:
- # NOTE(strtgbb): We pass azure credentials through the docker command, not SSM.
- # TODO: find a way to work with Azure secret so it's ok for local tests as well, for now keep azure disabled
- # os.environ["AZURE_CONNECTION_STRING"] = Shell.get_output(
- # f"aws ssm get-parameter --region us-east-1 --name azure_connection_string --with-decryption --output text --query Parameter.Value",
- # verbose=True,
- # )
-
- # NOTE(strtgbb): Azure credentials don't exist in community workflow
- if info.is_community_pr:
- print(
- "NOTE: No azure credentials provided for community PR - disable azure storage"
- )
- config_installs_args += " --no-azure"
-
- # NOTE(strtgbb): With the above, some tests are still trying to use azure, try this:
- os.environ["USE_AZURE_STORAGE_FOR_MERGE_TREE"] = "0"
- else:
- print("Disable azure for a local run")
- config_installs_args += " --no-azure"
-
if (is_azure_storage or is_s3_storage) and is_encrypted_storage:
config_installs_args += " --encrypted-storage"
runner_options += f" --encrypted-storage"
diff --git a/ci/jobs/scripts/clickhouse_proc.py b/ci/jobs/scripts/clickhouse_proc.py
index bfc69801cbe1..77730ad3726e 100644
--- a/ci/jobs/scripts/clickhouse_proc.py
+++ b/ci/jobs/scripts/clickhouse_proc.py
@@ -153,7 +153,15 @@ def start_azurite(self):
command, stdout=log_file, stderr=subprocess.STDOUT, shell=True
)
print(f"Started azurite asynchronously with PID {self.azurite_proc.pid}")
- return True
+
+ if Shell.check(
+ "curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:10000/ | grep -qE '400|200'",
+ verbose=False,
+ retries=6,
+ ):
+ return True
+ print("Failed to start azurite")
+ return False
@staticmethod
def log_cluster_config():
@@ -1048,6 +1056,8 @@ def set_random_timezone():
param = sys.argv[2]
assert param in ["stateless"]
res = ch.start_minio(param)
+ elif command == "start_azurite":
+ res = ch.start_azurite()
else:
raise ValueError(f"Unknown command: {command}")
except Exception as e:
diff --git a/tests/config/config.d/azure_storage_conf.xml b/tests/config/config.d/azure_storage_conf.xml
index ca2ec4a4be82..663856a18b9e 100644
--- a/tests/config/config.d/azure_storage_conf.xml
+++ b/tests/config/config.d/azure_storage_conf.xml
@@ -6,10 +6,8 @@
azure
false
33554432
-
-
-
-
+ clickhouse-tests
+ DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;
cache
diff --git a/tests/docker_scripts/stress_runner.sh b/tests/docker_scripts/stress_runner.sh
index 997a5c70a927..8537a8e3246b 100755
--- a/tests/docker_scripts/stress_runner.sh
+++ b/tests/docker_scripts/stress_runner.sh
@@ -57,6 +57,7 @@ configure
cd /repo && python3 /repo/ci/jobs/scripts/clickhouse_proc.py logs_export_config || echo "ERROR: Failed to create log export config"
cd /repo && python3 /repo/ci/jobs/scripts/clickhouse_proc.py start_minio stateless || { echo "Failed to start minio"; exit 1; }
+cd /repo && python3 /repo/ci/jobs/scripts/clickhouse_proc.py start_azurite || { echo "Failed to start azurite"; exit 1; }
start_server || { echo "Failed to start server"; exit 1; }
From e27f11521d0bb48be54308975f27f42eb9a6e320 Mon Sep 17 00:00:00 2001
From: strtgbb <146047128+strtgbb@users.noreply.github.com>
Date: Fri, 11 Sep 2026 10:09:03 -0400
Subject: [PATCH 2/2] Wait for Azurite with a sleep loop.
25.8 Shell.run retries fire immediately with no delay, so the
previous curl retries=6 check always lost the race.
---
ci/jobs/scripts/clickhouse_proc.py | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/ci/jobs/scripts/clickhouse_proc.py b/ci/jobs/scripts/clickhouse_proc.py
index 77730ad3726e..0dc9cbd444f0 100644
--- a/ci/jobs/scripts/clickhouse_proc.py
+++ b/ci/jobs/scripts/clickhouse_proc.py
@@ -154,12 +154,16 @@ def start_azurite(self):
)
print(f"Started azurite asynchronously with PID {self.azurite_proc.pid}")
- if Shell.check(
- "curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:10000/ | grep -qE '400|200'",
- verbose=False,
- retries=6,
- ):
- return True
+ print("Waiting for azurite to start...")
+ for _ in range(10):
+ res = Shell.check(
+ "curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:10000/ | grep -qE '400|200'",
+ verbose=False,
+ )
+ if res:
+ print("Azurite started successfully")
+ return True
+ time.sleep(3)
print("Failed to start azurite")
return False