From f92fc890b645862cc2c52bbb882015a8813e8882 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:24:24 +0200 Subject: [PATCH] fix(deps): update module golang.org/x/tools to v0.44.0 (#8173) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [golang.org/x/tools](https://pkg.go.dev/golang.org/x/tools) | [`v0.43.0` → `v0.44.0`](https://cs.opensource.google/go/x/tools/+/refs/tags/v0.43.0...refs/tags/v0.44.0) | ![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2ftools/v0.44.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2ftools/v0.43.0/v0.44.0?slim=true) | --- > [!WARNING] > Some dependencies could not be looked up. Check the [Dependency Dashboard](../issues/5322) for more information. --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: dmathieu --- bridge/opencensus/test/bridge_test.go | 17 +++++++++-------- internal/tools/go.mod | 2 +- internal/tools/go.sum | 4 ++-- sdk/resource/host_id_exec.go | 7 +++++-- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/bridge/opencensus/test/bridge_test.go b/bridge/opencensus/test/bridge_test.go index 6826826cc..b511de67f 100644 --- a/bridge/opencensus/test/bridge_test.go +++ b/bridge/opencensus/test/bridge_test.go @@ -4,6 +4,7 @@ package test import ( + "slices" "testing" octrace "go.opencensus.io/trace" @@ -52,13 +53,13 @@ func TestMixedAPIs(t *testing.T) { } var parent trace.SpanContext - for i := len(spans) - 1; i >= 0; i-- { + for _, v := range slices.Backward(spans) { // Verify that OpenCensus spans and OpenTelemetry spans have each // other as parents. - if psid := spans[i].Parent().SpanID(); psid != parent.SpanID() { - t.Errorf("Span %v had parent %v. Expected %v", spans[i].Name(), psid, parent.SpanID()) + if psid := v.Parent().SpanID(); psid != parent.SpanID() { + t.Errorf("Span %v had parent %v. Expected %v", v.Name(), psid, parent.SpanID()) } - parent = spans[i].SpanContext() + parent = v.SpanContext() } } @@ -138,13 +139,13 @@ func TestToFromContext(t *testing.T) { } var parent trace.SpanContext - for i := len(spans) - 1; i >= 0; i-- { + for _, v := range slices.Backward(spans) { // Verify that OpenCensus spans and OpenTelemetry spans have each // other as parents. - if psid := spans[i].Parent().SpanID(); psid != parent.SpanID() { - t.Errorf("Span %v had parent %v. Expected %v", spans[i].Name(), psid, parent.SpanID()) + if psid := v.Parent().SpanID(); psid != parent.SpanID() { + t.Errorf("Span %v had parent %v. Expected %v", v.Name(), psid, parent.SpanID()) } - parent = spans[i].SpanContext() + parent = v.SpanContext() } } diff --git a/internal/tools/go.mod b/internal/tools/go.mod index 67ccde17d..8edca5741 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -13,7 +13,7 @@ require ( go.opentelemetry.io/build-tools/gotmpl v0.29.0 go.opentelemetry.io/build-tools/multimod v0.29.0 golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 - golang.org/x/tools v0.43.0 + golang.org/x/tools v0.44.0 golang.org/x/vuln v1.1.4 ) diff --git a/internal/tools/go.sum b/internal/tools/go.sum index dfc681339..b816a567a 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -629,8 +629,8 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s= -golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= +golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c= +golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI= golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= diff --git a/sdk/resource/host_id_exec.go b/sdk/resource/host_id_exec.go index d9e5d1a8f..e239ead02 100644 --- a/sdk/resource/host_id_exec.go +++ b/sdk/resource/host_id_exec.go @@ -5,10 +5,13 @@ package resource // import "go.opentelemetry.io/otel/sdk/resource" -import "os/exec" +import ( + "context" + "os/exec" +) func execCommand(name string, arg ...string) (string, error) { - cmd := exec.Command(name, arg...) + cmd := exec.CommandContext(context.Background(), name, arg...) b, err := cmd.Output() if err != nil { return "", err