From a3c7d953e2fbe06baeda369cdc49fe6efdc3b9f4 Mon Sep 17 00:00:00 2001 From: Zhengke Zhou Date: Sat, 18 Jan 2025 03:55:06 +0800 Subject: [PATCH] [chore] Revert the change in processortest setting creation (#12107) #### Description Revert the `nop_processor.NewNopSettings` change, as it is no longer needed. #### Link to tracking issue Fixes #11433 #### Testing #### Documentation --- .chloggen/revert-change-name.yaml | 25 ++++++++++++++++++++++++ processor/processortest/go.mod | 2 +- processor/processortest/nop_processor.go | 4 +--- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 .chloggen/revert-change-name.yaml diff --git a/.chloggen/revert-change-name.yaml b/.chloggen/revert-change-name.yaml new file mode 100644 index 00000000000..d5f7db2a84a --- /dev/null +++ b/.chloggen/revert-change-name.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: processorteset + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Revert the nop_processor.NewNopSettings change, as it is no longer needed + +# One or more tracking issues or pull requests related to the change +issues: [11433] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [api] diff --git a/processor/processortest/go.mod b/processor/processortest/go.mod index ff86592e125..bcd0e41eb63 100644 --- a/processor/processortest/go.mod +++ b/processor/processortest/go.mod @@ -3,7 +3,6 @@ module go.opentelemetry.io/collector/processor/processortest go 1.22.0 require ( - github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.117.0 go.opentelemetry.io/collector/component/componentstatus v0.117.0 @@ -25,6 +24,7 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect diff --git a/processor/processortest/nop_processor.go b/processor/processortest/nop_processor.go index adcbf60ca38..4260bc17d45 100644 --- a/processor/processortest/nop_processor.go +++ b/processor/processortest/nop_processor.go @@ -6,8 +6,6 @@ package processortest // import "go.opentelemetry.io/collector/processor/process import ( "context" - "github.com/google/uuid" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer" @@ -22,7 +20,7 @@ var nopType = component.MustNewType("nop") // NewNopSettings returns a new nop settings for Create* functions. func NewNopSettings() processor.Settings { return processor.Settings{ - ID: component.NewIDWithName(nopType, uuid.NewString()), + ID: component.NewID(nopType), TelemetrySettings: componenttest.NewNopTelemetrySettings(), BuildInfo: component.NewDefaultBuildInfo(), }