Skip to content

Commit

Permalink
[otelcol] Delete deprecated NewCommandMustSetProvider (#10778)
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme authored Aug 2, 2024
1 parent 3c23a22 commit 73afc25
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
25 changes: 25 additions & 0 deletions .chloggen/NewCommandMustSetProvider.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: otelcol

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

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

# (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]
11 changes: 0 additions & 11 deletions otelcol/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,6 @@ func NewCommand(set CollectorSettings) *cobra.Command {
return rootCmd
}

// NewCommandMustSetProvider constructs a new cobra.Command using the given CollectorSettings.
// Any URIs specified in CollectorSettings.ConfigProviderSettings.ResolverSettings.URIs
// are considered defaults and will be overwritten by config flags passed as
// command-line arguments to the executable.
// At least one Provider must be supplied via CollectorSettings.ConfigProviderSettings.ResolverSettings.ProviderFactories.
//
// Deprecated: [v0.104.0] use NewCommand instead
func NewCommandMustSetProvider(set CollectorSettings) *cobra.Command {
return NewCommand(set)
}

// Puts command line flags from flags into the CollectorSettings, to be used during config resolution.
func updateSettingsUsingFlags(set *CollectorSettings, flags *flag.FlagSet) error {
resolverSet := &set.ConfigProviderSettings.ResolverSettings
Expand Down

0 comments on commit 73afc25

Please sign in to comment.