Repository navigation
Remove unused curl dependency from AWS, Azure, and Arrow contribs - #108254
alexey-milovidov wants to merge 1 commit into
Conversation
ClickHouse does not use libcurl through the AWS SDK, the Azure SDK, or Arrow. - AWS: the `aws-cmake` wrapper already builds only the `standard` and `crt` HTTP clients (never `http/curl`), and `lib_aws.a` contains no curl symbols. No change was required. - Azure: ClickHouse installs its own `PocoAzureHTTPClient` transport (`client_options.Transport.Transport`), so the SDK's libcurl transport adapter was dead code. Stop compiling `http/curl/curl.cpp`, drop the `BUILD_CURL_HTTP_TRANSPORT_ADAPTER` definition and the `ch_contrib::curl` link, and remove the vestigial `<azure/core/http/curl_transport.hpp>` include. The `CurlMemoryLeak` unit test relied on the default libcurl transport and is removed together with it. - Arrow: curl is only needed by Arrow's S3/GCS filesystem layer, which is excluded from the build, so `lib_arrow.a` referenced no curl symbols. Drop the `ch_contrib::curl` link. `librdkafka` still links `ch_contrib::curl` (it genuinely uses it for the SASL/OAUTHBEARER OIDC token endpoint) and is left untouched. Verified by building `clickhouse` and `unit_tests_dbms` and confirming `nm` reports zero undefined curl symbols in `lib_azure_sdk.a`, `lib_arrow.a`, and `lib_aws.a`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Workflow [PR], commit [05023ac] Summary: ❌
AI ReviewSummaryThis PR removes Missing context / blind spots
Findings❌ Blockers
Tests
Final VerdictStatus: ❌ Block Minimum required action: restore a valid transport for Azure Identity token acquisition, then add focused coverage for managed/workload identity credential construction. |
| add_library(_azure_sdk ${AZURE_SDK_UNIFIED_SRC}) | ||
| target_compile_definitions(_azure_sdk PRIVATE BUILD_CURL_HTTP_TRANSPORT_ADAPTER) | ||
|
|
||
| # ClickHouse supplies its own HTTP transport (PocoAzureHTTPClient), so neither the |
There was a problem hiding this comment.
Removing the SDK curl adapter also removes the default transport used by Azure Identity credentials. ClickHouse sets PocoAzureHTTPClient on BlobClientOptions, but ManagedIdentityCredential and WorkloadIdentityCredential are still constructed with default TokenCredentialOptions (for example in AzureBlobStorageCommon.cpp), and the identity SDK builds a separate HttpPipeline from those options when fetching tokens. With neither BUILD_CURL_HTTP_TRANSPORT_ADAPTER nor a credential transport set, that token pipeline has no transport, so managed/workload identity authentication breaks even though blob operations use PocoAzureHTTPClient.
Please either keep the Azure SDK curl transport linked, or pass a ClickHouse transport through the Azure Identity credential options before removing the SDK default adapter.
|
Closing in favor of #108296 |
ClickHouse does not use
libcurlthrough the AWS SDK, the Azure SDK, or Arrow. In all three cases the curl-based code is either already excluded from the build or installed as a custom transport, leaving the curl link/sources as dead weight. This removes them so the dependency surface reflects what is actually used.aws-cmakewrapper already builds only thestandardandcrtHTTP clients (neverhttp/curl), andlib_aws.acontains no curl symbols. No change was required.PocoAzureHTTPClienttransport (client_options.Transport.Transport), so the SDK'slibcurltransport adapter was dead code. This stops compilinghttp/curl/curl.cpp, drops theBUILD_CURL_HTTP_TRANSPORT_ADAPTERdefinition and thech_contrib::curllink, and removes the vestigial<azure/core/http/curl_transport.hpp>include. TheCurlMemoryLeakunit test relied on the defaultlibcurltransport and is removed together with it.lib_arrow.areferenced no curl symbols. This drops thech_contrib::curllink.librdkafkastill linksch_contrib::curl(it genuinely uses it for the SASL/OAUTHBEARER OIDC token endpoint) and is left untouched.Verified by building
clickhouseandunit_tests_dbmsand confirmingnmreports zero undefined curl symbols inlib_azure_sdk.a,lib_arrow.a, andlib_aws.a(and 15 inlib_rdkafka.a, unchanged). AllAzure*unit tests pass.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Do not build or link
libcurlinto the Azure SDK and Arrow contribs, which never used it (ClickHouse uses its own HTTP transport for Azure and excludes Arrow's filesystem layer).Documentation entry for user-facing changes