Commit Graph

13 Commits

Author SHA1 Message Date
Chao Weng 6de29ce169 Add `component.Type` parameter to `NewNopSettings` And deprecate `NewNopSettingsWithType` (#12452)
<!--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.-->
2025-02-21 11:17:45 +00:00
Pablo Baeyens a4ae175111
[*test] Add NewNopSettingsWithType everywhere (#12357)
<!--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
2025-02-13 16:56:20 +00:00
Pablo Baeyens 183d7edf9f
[extension] Error out if passed extension.Settings has incorrect type (#12305)
<!--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
2025-02-07 20:15:42 +00:00
Antoine Toulme e8807bfe94
[mdatagen] update other lifecycle generated tests to not be impacted by fieldalignment (#12125)
<!--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.
2025-01-24 01:30:28 +00:00
Tyler Helmuth 77bb849aa0
[component] Refactor to use pipeline.ID and pipeline.Signal (#11204)
#### Description
Depends on
https://github.com/open-telemetry/opentelemetry-collector/pull/11209

This PR is a non-breaking implementation of
https://github.com/open-telemetry/opentelemetry-collector/pull/10947. It
adds a new module, `pipeline`, which houses a `pipeline.ID` and
`pipeline.Signal`. `pipeline.ID` is used to identify a pipeline within
the service. `pipeline.Signal` is uses to identify the signal associated
to a pipeline.

I do this work begrudgingly. As the PR shows, this is a huge refactor
when done in a non-breaking way, will require 3 full releases, and
doesn't benefit our [End Users or, in my opinion, our Component
Developers or Collector Library
Users](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#target-audiences).
I view this refactor as a Nice-To-Have, not a requirement for Component
1.0.

<!-- Issue number if applicable -->
#### Link to tracking issue
Works towards
https://github.com/open-telemetry/opentelemetry-collector/issues/9429
2024-09-23 07:38:59 -07:00
Alex Boten fbffbb0820
[chore] small test improvements (#11211)
Clean up some inconsistencies in the test code across the components.

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-09-18 13:47:25 -07:00
Alex Boten 3b3deb8dbe
[connector] deprecate CreateSettings -> Settings (#10338)
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>
2024-06-06 10:04:47 -07:00
Antoine Toulme 9a21643a54
[config] Deprecate component.UnmarshalConfig (#9750)
**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 #7102
Fixes #7101

---------

Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
2024-05-29 11:07:52 +02:00
Bogdan Drutu aeb0cf0ddc
mdatagen: Call connectors with routers to be the same as the service graph (#10079) 2024-05-03 14:31:11 -07:00
Dmitrii Anoshin 1f643f4ce1
[cmd/mdatagen] Move component config test from cmd/builder (#9940)
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.
2024-04-11 10:43:05 -07:00
Antoine Toulme 06f177a66b
Revert "[chore] change the way we unmarshal the config in tests" (#9771)
Reverts open-telemetry/opentelemetry-collector#9765

We need to revert those changes as contrib has issues with them in
isolation from #9750.
2024-03-15 09:54:41 -07:00
Antoine Toulme 117ce94f96
[chore] change the way we unmarshal the config in tests (#9765)
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.
2024-03-14 13:56:22 -07:00
Dmitrii Anoshin 89dcb87168
[cmd/mdatagen] Pull new changes from contrib (#9683)
To completely migrate mdatagen from contrib to core, we need to pull
latest changes:

-
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31500
-
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31503
-
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31520
-
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31525
-
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31530
-
https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31532

---------

Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-03-04 15:06:12 -08:00