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

Remove deprecated fields/funcs from service #5907

Merged
merged 3 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

### 🛑 Breaking changes 🛑

- Remove deprecated fields/funcs from `service` (#5907)
- Remove `ConfigProviderSettings.Location`
- Remove `ConfigProviderSettings.MapProviders`
- Remove `ConfigProviderSettings.MapConverters`
- Remove `featuregate.Registry.MustAppy`

### 🚩 Deprecations 🚩

- Deprecates `LogRecord.Flags()` and `LogRecord.SetFlags()` in favor of `LogRecord.FlagsStruct()`. (#5866)
Expand Down
18 changes: 0 additions & 18 deletions service/config_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,6 @@ type configProvider struct {
type ConfigProviderSettings struct {
// ResolverSettings are the settings to configure the behavior of the confmap.Resolver.
ResolverSettings confmap.ResolverSettings

// Deprecated: [v0.58.0] use ConfigProviderSettings.ResolverSettings.URIs
Locations []string

// Deprecated: [v0.58.0] use ConfigProviderSettings.ResolverSettings.Providers
MapProviders map[string]confmap.Provider

// Deprecated: [v0.58.0] use ConfigProviderSettings.ResolverSettings.Converter
MapConverters []confmap.Converter
}

func newDefaultConfigProviderSettings(uris []string) ConfigProviderSettings {
Expand All @@ -97,15 +88,6 @@ func newDefaultConfigProviderSettings(uris []string) ConfigProviderSettings {
//
// * Then unmarshalls the confmap.Conf into the service Config.
func NewConfigProvider(set ConfigProviderSettings) (ConfigProvider, error) {
if len(set.Locations) != 0 {
set.ResolverSettings.URIs = set.Locations
}
if len(set.MapProviders) != 0 {
set.ResolverSettings.Providers = set.MapProviders
}
if len(set.MapConverters) != 0 {
set.ResolverSettings.Converters = set.MapConverters
}
mr, err := confmap.NewResolver(set.ResolverSettings)
if err != nil {
return nil, err
Expand Down
7 changes: 0 additions & 7 deletions service/featuregate/gates.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ func (r *Registry) Apply(cfg map[string]bool) error {
return nil
}

// Deprecated: [v0.58.0] Use Apply instead.
func (r *Registry) MustApply(cfg map[string]bool) {
if err := r.Apply(cfg); err != nil {
panic(err)
}
}

// IsEnabled returns true if a registered feature gate is enabled and false otherwise.
func (r *Registry) IsEnabled(id string) bool {
r.mu.RLock()
Expand Down