Skip to content

Commit

Permalink
Merge branch 'main' into 11463-extensiontest-module
Browse files Browse the repository at this point in the history
  • Loading branch information
jade-guiton-dd committed Nov 14, 2024
2 parents 05e3158 + eaeacaf commit e5c2ea3
Show file tree
Hide file tree
Showing 81 changed files with 351 additions and 816 deletions.
25 changes: 25 additions & 0 deletions .chloggen/codeboten_3months.yaml
Original file line number Diff line number Diff line change
@@ -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: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: all

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: shorten time period before removing an unmaintained component from 6 months to 3 months

# One or more tracking issues or pull requests related to the change
issues: [11664]

# (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: []
25 changes: 25 additions & 0 deletions .chloggen/rm-dep-expandvar.yaml
Original file line number Diff line number Diff line change
@@ -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: expandconverter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove deprecated expandvar converter

# One or more tracking issues or pull requests related to the change
issues: [11672]

# (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]
25 changes: 25 additions & 0 deletions .chloggen/rm-dep-exporterhelper.yaml
Original file line number Diff line number Diff line change
@@ -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: exporterhelper

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove derprecated NewLogs[Request]Exporter funcs

# One or more tracking issues or pull requests related to the change
issues: [11661]

# (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]
25 changes: 25 additions & 0 deletions .chloggen/rm-dep-extension.yaml
Original file line number Diff line number Diff line change
@@ -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: extension

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove deprecated funcs CreateExtension and ExtensionStability

# One or more tracking issues or pull requests related to the change
issues: [11663]

