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

Allow running tests against specific opentelemetry collector binary #97

Open
rapphil opened this issue Mar 23, 2023 · 0 comments
Open

Comments

@rapphil
Copy link

rapphil commented Mar 23, 2023

According to the documentation, if we want to test a development version of the target of the remote_write_sender tests, we have to copy the binary in the bin directory.

Right now most of the targets of tests are hard coded to a specific version and the binary that will be used in the tests will use the name of the artifact published and copy the content in the bin directory. However this is not stable as the filename will usually contain the version e.g.: otelcol_0.42.0_linux_amd64

I'm proposing that we use the filename in archive instead of deriving the filename from the published artifact, since this will be more stable.

Alternative approach:

Allow to use different binaries for tests based on environment variables. We could stablish a convention for environment variables that could be used by all targets.

codeboten pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this issue Sep 6, 2023
This PR fixes the right file name for running the prometheus compliance
tests.
The actual name of [downloaded
artifact](https://github.com/prometheus/compliance/blob/main/remote_write_sender/targets/otel.go#L8)
as part of the test is `otelcol_0.42.0_linux_amd64`. when we place the
collector contrib artefact under the same name in the bin folder with
the name `otelcol_linux_amd64` the tests will still be run on
otelcol_0.42.0_linux_amd64 artefact. so by [changing the
name](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/24729/files#diff-905ac35df46c393cbd15f24e4921ead35720be7e2c9a9372000811293f96f427R49)
of the artefact, the tests will run on top of that.

**Additional Context** :

We shall need to track this issue
prometheus/compliance#97 as the naming
conventions of the artifacts used in the target could be changed upon
the issue resolution

No ChangeLog entry is needed.

---------

Co-authored-by: Anthony Mirabella <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant