Skip to content

Commit

Permalink
[chore] Upgrade core dependencies (#5136)
Browse files Browse the repository at this point in the history
* [chore] Upgrade core dependencies

Update to 0.105.0 version + cherry pick open-telemetry/opentelemetry-collector#10716

Also, disabling both confmap upstream feature gates for now. Enabling confmap.unifyEnvVarExpansion doesn't have any effect other than introducing a bug. The warning messages that are expected to show with the FG are ignored in our repo

We have duplicated functionality in our distro which needs to be deprecated first. Then we can remove it and align with upstream.
  • Loading branch information
dmitryax authored Jul 29, 2024
1 parent 63ecd43 commit 844ca5f
Show file tree
Hide file tree
Showing 17 changed files with 1,164 additions and 1,091 deletions.
425 changes: 217 additions & 208 deletions go.mod

Large diffs are not rendered by default.

920 changes: 465 additions & 455 deletions go.sum

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion internal/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ var DefaultAgentConfigWindows = func() string {
return filepath.Clean(path)
}()

var defaultFeatureGates = []string{}
var defaultFeatureGates = []string{
// Remove the feature gates once we deprecate our env var expansion mechanism and adopt the upstream one.
"-confmap.strictlyTypedInput",
"-confmap.unifyEnvVarExpansion",
}

type Settings struct {
discovery *discovery.Provider
Expand Down
21 changes: 15 additions & 6 deletions internal/settings/settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ func TestNewSettingsNoConvertConfig(t *testing.T) {
"splunk.property:splunk.discovery.receiver.receiver-type/name.config.field.two=val.two",
}, settings.ResolverURIs())
require.Equal(t, 2, len(settings.ConfMapConverterFactories()))
require.Equal(t, []string{"--feature-gates", "foo", "--feature-gates", "-bar"}, settings.ColCoreArgs())
require.Equal(t, []string{"--feature-gates", "foo", "--feature-gates", "-bar", "--feature-gates",
"-confmap.strictlyTypedInput", "--feature-gates", "-confmap.unifyEnvVarExpansion"}, settings.ColCoreArgs())
}

