Skip to content

Preserve processor order in testbed Yaml config creator #33003

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

Closed
swamisriman opened this issue May 11, 2024 · 6 comments · Fixed by #35064
Closed

Preserve processor order in testbed Yaml config creator #33003

swamisriman opened this issue May 11, 2024 · 6 comments · Fixed by #35064
Labels
enhancement New feature or request never stale Issues marked with this label will be never staled and automatically removed testbed

Comments

@swamisriman
Copy link
Contributor

swamisriman commented May 11, 2024

Component(s)

testbed

Is your feature request related to a problem? Please describe.

In testbed scenarios.go, there is a function createConfigYaml(...) (ref) to get yaml config from given parameters.
As it takes the processor argument as a map, the processor order is not maintained.

This way, it's not possible to test scenarios where the processor order is important.

Describe the solution you'd like

Would be better if the function takes processors argument as an ordered data structure(say list).
or
The function may also take an additional argument with the list of processors (in the required order)

Describe alternatives you've considered

An alternate solution would be to get the config generated and then update the processors list to the required order

Additional context

No response

@swamisriman swamisriman added enhancement New feature or request needs triage New item requiring triage labels May 11, 2024
Copy link
Contributor

Pinging code owners:

  • testbed: @open-telemetry/collector-approvers

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

Good point, it should be ordered 👍 Thanks for calling this out!

@crobert-1 crobert-1 removed the needs triage New item requiring triage label May 13, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

  • testbed: @open-telemetry/collector-approvers

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jul 15, 2024
@crobert-1 crobert-1 added never stale Issues marked with this label will be never staled and automatically removed and removed Stale labels Jul 15, 2024
@swamisriman
Copy link
Contributor Author

Hi @crobert-1

Any suggestions on the solution?
I can raise a PR.

@crobert-1
Copy link
Member

Hi @crobert-1

Any suggestions on the solution? I can raise a PR.

Since a map is inherently unordered, I'd start with trying to understand if a map in this case is absolutely required. If not, we should try to move to using an ordered type, like an array. I'm not very familiar with the internal logic of the testbed, so that's as much information as I have at this point.

A PR is welcome!

@swamisriman
Copy link
Contributor Author

Yeah...if we are open to changing the datatype, we can go with a 2D string array.
I don't think this will affect any internal working of the testbed. This is just used to supply the config.
But for those who are already using this function, it will break.

djaglowski pushed a commit that referenced this issue Oct 28, 2024
…er (#35064)

**Description:** <Describe what has changed.>
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:** <Issue number if applicable>
Resolves
#33003
jpbarto pushed a commit to jpbarto/opentelemetry-collector-contrib that referenced this issue Oct 29, 2024
…er (open-telemetry#35064)

**Description:** <Describe what has changed.>
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:** <Issue number if applicable>
Resolves
open-telemetry#33003
sbylica-splunk pushed a commit to sbylica-splunk/opentelemetry-collector-contrib that referenced this issue Dec 17, 2024
…er (open-telemetry#35064)

**Description:** <Describe what has changed.>
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:** <Issue number if applicable>
Resolves
open-telemetry#33003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request never stale Issues marked with this label will be never staled and automatically removed testbed
Projects
None yet
2 participants