<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Add `component.Type` parameter to `NewNopSettings` And deprecate
`NewNopSettingsWithType` cc @mx-psi
<!-- Issue number if applicable -->
#### Link to tracking issue
Relevant to #12305
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Updated
<!--Describe the documentation added.-->
#### Documentation
Added
<!--Please delete paragraphs that you did not use before submitting.-->
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
<!-- Issue number if applicable -->
Creates `NewNopSettingsWithType` function on test modules and deprecates
the `NewNopSettings` functions on those modules. Replace all usages of
`NewNopSettings` with `NewNopSettingsWithType`.
Part of #12305 but applied to all component kinds.
#### Link to tracking issue
Updates #12221
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Explicitly error out if the passed `component.ID` does not have a
matching `component.Type`
<!-- Issue number if applicable -->
#### Link to tracking issue
Updates #12221
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
update other lifecycle generated tests to not be impacted by
fieldalignment
<!-- Issue number if applicable -->
#### Link to tracking issue
See #12121 for original PR.
This deprecates CreateSettings in favour of Settings.
NewNopCreateSettings is also being deprecated in favour of
NewNopSettings
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
**Description:**
This PR removes the top level if/else in `component.UnmarshalConfig`,
handling recursive state in the confmap.Conf object instead.
This PR deprecates `component.UnmarshalConfig` in favor of calling
directly `Unmarshal` on the confmap.Conf object.
**Link to tracking Issue:**
Fixes#7102Fixes#7101
---------
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
The tests generated by cmd/builder are skipped in contrib because they
cause the CI timeouts. We moved the lifecycle tests to the tests
generated by mdatagen, but the config/factory smoke tests are still part
of the files generated by cmd/builder.
Recently, the loadbalancing exporter got an invalid camelCase config
field because of this coverage gap.
This change moves the config/factory tests from cmd/builder to
cmd/mdatagen. So, they are always generated for every component, even if
not used in any collector bundle.
This change is required in preparation of #9750
This removes the call to `component.UnmarshalConfig` in preparation of
its deprecation, and instead has the `Conf` object unmarshal itself into
the `Config` struct.