From 5e296551d2007e59100b644de0fddac391b955cd Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:41:16 -0600 Subject: [PATCH] [confmap] Remove stable confmap.unifyEnvVarExpansion feature gate (#11007) #### Description Removes stable `confmap.unifyEnvVarExpansion` feature gate. --- .../confmap-remove-unify-feature-gate.yaml | 25 +++++++++++++++++++ internal/globalgates/globalgates.go | 6 ----- otelcol/command.go | 3 +-- otelcol/go.mod | 2 +- 4 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 .chloggen/confmap-remove-unify-feature-gate.yaml diff --git a/.chloggen/confmap-remove-unify-feature-gate.yaml b/.chloggen/confmap-remove-unify-feature-gate.yaml new file mode 100644 index 00000000000..a398c864b8c --- /dev/null +++ b/.chloggen/confmap-remove-unify-feature-gate.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: confmap + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Removes stable `confmap.unifyEnvVarExpansion` feature gate. + +# One or more tracking issues or pull requests related to the change +issues: [11007] + +# (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: [] diff --git a/internal/globalgates/globalgates.go b/internal/globalgates/globalgates.go index d74027d5c2f..0f36ecad4ac 100644 --- a/internal/globalgates/globalgates.go +++ b/internal/globalgates/globalgates.go @@ -5,12 +5,6 @@ package globalgates // import "go.opentelemetry.io/collector/internal/globalgate import "go.opentelemetry.io/collector/featuregate" -var UseUnifiedEnvVarExpansionRules = featuregate.GlobalRegistry().MustRegister("confmap.unifyEnvVarExpansion", - featuregate.StageStable, - featuregate.WithRegisterFromVersion("v0.103.0"), - featuregate.WithRegisterToVersion("v0.109.0"), - featuregate.WithRegisterDescription("`${FOO}` will now be expanded as if it was `${env:FOO}` and no longer expands $ENV syntax. See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/rfcs/env-vars.md for more details. When this feature gate is stable, expandconverter will be removed.")) - var NoopTracerProvider = featuregate.GlobalRegistry().MustRegister("service.noopTracerProvider", featuregate.StageAlpha, featuregate.WithRegisterFromVersion("v0.107.0"), diff --git a/otelcol/command.go b/otelcol/command.go index 3eaeeee6c5a..6efd16df562 100644 --- a/otelcol/command.go +++ b/otelcol/command.go @@ -10,7 +10,6 @@ import ( "github.com/spf13/cobra" "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/internal/globalgates" ) // NewCommand constructs a new cobra.Command using the given CollectorSettings. @@ -55,7 +54,7 @@ func updateSettingsUsingFlags(set *CollectorSettings, flags *flag.FlagSet) error return errors.New("at least one config flag must be provided") } - if globalgates.UseUnifiedEnvVarExpansionRules.IsEnabled() && set.ConfigProviderSettings.ResolverSettings.DefaultScheme == "" { + if set.ConfigProviderSettings.ResolverSettings.DefaultScheme == "" { set.ConfigProviderSettings.ResolverSettings.DefaultScheme = "env" } diff --git a/otelcol/go.mod b/otelcol/go.mod index 4b7f325485b..b72bc901717 100644 --- a/otelcol/go.mod +++ b/otelcol/go.mod @@ -13,7 +13,6 @@ require ( go.opentelemetry.io/collector/exporter v0.108.1 go.opentelemetry.io/collector/extension v0.108.1 go.opentelemetry.io/collector/featuregate v1.14.1 - go.opentelemetry.io/collector/internal/globalgates v0.108.1 go.opentelemetry.io/collector/processor v0.108.1 go.opentelemetry.io/collector/receiver v0.108.1 go.opentelemetry.io/collector/service v0.108.1 @@ -68,6 +67,7 @@ require ( go.opentelemetry.io/collector/consumer v0.108.1 // indirect go.opentelemetry.io/collector/consumer/consumerprofiles v0.108.1 // indirect go.opentelemetry.io/collector/consumer/consumertest v0.108.1 // indirect + go.opentelemetry.io/collector/internal/globalgates v0.108.1 // indirect go.opentelemetry.io/collector/pdata v1.14.1 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.108.1 // indirect go.opentelemetry.io/collector/pdata/testdata v0.108.1 // indirect