Skip to content

Revert "Experiment: use azurite-rs instead of azurite for functional tests" - #100618

Merged
Michicosun merged 2 commits into
masterfrom
revert-95967-use-azurite-rs-for-functional-tests
Mar 24, 2026
Merged

Michicosun merged 2 commits into
masterfrom
revert-95967-use-azurite-rs-for-functional-tests

Conversation

@clickhouse-gh

clickhouse-gh Bot commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [27192d4]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_tsan, s3 storage, parallel, 1/2) failure
04004_integral_col_comparison_with_float_key_condition FAIL cidb, issue
Integration tests (amd_llvm_coverage, 1/5) failure
test_ttl_replicated/test.py::test_ttl_columns FAIL cidb
test_ttl_replicated/test.py::test_merge_with_ttl_timeout FAIL cidb
test_ttl_replicated/test.py::test_ttl_many_columns FAIL cidb
test_ttl_replicated/test.py::test_ttl_table[] FAIL cidb
test_ttl_replicated/test.py::test_ttl_table[DELETE] FAIL cidb
test_ttl_replicated/test.py::test_modify_ttl FAIL cidb
test_ttl_replicated/test.py::test_modify_column_ttl FAIL cidb
test_ttl_replicated/test.py::test_ttl_double_delete_rule_returns_error FAIL cidb
test_ttl_replicated/test.py::test_ttl_alter_delete[test_ttl_alter_delete] FAIL cidb
test_ttl_replicated/test.py::test_ttl_alter_delete[test_ttl_alter_delete_replicated] FAIL cidb
5 more test cases not shown

AI Review

Summary

This PR reverts the azurite-rs experiment in stateless/upgrade test infrastructure and switches back to azurite (azurite-blob), with a version bump to 3.35.0 and Node.js 20 pinning for compatibility. I reviewed the changed scripts and Docker image updates for correctness, process invocation, and consistency across touched paths. The revert appears coherent and low-risk, with no concrete correctness, safety, or performance blockers identified in the modified code.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ➖
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Mar 24, 2026
Comment thread ci/docker/stateless-test/Dockerfile Resolved
alexey-milovidov added a commit to ClickHouse/azurite-rs that referenced this pull request Mar 24, 2026
The batch handler was a stub returning a single hardcoded 202 response,
which caused ClickHouse CI failures:
- "failed to parse response body at 0" (malformed multipart response)
- "map::at: key not found" (missing Content-ID matching)

Fix by implementing the full batch protocol:
- Single-level multipart response (no changeset nesting) matching the
  Azure C++ SDK parser expectations
- Reuse request batch boundary in response (matching official Azurite)
- Echo Content-ID from each sub-request in corresponding sub-response
- Parse and execute individual DELETE sub-requests
- Handle both flat and nested (changeset) request formats
- Return proper 404 errors for non-existent blobs

Fixes: ClickHouse/ClickHouse#100618

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@Michicosun
Michicosun added this pull request to the merge queue Mar 24, 2026
Merged via the queue into master with commit 2c95ef5 Mar 24, 2026
146 of 148 checks passed
@Michicosun
Michicosun deleted the revert-95967-use-azurite-rs-for-functional-tests branch March 24, 2026 22:00
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 24, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Mar 26, 2026
robot-clickhouse added a commit that referenced this pull request Mar 26, 2026
robot-clickhouse added a commit that referenced this pull request Mar 26, 2026
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Mar 26, 2026
clickhouse-gh Bot added a commit that referenced this pull request Mar 26, 2026
Backport #100618 to 26.3: Revert "Experiment: use azurite-rs instead of azurite for functional tests"
clickhouse-gh Bot added a commit that referenced this pull request Mar 26, 2026
Backport #100618 to 26.2: Revert "Experiment: use azurite-rs instead of azurite for functional tests"
alexey-milovidov added a commit to ClickHouse/azurite-rs that referenced this pull request Mar 28, 2026
The batch handler was a stub returning a single hardcoded 202 response,
which caused ClickHouse CI failures:
- "failed to parse response body at 0" (malformed multipart response)
- "map::at: key not found" (missing Content-ID matching)

Fix by implementing the full batch protocol:
- Single-level multipart response (no changeset nesting) matching the
  Azure C++ SDK parser expectations
- Reuse request batch boundary in response (matching official Azurite)
- Echo Content-ID from each sub-request in corresponding sub-response
- Parse and execute individual DELETE sub-requests
- Handle both flat and nested (changeset) request formats
- Return proper 404 errors for non-existent blobs

Fixes: ClickHouse/ClickHouse#100618

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

Investigation: Root Cause Analysis

Every single CI failure from both linked test reports traces to one issue: the batch blob delete API in azurite-rs.

What happened

Error Cause
failed to parse response body at 0 Azure C++ SDK's blob_batch.cpp parser couldn't parse the malformed multipart batch response
map::at: key not found SDK couldn't find Content-ID header to match sub-responses to sub-requests
Server died (across ~15 CI jobs) The map::at exception triggers abortOnFailedAssertion → abort(), killing the server and all remaining tests

The BlobKillerThread runs batch deletes in the background across all test configurations that use Azure storage. A single malformed batch response crashes the entire ClickHouse server, which then fails every subsequent test in that CI job. This made one bug look like widespread breakage across ~15 different CI configurations.

Timeline

  1. Feb 5: PR Experiment: use azurite-rs instead of azurite for functional tests #95967 merged — azurite-rs used for Azure tests (version v0.1.0-28a2afc). Tests passed because ClickHouse didn't use batch delete at that time.
  2. Mar 26: PR Support Batch Remove for Azure #100522 merged — added SubmitBatch calls to ClickHouse's BlobKillerThread for batch blob deletion.
  3. azurite-rs's stub batch handler returned a malformed single "202 Accepted" regardless of request content → SDK crashes → server dies.

The fix

ClickHouse/azurite-rs#4 rewrites the batch handler to implement the full Azure Blob Batch protocol:

  • Single-level multipart response (not nested changeset) — matching the C++ SDK parser
  • Reuses request boundary in response — matching official Azurite behavior
  • Echoes Content-ID from each sub-request — required for SDK request/response matching
  • Actually executes each DELETE sub-request against the storage backend
  • 3 new tests validating the exact protocol the Azure C++ SDK expects

To unblock PR #100980

  1. Merge Fix batch blob delete API for Azure C++ SDK compatibility azurite-rs#4
  2. CI auto-creates a release on merge to master (tag: v0.1.0-{short_sha})
  3. Update PR Revert "Revert "Experiment: use azurite-rs instead of azurite for functional tests"" #100980's ci/docker/stateless-test/Dockerfile to use the new release version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo v26.2-must-backport v26.3-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants