open-telemetry / opentelemetry-dotnet

The OpenTelemetry .NET Client
https://opentelemetry.io
Apache License 2.0
3.18k stars 753 forks source link

[feature request] Add .NET 8 for w3c-trace-context-integration-test in CI #5799

Closed xiang17 closed 3 weeks ago

xiang17 commented 1 month ago

Package

None

Is your feature request related to a problem?

The W3C Trace Context Integration Test in Docker doesn't have .NET 8 target.

What is the expected behavior?

Need to add .NET 8 as target.

Which alternative solutions or features have you considered?

None

Additional context

I added .NET 8 and got the following error.

#19 16.47 Processing triggers for libc-bin (2.36-9+deb12u7) ...
#19 16.77 error: externally-managed-environment
#19 16.77 
#19 16.77 × This environment is externally managed
#19 16.77 ╰─> To install Python packages system-wide, try apt install
#19 16.77     python3-xyz, where xyz is the package you are trying to
#19 16.77     install.
#19 16.77     
#19 16.77     If you wish to install a non-Debian-packaged Python package,
#19 16.77     create a virtual environment using python3 -m venv path/to/venv.
#19 16.77     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
#19 16.77     sure you have python3-full installed.
#19 16.77     
#19 16.77     If you wish to install a non-Debian packaged Python application,
#19 16.77     it may be easiest to use pipx install xyz, which will manage a
#19 16.77     virtual environment for you. Make sure you have pipx installed.
#19 16.77     
#19 16.77     See /usr/share/doc/python3.11/README.venv for more information.
#19 16.77 

Can reproduce by locally running the same command: docker compose --file=test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/docker-compose.yml --file=build/docker-compose.net8.0.yml --project-directory=. up --exit-code-from=tests --build.

After fixing the Dockerfile with venv (https://stackoverflow.com/questions/75602063/pip-install-r-requirements-txt-is-failing-this-environment-is-externally-mana), the tests still fails because the Dotnet runtime invoking Python command doesn't have venv context.

xiang17 commented 3 weeks ago

This is finished with the last PR.