From 004dff336f7e70aed37fd9311026389a38fe9347 Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Mon, 17 Apr 2023 13:07:28 +0200 Subject: [PATCH] Mark connectors as stable --- .chloggen/connectors-stable.yaml | 16 ++++++++++++++++ otelcol/config_test.go | 7 ------- otelcol/internal/sharedgate/sharedgate.go | 6 ++++-- otelcol/otelcoltest/config_test.go | 6 ------ 4 files changed, 20 insertions(+), 15 deletions(-) create mode 100755 .chloggen/connectors-stable.yaml diff --git a/.chloggen/connectors-stable.yaml b/.chloggen/connectors-stable.yaml new file mode 100755 index 00000000000..9e8dc0bcfb5 --- /dev/null +++ b/.chloggen/connectors-stable.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: connector + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Mark 'service.connectors' featuregate as stable + +# One or more tracking issues or pull requests related to the change +issues: [2336] + +# (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: diff --git a/otelcol/config_test.go b/otelcol/config_test.go index b70d57347b8..470a3f868e4 100644 --- a/otelcol/config_test.go +++ b/otelcol/config_test.go @@ -20,13 +20,10 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" - "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/otelcol/internal/sharedgate" "go.opentelemetry.io/collector/service" "go.opentelemetry.io/collector/service/telemetry" ) @@ -256,10 +253,6 @@ func TestConfigValidate(t *testing.T) { }, } - require.NoError(t, featuregate.GlobalRegistry().Set(sharedgate.ConnectorsFeatureGate.ID(), true)) - defer func() { - require.NoError(t, featuregate.GlobalRegistry().Set(sharedgate.ConnectorsFeatureGate.ID(), false)) - }() for _, test := range testCases { t.Run(test.name, func(t *testing.T) { cfg := test.cfgFn() diff --git a/otelcol/internal/sharedgate/sharedgate.go b/otelcol/internal/sharedgate/sharedgate.go index 1e73d48189e..9db35955670 100644 --- a/otelcol/internal/sharedgate/sharedgate.go +++ b/otelcol/internal/sharedgate/sharedgate.go @@ -19,6 +19,8 @@ import "go.opentelemetry.io/collector/featuregate" var ConnectorsFeatureGate = featuregate.GlobalRegistry().MustRegister( "service.connectors", - featuregate.StageBeta, + featuregate.StageStable, + featuregate.WithRegisterFromVersion("v0.71.0"), featuregate.WithRegisterDescription("Enables 'connectors', a new type of component for transmitting signals between pipelines."), - featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector/issues/2336")) + featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector/issues/2336"), + featuregate.WithRegisterToVersion("v0.78.0")) diff --git a/otelcol/otelcoltest/config_test.go b/otelcol/otelcoltest/config_test.go index 3619d44dec0..83a73f8dde7 100644 --- a/otelcol/otelcoltest/config_test.go +++ b/otelcol/otelcoltest/config_test.go @@ -22,8 +22,6 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/otelcol/internal/sharedgate" "go.opentelemetry.io/collector/service" ) @@ -76,10 +74,6 @@ func TestLoadConfigAndValidate(t *testing.T) { factories, err := NopFactories() assert.NoError(t, err) - require.NoError(t, featuregate.GlobalRegistry().Set(sharedgate.ConnectorsFeatureGate.ID(), true)) - defer func() { - require.NoError(t, featuregate.GlobalRegistry().Set(sharedgate.ConnectorsFeatureGate.ID(), false)) - }() cfgValidate, errValidate := LoadConfigAndValidate(filepath.Join("testdata", "config.yaml"), factories) require.NoError(t, errValidate)