Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] remove code that was deprecated some time ago #8631

Merged
merged 2 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .chloggen/codeboten_rm-deprecated68.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 Configs and Factories

# One or more tracking issues or pull requests related to the change
issues: []
codeboten marked this conversation as resolved.
Show resolved Hide resolved

# (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]
9 changes: 0 additions & 9 deletions service/extensions/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,12 @@ type Settings struct {
Telemetry component.TelemetrySettings
BuildInfo component.BuildInfo

// Drepecated: [v0.68.0] use Extensions.
Configs map[component.ID]component.Config

// Drepecated: [v0.68.0] use Extensions.
Factories map[component.Type]extension.Factory

// Extensions builder for extensions.
Extensions *extension.Builder
}

// New creates a new Extensions from Config.
func New(ctx context.Context, set Settings, cfg Config) (*Extensions, error) {
if set.Extensions == nil {
set.Extensions = extension.NewBuilder(set.Configs, set.Factories)
}
exts := &Extensions{
telemetry: set.Telemetry,
extMap: make(map[component.ID]extension.Extension),
Expand Down
14 changes: 6 additions & 8 deletions service/extensions/extensions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,9 @@ func TestBuildExtensions(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
_, err := New(context.Background(), Settings{
Telemetry: componenttest.NewNopTelemetrySettings(),
BuildInfo: component.NewDefaultBuildInfo(),
Configs: tt.extensionsConfigs,
Factories: tt.factories,
Telemetry: componenttest.NewNopTelemetrySettings(),
BuildInfo: component.NewDefaultBuildInfo(),
Extensions: extension.NewBuilder(tt.extensionsConfigs, tt.factories),
}, tt.config)
require.Error(t, err)
assert.EqualError(t, err, tt.wantErrMsg)
Expand Down Expand Up @@ -168,10 +167,9 @@ func TestNotifyConfig(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
extensions, err := New(context.Background(), Settings{
Telemetry: componenttest.NewNopTelemetrySettings(),
BuildInfo: component.NewDefaultBuildInfo(),
Configs: tt.extensionsConfigs,
Factories: tt.factories,
Telemetry: componenttest.NewNopTelemetrySettings(),
BuildInfo: component.NewDefaultBuildInfo(),
Extensions: extension.NewBuilder(tt.extensionsConfigs, tt.factories),
}, tt.serviceExtensions)
assert.NoError(t, err)
errs := extensions.NotifyConfig(context.Background(), confmap.NewFromStringMap(map[string]interface{}{}))
Expand Down
Loading