Repository navigation
CI: fix the macOS job and the HTTP Cloud job - #737
Conversation
macOS: GitHub retired the macos-14 runner images on 2026-11-02, so the macos-14 leg is cancelled before it starts. Use macos-26, the newest GA arm64 image. The Intel leg (macos-15-intel) stays. Cloud (HTTP): the Cloud proxy now sends each HTTP request to a replica of its own, also on one keep-alive connection. Temporary tables of a session, Memory tables and MergeTree reads right after an insert then fail. In Cloud mode, every test client now sends one per-run X-ClickHouse-Replica-Tag header, so all requests of the run reach one replica. TestUtilities.GetTestClickHouseClientSettings sets it, and the two fixtures that make their own settings (SessionConnectionTest, JsonModeTests) set it too. Outside Cloud no header is sent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the CI workflow and Cloud HTTP test setup changes.
No open issues 🎉
What changed in this PR
This PR addresses macOS and Cloud CI failures through workflow and HTTP test setup changes. Production client code is unchanged.
Changes:
- Replace
macos-14withmacos-26, retaining the Intel runner. - Apply one shared replica-routing tag to Cloud HTTP test clients, including session and JSON-mode clients.
- Document the header requirement for tests that create their own settings; non-Cloud runs remain unchanged.
| File | Description |
|---|---|
ClickHouse.Driver/AGENTS.md |
Document routing headers for custom test settings. |
ClickHouse.Driver.Tests/Utilities/TestUtilities.cs |
Generate a shared Cloud replica tag and apply it to default test settings. |
ClickHouse.Driver.Tests/Types/JsonModeTests.cs |
Add routing headers to JSON-mode test clients. |
ClickHouse.Driver.Tests/ADO/SessionConnectionTest.cs |
Use settings-based connections and add routing headers. |
.github/workflows/tests-macos.yml |
Move the arm64 test job to macos-26. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
AI review gate — auto-approval withheldThe AI review gate is green, but the approver did not approve What to do: ask someone with write access who is not the PR author to approve this pull request. History (latest 5 heads, newest first)
|
Summary
Two checks fail on
main(3ad7df0f) and on every same-repo PR since 2026-11-13, for example #728. This PR fixes both. The changes are in CI and test code only. The client does not change.1.
macOS / macOS Tests (macos-14): cancelled in 1 sGitHub refuses the job before a runner starts:
The configuration 'macos-14-arm64-us-default' is not supported. GitHub retired all macOS 14 images on 2026-11-02 (actions/runner-images#15226). The job is cancelled onmainsince 2026-11-09.Fix:
macos-14→macos-26, the newest GA arm64 image. The matrix still has one arm64 leg and one Intel leg (macos-15-intel).2.
Cloud / Cloud Tests - AWS(HTTP): 22 to 25 failures per runAll failures are in 4 fixtures, in two groups:
SessionConnectionTest:CREATE TEMPORARY TABLE, thenSELECTfrom it in the same session →UNKNOWN_TABLE(code 60).JsonModeTests(Memorytables),InsertBinaryCompressionTestsandInsertBinaryQueryPlacementTests(MergeTree): insert, thenSELECTwith the same client → 0 rows (Assert.That(reader.Read(), Is.True)).The HTTP Cloud job was last green on
mainat40f965cb(2026-11-11 06:05Z). No commit after it changes the HTTP client. The TCP Cloud job stays green. The set of failing tests changes from run to run.Cause: the Cloud proxy now sends each HTTP request to a replica of its own, also on one keep-alive connection (the session tests use one connection). A session and a
Memorytable exist on one replica only, and a replica can read aMergeTreetable before it has the parts that another replica inserted. Replica-aware routing is a per-service HTTP toggle; requests with the sameX-ClickHouse-Replica-Taggo to one replica. The clickhouse-java Cloud tests broke the same way in September 2026 when that toggle was switched on for their service. #724 notes that the HTTP client can already send this header withCustomHeaders.Fix:
TestUtilities.GetTestCustomHeaders(): on Cloud it returnsX-ClickHouse-Replica-Tag: clickhouse-cs-tests-<guid>, with one value for the whole run. In other environments it returns no headers, so local, cluster and other CI jobs send the same requests as before.GetTestClickHouseClientSettingssets these headers, soGetTestClickHouseClient,GetTestClickHouseConnectionandAbstractConnectionTestFixturesend them.SessionConnectionTestandJsonModeTestsmake their own settings, so they set the headers too.SessionConnectionTest.CreateConnectionused the connection-string constructor, which cannot carry headers. It now usesnew ClickHouseClientSettings(builder), which reads the same builder (UseSession,SessionId,Compression).ClickHouse.Driver/AGENTS.md: one bullet that tells a test that makes its own settings to set these headers.Verification
Cloud / Cloud Tests - AWSjob of this PR is the end-to-end check.CLICKHOUSE_TEST_ENVIRONMENT=cloud, every request (theCREATE DATABASEset-up, both session requests, the JSON-mode requests) has the same tag. Without it, 6 requests had no tag.CLICKHOUSE_TEST_ENVIRONMENT=cloud,--filter Category=Cloud, net10.0, against a local 26.x server: 791 passed, 5 skipped, 0 failed. The server accepts the header.ClickHouse.Driver.Tests, net10.0, local server: 14878 passed, 142 skipped, 0 failed.No changelog fragment: the client does not change.
Checklist
🤖 Generated with Claude Code
Note
Low Risk
CI matrix and test harness only; no production client API or runtime behavior changes.
Overview
Fixes two failing CI checks without changing the ClickHouse.Driver client.
macOS workflow: Replaces retired
macos-14withmacos-26in the test matrix so the macOS job can start on a supported arm64 runner (Intel leg unchanged).Cloud HTTP tests: Adds
TestUtilities.GetTestCustomHeaders(), which on Cloud sends a stable per-runX-ClickHouse-Replica-Tagso replica-aware routing keeps session,Memory, and insert-then-read traffic on one replica. Default test client settings pick this up;SessionConnectionTestandJsonModeTeststhat build their ownClickHouseClientSettingsset the same headers (session tests no longer use a connection-string-only constructor). AGENTS.md documents that convention for future tests.Reviewed by Cursor Bugbot for commit 5252b34. Bugbot is set up for automated code reviews on this repo. Configure here.