From dc8d3fd991af2b6a173a87723fdc12052b81b42d Mon Sep 17 00:00:00 2001 From: xiang17 Date: Wed, 4 Sep 2024 10:15:03 -0700 Subject: [PATCH] [repo] Add .NET 8 target for W3C Trace Context Integration Test in CI (#5800) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Piotr Kiełkowicz --- .github/workflows/ci.yml | 2 +- .../Dockerfile | 8 +++++--- .../W3CTraceContextTests.cs | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be3cdf11abe..999985d15a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,7 +129,7 @@ jobs: strategy: fail-fast: false matrix: - version: [ net6.0 ] + version: [ net6.0, net8.0 ] steps: - uses: actions/checkout@v4 - name: Run W3C Trace Context docker compose diff --git a/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/Dockerfile b/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/Dockerfile index 9723867f4f3..7a8dc6f5705 100644 --- a/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/Dockerfile +++ b/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/Dockerfile @@ -26,7 +26,9 @@ COPY --from=w3c /w3c . RUN apt-get update \ && apt-get install -y python3-pip python3-dev \ && cd /usr/local/bin \ - && ln -s /usr/bin/python3 python \ - && pip3 install --upgrade pip \ - && pip3 install aiohttp + && ln -s /usr/bin/python3 python + +# net6.0 image uses Python 3.9, which doesn't have `--break-system-packages` option. +RUN pip3 install --upgrade pip --break-system-packages || pip3 install --upgrade pip +RUN pip3 install aiohttp --break-system-packages ENTRYPOINT ["dotnet", "vstest", "OpenTelemetry.Instrumentation.W3cTraceContext.Tests.dll", "--logger:console;verbosity=detailed"] diff --git a/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/W3CTraceContextTests.cs b/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/W3CTraceContextTests.cs index 323b35ecba9..b80a57f1ced 100644 --- a/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/W3CTraceContextTests.cs +++ b/test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/W3CTraceContextTests.cs @@ -69,7 +69,7 @@ public void W3CTraceContextTestSuiteAsync(string value) return result; }); - app.RunAsync(); + app.RunAsync("http://localhost:5000/"); string result = RunCommand("python", "trace-context/test/test.py http://localhost:5000/");