From 73c3f4425fe8eef96b3834e14315df340aa4983a Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Wed, 2 Oct 2024 11:54:17 -0700 Subject: [PATCH 1/3] resolve dependency conflict --- Cargo.toml | 6 +++--- opentelemetry-otlp/CHANGELOG.md | 5 +++++ opentelemetry-proto/CHANGELOG.md | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 37e52f90bc..1f6b694b35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,10 +40,10 @@ serde = { version = "1.0", default-features = false } serde_json = "1.0" temp-env = "0.3.6" thiserror = { version = "1", default-features = false } -tonic = { version = "0.12", default-features = false } -tonic-build = "0.12" +tonic = { version = "0.12.3", default-features = false } +tonic-build = "0.12.3" tokio = { version = "1", default-features = false } -tokio-stream = "0.1.1" +tokio-stream = "0.1.16" tracing = { version = "0.1", default-features = false } tracing-core = { version = "0.1", default-features = false } tracing-subscriber = { version = "0.3", default-features = false } diff --git a/opentelemetry-otlp/CHANGELOG.md b/opentelemetry-otlp/CHANGELOG.md index 099ca871fb..d3af39c552 100644 --- a/opentelemetry-otlp/CHANGELOG.md +++ b/opentelemetry-otlp/CHANGELOG.md @@ -2,6 +2,11 @@ ## vNext +## v0.26.1 +Released 2024-Oct-2 + + - Pin tonic to v0.12.3 + ## v0.26.0 Released 2024-Sep-30 diff --git a/opentelemetry-proto/CHANGELOG.md b/opentelemetry-proto/CHANGELOG.md index 3212534425..4b883117b0 100644 --- a/opentelemetry-proto/CHANGELOG.md +++ b/opentelemetry-proto/CHANGELOG.md @@ -2,6 +2,11 @@ ## vNext +## v0.26.1 +Released 2024-Oct-2 + + - Pin tonic to v0.12.3 + ## v0.26.0 Released 2024-Sep-30 From b1006eb5265b1b5b5cfecb2f29aaab5f3ea60460 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Wed, 2 Oct 2024 12:53:29 -0700 Subject: [PATCH 2/3] bump specific to proto --- Cargo.toml | 6 +++--- opentelemetry-proto/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1f6b694b35..37e52f90bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,10 +40,10 @@ serde = { version = "1.0", default-features = false } serde_json = "1.0" temp-env = "0.3.6" thiserror = { version = "1", default-features = false } -tonic = { version = "0.12.3", default-features = false } -tonic-build = "0.12.3" +tonic = { version = "0.12", default-features = false } +tonic-build = "0.12" tokio = { version = "1", default-features = false } -tokio-stream = "0.1.16" +tokio-stream = "0.1.1" tracing = { version = "0.1", default-features = false } tracing-core = { version = "0.1", default-features = false } tracing-subscriber = { version = "0.3", default-features = false } diff --git a/opentelemetry-proto/Cargo.toml b/opentelemetry-proto/Cargo.toml index 6b0243961b..4d29533084 100644 --- a/opentelemetry-proto/Cargo.toml +++ b/opentelemetry-proto/Cargo.toml @@ -49,7 +49,7 @@ with-serde = ["serde", "hex"] populate-logs-event-name = [] [dependencies] -tonic = { workspace = true, optional = true, features = ["codegen", "prost"] } +tonic = { version = "0.12.3", optional = true, features = ["codegen", "prost"] } prost = { workspace = true, optional = true } opentelemetry = { version = "0.26", default-features = false, path = "../opentelemetry" } opentelemetry_sdk = { version = "0.26", default-features = false, path = "../opentelemetry-sdk" } From 0f496c633167030ded76f79a9ee8c7350f131175 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Wed, 2 Oct 2024 13:26:22 -0700 Subject: [PATCH 3/3] fix --- scripts/patch_dependencies.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/scripts/patch_dependencies.sh b/scripts/patch_dependencies.sh index cf36b55a98..2fd36ff403 100755 --- a/scripts/patch_dependencies.sh +++ b/scripts/patch_dependencies.sh @@ -12,17 +12,27 @@ rust_version=$(rustc --version | cut -d' ' -f2) target_version="1.71.1" function patch_version() { - local latest_version=$(cargo search --limit 1 $1 | head -1 | cut -d'"' -f2) - echo "patching $1 from $latest_version to $2" - cargo update -p $1:$latest_version --precise $2 + local package=$1 + local new_version=$2 + local crate_path=$3 + local latest_version=$(cargo search --limit 1 $package | head -1 | cut -d'"' -f2) + if [ -n "$crate_path" ]; then + # If crate_path is provided, patch only for the specified crate + echo "-->Patching $package in $crate_path from $latest_version to $new_version" + cargo update -p $package:$latest_version --precise $new_version --manifest-path "$crate_path/Cargo.toml" + else + # If crate_path is not provided, patch for the entire workspace + echo "Patching $package in the entire workspace from $latest_version to $new_version" + cargo update -p $package:$latest_version --precise $new_version + fi } patch_version cc 1.0.105 patch_version url 2.5.0 if version_lt "$rust_version" "$target_version"; then - patch_version tonic 0.12.2 + patch_version tonic 0.12.3 "opentelemetry-sdk" patch_version hyper-rustls 0.27.2 # 0.27.3 needs rustc v1.70.0 - patch_version tokio-util 0.7.11 # 0.7.12 needs rustc v1.70.0 - patch_version tokio-stream 0.1.15 # 0.1.16 needs rustc v1.70.0 - patch_version tokio 1.38.0 # 1.39 needs msrv bump to rustc 1.70 + patch_version tokio-util 0.7.11 "opentelemetry-sdk" # 0.7.12 needs rustc v1.70.0 + patch_version tokio-stream 0.1.16 "opentelemetry-sdk" # 0.1.16 needs rustc v1.70.0 + patch_version tokio 1.38.0 "opentelemetry-sdk" # 1.39 needs msrv bump to rustc 1.70 fi