From de60682a5787b82414152e219b101920bf5d124a Mon Sep 17 00:00:00 2001 From: Vasi Vasireddy <41936996+vasireddy99@users.noreply.github.com> Date: Wed, 6 Sep 2023 15:06:36 -0700 Subject: [PATCH] [chore]Use Right file name for the prometheus compliance tests (#24729) 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 https://github.com/prometheus/compliance/issues/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 --- .github/workflows/prometheus-compliance-tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prometheus-compliance-tests.yml b/.github/workflows/prometheus-compliance-tests.yml index 1ff07bde36ae..8a31fcd98634 100644 --- a/.github/workflows/prometheus-compliance-tests.yml +++ b/.github/workflows/prometheus-compliance-tests.yml @@ -45,9 +45,10 @@ jobs: with: repository: prometheus/compliance path: compliance - ref: f0482884578bac67b053e3eaa1ca7f783d146557 - name: Copy binary to compliance directory - run: mkdir compliance/remote_write_sender/bin && cp opentelemetry-collector-contrib/bin/otelcontribcol_linux_amd64 compliance/remote_write_sender/bin/otelcol_linux_amd64 + # The required name of the downloaded artifact is `otelcol_0.42.0_linux_amd64`, so we place the collector contrib artifact under the same name in the bin folder to run. + # Source: https://github.com/prometheus/compliance/blob/12cbdf92abf7737531871ab7620a2de965fc5382/remote_write_sender/targets/otel.go#L8 + run: mkdir compliance/remote_write_sender/bin && cp opentelemetry-collector-contrib/bin/otelcontribcol_linux_amd64 compliance/remote_write_sender/bin/otelcol_0.42.0_linux_amd64 - name: Run compliance tests run: go test -v --tags=compliance -run "TestRemoteWrite/otel/.+" ./ |& tee ./test-report.txt working-directory: compliance/remote_write_sender