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 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" } 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