func TestNewSettingsConvertConfig(t *testing.T) {
Expand All @@ -157,7 +158,8 @@ func TestNewSettingsConvertConfig(t *testing.T) {

require.Equal(t, []string{configPath, anotherConfigPath}, settings.ResolverURIs())
require.Equal(t, 12, len(settings.ConfMapConverterFactories()))
require.Equal(t, []string{"--feature-gates", "foo", "--feature-gates", "-bar"}, settings.ColCoreArgs())
require.Equal(t, []string{"--feature-gates", "foo", "--feature-gates", "-bar", "--feature-gates",
"-confmap.strictlyTypedInput", "--feature-gates", "-confmap.unifyEnvVarExpansion"}, settings.ColCoreArgs())
}

func TestSplunkConfigYamlUtilizedInResolverURIs(t *testing.T) {
Expand All @@ -184,7 +186,8 @@ func TestNewSettingsWithValidate(t *testing.T) {
settings, err := New([]string{"validate"})
require.NoError(t, err)
require.NotNil(t, settings)
require.Equal(t, []string{"validate"}, settings.ColCoreArgs())
require.Equal(t, []string{"--feature-gates", "-confmap.strictlyTypedInput", "--feature-gates",
"-confmap.unifyEnvVarExpansion", "validate"}, settings.ColCoreArgs())
}

func TestCheckRuntimeParams_Default(t *testing.T) {
Expand Down Expand Up @@ -338,9 +341,15 @@ func TestSetDefaultEnvVarsSetsInterfaceFromConfigOption(t *testing.T) {
func TestSetDefaultFeatureGatesRespectsOverrides(t *testing.T) {
t.Cleanup(setRequiredEnvVars(t))
for _, args := range [][]string{
{"--feature-gates", "some-gate", "--feature-gates", "telemetry.useOtelForInternalMetrics", "--feature-gates", "another-gate"},
{"--feature-gates", "some-gate", "--feature-gates", "+telemetry.useOtelForInternalMetrics", "--feature-gates", "another-gate"},
{"--feature-gates", "some-gate", "--feature-gates", "-telemetry.useOtelForInternalMetrics", "--feature-gates", "another-gate"},
{"--feature-gates", "some-gate", "--feature-gates", "telemetry.useOtelForInternalMetrics", "--feature-gates",
"another-gate", "--feature-gates", "-confmap.strictlyTypedInput", "--feature-gates",
"-confmap.unifyEnvVarExpansion"},
{"--feature-gates", "some-gate", "--feature-gates", "+telemetry.useOtelForInternalMetrics",
"--feature-gates", "another-gate", "--feature-gates", "-confmap.strictlyTypedInput", "--feature-gates",
"-confmap.unifyEnvVarExpansion"},
{"--feature-gates", "some-gate", "--feature-gates", "-telemetry.useOtelForInternalMetrics",
"--feature-gates", "another-gate", "--feature-gates", "-confmap.strictlyTypedInput", "--feature-gates",
"-confmap.unifyEnvVarExpansion"},
} {
t.Run(strings.Join(args, " "), func(t *testing.T) {
settings, err := New(args)
Expand Down
3 changes: 2 additions & 1 deletion internal/signalfx-agent/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
github.com/beevik/ntp v1.4.3
github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/docker/docker v25.0.5+incompatible
github.com/docker/docker v26.1.4+incompatible
github.com/docker/go-connections v0.5.0 // indirect
github.com/go-playground/locales v0.14.1
github.com/go-playground/universal-translator v0.18.1
Expand Down Expand Up @@ -177,6 +177,7 @@ require (
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed // indirect
github.com/miekg/dns v1.1.58 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mtibben/percent v0.2.1 // indirect
Expand Down
6 changes: 4 additions & 2 deletions internal/signalfx-agent/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=
github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=
github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE=
github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v26.1.4+incompatible h1:vuTpXDuoga+Z38m1OZHzl7NKisKWaWlhjQk7IDPSLsU=
github.com/docker/docker v26.1.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
Expand Down Expand Up @@ -405,6 +405,8 @@ github.com/miekg/dns v1.1.58 h1:ca2Hdkz+cDg/7eNF6V56jjzuZ4aCAE+DbVkILdQWG/4=
github.com/miekg/dns v1.1.58/go.mod h1:Ypv+3b/KadlvW9vJfXOTf300O4UqaHFzFCuHz+rPkBY=
github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0=
github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA=
github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
Expand Down
34 changes: 18 additions & 16 deletions internal/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/ory/go-acc v0.2.8
github.com/pavius/impi v0.0.3
github.com/tcnksm/ghr v0.16.2
go.opentelemetry.io/collector/cmd/mdatagen v0.104.0
go.opentelemetry.io/collector/cmd/mdatagen v0.105.0
golang.org/x/tools v0.23.0
golang.org/x/vuln v1.1.2
)
Expand Down Expand Up @@ -137,6 +137,7 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/moricho/tparallel v0.3.1 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nakabonne/nestif v0.3.1 // indirect
github.com/nishanths/exhaustive v0.12.0 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
Expand All @@ -150,8 +151,8 @@ require (
github.com/polyfloyd/go-errorlint v1.5.2 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.54.0 // indirect
github.com/prometheus/procfs v0.15.0 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/quasilyte/go-ruleguard v0.4.2 // indirect
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
github.com/quasilyte/gogrep v0.5.0 // indirect
Expand Down Expand Up @@ -200,16 +201,17 @@ require (
gitlab.com/bosi/decorder v0.4.2 // indirect
go-simpler.org/musttag v0.12.2 // indirect
go-simpler.org/sloglint v0.7.1 // indirect
go.opentelemetry.io/collector/component v0.104.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect
go.opentelemetry.io/collector/confmap v0.104.0 // indirect
go.opentelemetry.io/collector/confmap/provider/fileprovider v0.104.0 // indirect
go.opentelemetry.io/collector/featuregate v1.11.0 // indirect
go.opentelemetry.io/collector/filter v0.104.0 // indirect
go.opentelemetry.io/collector/pdata v1.11.0 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
go.opentelemetry.io/collector/component v0.105.0 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect
go.opentelemetry.io/collector/confmap v0.105.1-0.20240724211854-1c96225b6445 // indirect
go.opentelemetry.io/collector/confmap/provider/fileprovider v0.105.0 // indirect
go.opentelemetry.io/collector/featuregate v1.12.0 // indirect
go.opentelemetry.io/collector/filter v0.105.0 // indirect
go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect
go.opentelemetry.io/collector/pdata v1.12.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.uber.org/automaxprocs v1.5.3 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
Expand All @@ -218,13 +220,13 @@ require (
golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect
google.golang.org/grpc v1.64.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading

0 comments on commit 844ca5f

Please sign in to comment.