Skip to content

Commit

Permalink
Do not expand env variables for regular config section
Browse files Browse the repository at this point in the history
After recent changes in the collector core, we can rely on the upstream to expand environmental variables along with $$ escaping. Unfortunataly we cannot do that for the config_sources section as it's custom for our distro. So we need to split the behaviour for a while just to unblock the 0.107.0 release.

This change also fixes double $$ escaping bug. See the corrected integration tests that were confirming invalid behavior before.

Later we can refactor it further and migrate the config sources in the config providers that can be handled upstream and significantly reduce amount of code we maintain.
  • Loading branch information
dmitryax committed Aug 9, 2024
1 parent c016bb9 commit 7e3de9a
Show file tree
Hide file tree
Showing 20 changed files with 363 additions and 439 deletions.
84 changes: 42 additions & 42 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -120,31 +120,31 @@ require (
github.com/stretchr/testify v1.9.0
go.etcd.io/bbolt v1.3.10
go.etcd.io/etcd/client/v2 v2.305.15
go.opentelemetry.io/collector/config/confighttp v0.106.1
go.opentelemetry.io/collector/config/configtelemetry v0.106.1
go.opentelemetry.io/collector/confmap v0.106.1
go.opentelemetry.io/collector/confmap/converter/expandconverter v0.106.1
go.opentelemetry.io/collector/confmap/provider/envprovider v0.106.1
go.opentelemetry.io/collector/confmap/provider/fileprovider v0.106.1
go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.106.1
go.opentelemetry.io/collector/connector v0.106.1
go.opentelemetry.io/collector/connector/forwardconnector v0.106.1
go.opentelemetry.io/collector/consumer/consumertest v0.106.1
go.opentelemetry.io/collector/exporter v0.106.1
go.opentelemetry.io/collector/exporter/debugexporter v0.106.1
go.opentelemetry.io/collector/exporter/loggingexporter v0.106.1
go.opentelemetry.io/collector/exporter/otlpexporter v0.106.1
go.opentelemetry.io/collector/exporter/otlphttpexporter v0.106.1
go.opentelemetry.io/collector/extension v0.106.1
go.opentelemetry.io/collector/extension/ballastextension v0.106.1
go.opentelemetry.io/collector/extension/zpagesextension v0.106.1
go.opentelemetry.io/collector/otelcol v0.106.1
go.opentelemetry.io/collector/config/confighttp v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/config/configtelemetry v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/confmap v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/confmap/converter/expandconverter v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/confmap/provider/envprovider v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/confmap/provider/fileprovider v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/confmap/provider/yamlprovider v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/connector v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/connector/forwardconnector v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/consumer/consumertest v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/exporter v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/exporter/debugexporter v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/exporter/loggingexporter v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/exporter/otlpexporter v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/exporter/otlphttpexporter v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/extension v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/extension/ballastextension v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/extension/zpagesextension v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/otelcol v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/pdata v1.12.0
go.opentelemetry.io/collector/processor v0.106.1
go.opentelemetry.io/collector/processor/batchprocessor v0.106.1
go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.106.1
go.opentelemetry.io/collector/receiver v0.106.1
go.opentelemetry.io/collector/receiver/otlpreceiver v0.106.1
go.opentelemetry.io/collector/processor v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/processor/batchprocessor v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/receiver v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/receiver/otlpreceiver v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/otel/metric v1.28.0
go.opentelemetry.io/otel/trace v1.28.0
go.uber.org/atomic v1.11.0
Expand Down Expand Up @@ -299,7 +299,7 @@ require (
github.com/seccomp/libseccomp-golang v0.10.0 // indirect
github.com/sethvargo/go-limiter v0.7.2 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/shirou/gopsutil/v4 v4.24.6 // indirect
github.com/shirou/gopsutil/v4 v4.24.7 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/signalfx/golib/v3 v3.3.53 // indirect
github.com/signalfx/signalfx-agent v1.0.1-0.20230222185249-54e5d1064c5b // indirect
Expand All @@ -320,24 +320,24 @@ require (
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
go.mongodb.org/mongo-driver v1.16.0 // indirect
go.opentelemetry.io/collector v0.106.1 // indirect
go.opentelemetry.io/collector/client v0.106.1 // indirect
go.opentelemetry.io/collector/config/configauth v0.106.1 // indirect
go.opentelemetry.io/collector v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/collector/client v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/collector/component/componentprofiles v0.106.1 // indirect
go.opentelemetry.io/collector/config/configauth v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/collector/config/configcompression v1.12.0 // indirect
go.opentelemetry.io/collector/config/configgrpc v0.106.1 // indirect
go.opentelemetry.io/collector/config/confignet v0.106.1 // indirect
go.opentelemetry.io/collector/config/configgrpc v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/collector/config/confignet v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/collector/config/configopaque v1.12.0 // indirect
go.opentelemetry.io/collector/config/configretry v1.12.0 // indirect
go.opentelemetry.io/collector/config/configtls v1.12.0 // indirect
go.opentelemetry.io/collector/config/internal v0.106.1 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.1 // indirect
go.opentelemetry.io/collector/extension/auth v0.106.1 // indirect
go.opentelemetry.io/collector/filter v0.106.1 // indirect
go.opentelemetry.io/collector/internal/globalgates v0.106.1 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.106.1 // indirect
go.opentelemetry.io/collector/service v0.106.1 // indirect
go.opentelemetry.io/collector/config/internal v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/collector/consumer/consumerprofiles v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/collector/extension/auth v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/collector/filter v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/collector/internal/globalgates v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/collector/service v0.106.2-0.20240807230255-88b315394a04 // indirect
go.opentelemetry.io/contrib/config v0.8.0 // indirect
go.opentelemetry.io/otel/bridge/opencensus v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.4.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 // indirect
Expand Down Expand Up @@ -593,10 +593,10 @@ require (
go.etcd.io/etcd/client/pkg/v3 v3.5.15 // indirect
go.mongodb.org/atlas v0.36.0 // indirect
go.opencensus.io v0.24.0
go.opentelemetry.io/collector/component v0.106.1
go.opentelemetry.io/collector/consumer v0.106.1
go.opentelemetry.io/collector/component v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/consumer v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/collector/featuregate v1.12.0 // indirect
go.opentelemetry.io/collector/semconv v0.106.1
go.opentelemetry.io/collector/semconv v0.106.2-0.20240807230255-88b315394a04
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.28.0 // indirect
Expand All @@ -607,7 +607,7 @@ require (
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
golang.org/x/mod v0.18.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/term v0.23.0 // indirect
Expand Down
Loading

0 comments on commit 7e3de9a

Please sign in to comment.