# (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]
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ check-contrib:
-replace go.opentelemetry.io/collector/config/configtls=$(CURDIR)/config/configtls \
-replace go.opentelemetry.io/collector/config/internal=$(CURDIR)/config/internal \
-replace go.opentelemetry.io/collector/confmap=$(CURDIR)/confmap \
-replace go.opentelemetry.io/collector/confmap/converter/expandconverter=$(CURDIR)/confmap/converter/expandconverter \
-replace go.opentelemetry.io/collector/confmap/provider/envprovider=$(CURDIR)/confmap/provider/envprovider \
-replace go.opentelemetry.io/collector/confmap/provider/fileprovider=$(CURDIR)/confmap/provider/fileprovider \
-replace go.opentelemetry.io/collector/confmap/provider/httpprovider=$(CURDIR)/confmap/provider/httpprovider \
Expand Down Expand Up @@ -359,7 +358,6 @@ restore-contrib:
-dropreplace go.opentelemetry.io/collector/config/configtls \
-dropreplace go.opentelemetry.io/collector/config/internal \
-dropreplace go.opentelemetry.io/collector/confmap \
-dropreplace go.opentelemetry.io/collector/confmap/converter/expandconverter \
-dropreplace go.opentelemetry.io/collector/confmap/provider/envprovider \
-dropreplace go.opentelemetry.io/collector/confmap/provider/fileprovider \
-dropreplace go.opentelemetry.io/collector/confmap/provider/httpprovider \
Expand Down
2 changes: 1 addition & 1 deletion cmd/mdatagen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/component v0.113.0
go.opentelemetry.io/collector/component/componenttest v0.113.0
go.opentelemetry.io/collector/component/componenttest v0.0.0-20241112045949-9c4c007a12b4
go.opentelemetry.io/collector/config/configtelemetry v0.113.0
go.opentelemetry.io/collector/confmap v1.19.0
go.opentelemetry.io/collector/confmap/provider/fileprovider v1.19.0
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions cmd/mdatagen/internal/templates/config_test.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ func TestMetricsBuilderConfig(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cfg := loadMetricsBuilderConfig(t, tt.name)
if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(MetricConfig{}
{{- if .ResourceAttributes }}, ResourceAttributeConfig{}{{ end }})); diff != "" {
t.Errorf("Config mismatch (-expected +actual):\n%s", diff)
}
diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(MetricConfig{}
{{- if .ResourceAttributes }}, ResourceAttributeConfig{}{{ end }}))
require.Emptyf(t, diff, "Config mismatch (-expected +actual):\n%s", diff)
})
}
}
Expand Down Expand Up @@ -109,9 +108,8 @@ func TestResourceAttributesConfig(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
cfg := loadResourceAttributesConfig(t, tt.name)
if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(ResourceAttributeConfig{})); diff != "" {
t.Errorf("Config mismatch (-expected +actual):\n%s", diff)
}
diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(ResourceAttributeConfig{}))
require.Emptyf(t, diff, "Config mismatch (-expected +actual):\n%s", diff)
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/otelcorecol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ require (
go.opentelemetry.io/collector v0.113.0 // indirect
go.opentelemetry.io/collector/client v1.19.0 // indirect
go.opentelemetry.io/collector/component/componentstatus v0.113.0 // indirect
go.opentelemetry.io/collector/component/componenttest v0.113.0 // indirect
go.opentelemetry.io/collector/component/componenttest v0.0.0-20241112045949-9c4c007a12b4 // indirect
go.opentelemetry.io/collector/config/configauth v0.113.0 // indirect
go.opentelemetry.io/collector/config/configcompression v1.19.0 // indirect
go.opentelemetry.io/collector/config/configgrpc v0.113.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion component/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (sl StabilityLevel) String() string {
func (sl StabilityLevel) LogMessage() string {
switch sl {
case StabilityLevelUnmaintained:
return "Unmaintained component. Actively looking for contributors. Component will become deprecated after 6 months of remaining unmaintained."
return "Unmaintained component. Actively looking for contributors. Component will become deprecated after 3 months of remaining unmaintained."
case StabilityLevelDeprecated:
return "Deprecated component. Will be removed in future releases."
case StabilityLevelDevelopment:
Expand Down
2 changes: 1 addition & 1 deletion component/component_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func TestStabilityLevelString(t *testing.T) {

func TestStabilityLevelLogMessage(t *testing.T) {
assert.Equal(t, "Stability level of component is undefined", StabilityLevelUndefined.LogMessage())
assert.Equal(t, "Unmaintained component. Actively looking for contributors. Component will become deprecated after 6 months of remaining unmaintained.", StabilityLevelUnmaintained.LogMessage())
assert.Equal(t, "Unmaintained component. Actively looking for contributors. Component will become deprecated after 3 months of remaining unmaintained.", StabilityLevelUnmaintained.LogMessage())
assert.Equal(t, "Deprecated component. Will be removed in future releases.", StabilityLevelDeprecated.LogMessage())
assert.Equal(t, "Development component. May change in the future.", StabilityLevelDevelopment.LogMessage())
assert.Equal(t, "Alpha component. May change in the future.", StabilityLevelAlpha.LogMessage())
Expand Down
3 changes: 1 addition & 2 deletions component/componenttest/configtest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package componenttest

import (
"io"
"strings"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -141,7 +140,7 @@ func TestCheckConfigStruct(t *testing.T) {
assert.NoError(t, err)
} else {
require.Error(t, err)
assert.True(t, strings.Contains(err.Error(), tt.wantErrMsgSubStr))
assert.Contains(t, err.Error(), tt.wantErrMsgSubStr)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion config/configgrpc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/client v1.19.0
go.opentelemetry.io/collector/component v0.113.0
go.opentelemetry.io/collector/component/componenttest v0.113.0
go.opentelemetry.io/collector/component/componenttest v0.0.0-20241112045949-9c4c007a12b4
go.opentelemetry.io/collector/config/configauth v0.113.0
go.opentelemetry.io/collector/config/configcompression v1.19.0
go.opentelemetry.io/collector/config/confignet v1.19.0
Expand Down
2 changes: 1 addition & 1 deletion config/confighttp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/client v1.19.0
go.opentelemetry.io/collector/component v0.113.0
go.opentelemetry.io/collector/component/componenttest v0.113.0
go.opentelemetry.io/collector/component/componenttest v0.0.0-20241112045949-9c4c007a12b4
go.opentelemetry.io/collector/config/configauth v0.113.0
go.opentelemetry.io/collector/config/configcompression v1.19.0
go.opentelemetry.io/collector/config/configopaque v1.19.0
Expand Down
2 changes: 1 addition & 1 deletion config/configopaque/opaque_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var example = TestStruct{
func TestStringJSON(t *testing.T) {
bytes, err := json.Marshal(example)
require.NoError(t, err)
assert.Equal(t, `{"opaque":"[REDACTED]","plain":"plain"}`, string(bytes))
assert.JSONEq(t, `{"opaque":"[REDACTED]","plain":"plain"}`, string(bytes))
}

func TestStringFmt(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion confmap/converter/expandconverter/Makefile

This file was deleted.

112 changes: 0 additions & 112 deletions confmap/converter/expandconverter/expand.go

This file was deleted.

Loading

0 comments on commit e5c2ea3

Please sign in to comment.