From 6025dfdf3bff9494bf980e677dd885b06a6c432e Mon Sep 17 00:00:00 2001 From: Nicolas Benes Date: Fri, 15 May 2026 01:38:39 +0200 Subject: [PATCH] opentelemetry-cpp: 1.26.0 -> 1.27.0, opentelemetry-proto: 1.8.0 -> 1.10.0 https://github.com/open-telemetry/opentelemetry-cpp/releases/tag/v1.27.0 --- ...sable-tests-requiring-network-access.patch | 45 +++++++++++++++---- pkgs/by-name/op/opentelemetry-cpp/package.nix | 22 +++++++-- 2 files changed, 54 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/op/opentelemetry-cpp/0001-Disable-tests-requiring-network-access.patch b/pkgs/by-name/op/opentelemetry-cpp/0001-Disable-tests-requiring-network-access.patch index 7a07185dd6da..6c6740aaee3c 100644 --- a/pkgs/by-name/op/opentelemetry-cpp/0001-Disable-tests-requiring-network-access.patch +++ b/pkgs/by-name/op/opentelemetry-cpp/0001-Disable-tests-requiring-network-access.patch @@ -1,8 +1,8 @@ diff --git a/ext/test/http/curl_http_test.cc b/ext/test/http/curl_http_test.cc -index e8299202..19dbd7b1 100644 +index 2e2cf3d41..d436f25c2 100644 --- a/ext/test/http/curl_http_test.cc +++ b/ext/test/http/curl_http_test.cc -@@ -270,7 +270,7 @@ TEST_F(BasicCurlHttpTests, HttpResponse) +@@ -273,7 +273,7 @@ TEST_F(BasicCurlHttpTests, HttpResponse) ASSERT_EQ(count, 4); } @@ -11,7 +11,7 @@ index e8299202..19dbd7b1 100644 { received_requests_.clear(); auto session_manager = http_client::HttpClientFactory::Create(); -@@ -287,7 +287,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequest) +@@ -290,7 +290,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequest) ASSERT_TRUE(handler->got_response_.load(std::memory_order_acquire)); } @@ -20,7 +20,7 @@ index e8299202..19dbd7b1 100644 { received_requests_.clear(); auto session_manager = http_client::HttpClientFactory::Create(); -@@ -313,7 +313,7 @@ TEST_F(BasicCurlHttpTests, SendPostRequest) +@@ -316,7 +316,7 @@ TEST_F(BasicCurlHttpTests, SendPostRequest) session_manager->FinishAllSessions(); } @@ -29,7 +29,34 @@ index e8299202..19dbd7b1 100644 { received_requests_.clear(); auto session_manager = http_client::HttpClientFactory::Create(); -@@ -442,7 +442,7 @@ TEST_F(BasicCurlHttpTests, ExponentialBackoffRetry) +@@ -361,7 +361,7 @@ TEST_F(BasicCurlHttpTests, CurlHttpOperations) + } + + #ifdef ENABLE_OTLP_RETRY_PREVIEW +-TEST_F(BasicCurlHttpTests, RetryPolicyEnabled) ++TEST_F(BasicCurlHttpTests, DISABLED_RetryPolicyEnabled) + { + RetryEventHandler handler; + http_client::HttpSslOptions no_ssl; +@@ -379,7 +379,7 @@ TEST_F(BasicCurlHttpTests, RetryPolicyEnabled) + ASSERT_TRUE(operation.IsRetryable()); + } + +-TEST_F(BasicCurlHttpTests, RetryPolicyDisabled) ++TEST_F(BasicCurlHttpTests, DISABLED_RetryPolicyDisabled) + { + RetryEventHandler handler; + http_client::HttpSslOptions no_ssl; +@@ -397,7 +397,7 @@ TEST_F(BasicCurlHttpTests, RetryPolicyDisabled) + ASSERT_FALSE(operation.IsRetryable()); + } + +-TEST_F(BasicCurlHttpTests, ExponentialBackoffRetry) ++TEST_F(BasicCurlHttpTests, DISABLED_ExponentialBackoffRetry) + { + using ::testing::AllOf; + using ::testing::Gt; +@@ -445,7 +445,7 @@ TEST_F(BasicCurlHttpTests, ExponentialBackoffRetry) } #endif // ENABLE_OTLP_RETRY_PREVIEW @@ -38,7 +65,7 @@ index e8299202..19dbd7b1 100644 { received_requests_.clear(); curl::HttpClientSync http_client; -@@ -467,7 +467,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequestSyncTimeout) +@@ -470,7 +470,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequestSyncTimeout) result.GetSessionState() == http_client::SessionState::SendFailed); } @@ -47,7 +74,7 @@ index e8299202..19dbd7b1 100644 { received_requests_.clear(); curl::HttpClientSync http_client; -@@ -570,7 +570,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequestAsyncTimeout) +@@ -576,7 +576,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequestAsyncTimeout) } } @@ -56,7 +83,7 @@ index e8299202..19dbd7b1 100644 { curl::HttpClient http_client; -@@ -609,7 +609,7 @@ TEST_F(BasicCurlHttpTests, SendPostRequestAsync) +@@ -615,7 +615,7 @@ TEST_F(BasicCurlHttpTests, SendPostRequestAsync) } } @@ -65,7 +92,7 @@ index e8299202..19dbd7b1 100644 { curl::HttpClient http_client; -@@ -647,7 +647,7 @@ TEST_F(BasicCurlHttpTests, FinishInAsyncCallback) +@@ -653,7 +653,7 @@ TEST_F(BasicCurlHttpTests, FinishInAsyncCallback) } } diff --git a/pkgs/by-name/op/opentelemetry-cpp/package.nix b/pkgs/by-name/op/opentelemetry-cpp/package.nix index 866bb5731046..e144e405b3a0 100644 --- a/pkgs/by-name/op/opentelemetry-cpp/package.nix +++ b/pkgs/by-name/op/opentelemetry-cpp/package.nix @@ -16,24 +16,26 @@ enablePrometheus ? false, enableElasticSearch ? false, enableZipkin ? false, + # for passthru.tests + opentelemetry-cpp, }: let opentelemetry-proto = fetchFromGitHub { owner = "open-telemetry"; repo = "opentelemetry-proto"; - rev = "v1.8.0"; - hash = "sha256-5rNJDMjRFIOY/3j+PkAujbippBmxtAudU9busK0q8p0="; + rev = "v1.10.0"; + hash = "sha256-RJrS0C4GZfUdETff+ZlbJr67Z+JObrLsDvyGqobf4UI="; }; in stdenv.mkDerivation (finalAttrs: { pname = "opentelemetry-cpp"; - version = "1.26.0"; + version = "1.27.0"; src = fetchFromGitHub { owner = "open-telemetry"; repo = "opentelemetry-cpp"; rev = "v${finalAttrs.version}"; - hash = "sha256-jYYTPcTFIrgMn1NUjwacZC1J26TZRKdGlq+5yw7NNsU="; + hash = "sha256-7G9uHMlV7/rHvD/g+ktxT6RTfDRSfsXQO7QHk26XVKs="; }; patches = [ @@ -99,6 +101,18 @@ stdenv.mkDerivation (finalAttrs: { passthru.updateScript = nix-update-script { }; + passthru.tests = { + # Unfortunately there is no such thing as finalAttrs.finalPackage.override, + # so we have to resort to this. + full = opentelemetry-cpp.override { + enableHttp = true; + enableGrpc = true; + enablePrometheus = true; + enableElasticSearch = true; + enableZipkin = true; + }; + }; + meta = { description = "OpenTelemetry C++ Client Library"; homepage = "https://github.com/open-telemetry/opentelemetry-cpp";