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

[testbed] Passing processor configs in a struct slice to preserve order #35064

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

swamisriman
Copy link

@swamisriman swamisriman commented Sep 7, 2024

Description:
Previously, the processor config was passed as a map, because of which preserving the processor was not possible.
Changed the data type to a newly added struct slice so that the processors are used in the supplied order.

NOTE that this change is breaking - if any of these changed functions are directly used, they will break as existing usages supply map.

Link to tracking Issue:
Resolves #33003

@swamisriman swamisriman marked this pull request as ready for review September 7, 2024 13:11
@swamisriman swamisriman requested review from a team and crobert-1 September 7, 2024 13:11
testbed/tests/scenarios.go Outdated Show resolved Hide resolved
@swamisriman swamisriman requested a review from a team as a code owner September 21, 2024 10:43
@swamisriman swamisriman changed the title Testbed: Passing processor configs in 2D slice to preserve order Testbed: Passing processor configs in a struct slice to preserve order Sep 21, 2024
@swamisriman
Copy link
Author

@atoulme
Updated to use struct.
Plz review now.

Copy link
Member

@crobert-1 crobert-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From failing lint run:

Error: testbed/correctnesstests/connectors/correctness_test.go:25:3: composites: github.com/open-telemetry/opentelemetry-collector-contrib/testbed/correctnesstests.ProcessorNameAndConfigBody struct literal uses unkeyed fields (govet)
		{
		^
Error: testbed/correctnesstests/traces/correctness_test.go:29:3: composites: github.com/open-telemetry/opentelemetry-collector-contrib/testbed/correctnesstests.ProcessorNameAndConfigBody struct literal uses unkeyed fields (govet)
		{
		^
Error: testbed/stabilitytests/trace_test.go:28:3: composites: github.com/open-telemetry/opentelemetry-collector-contrib/testbed/tests.ProcessorNameAndConfigBody struct literal uses unkeyed fields (govet)
		{

@swamisriman
Copy link
Author

Hi @crobert-1
Fixed the lint issues and added change log.
Plz review now.

@swamisriman swamisriman changed the title Testbed: Passing processor configs in a struct slice to preserve order [testbed] Passing processor configs in a struct slice to preserve order Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preserve processor order in testbed Yaml config creator
3 participants