What is the issue?
The current installation may easily fail if the user-provided container does not satisfy the assumptions of this installation process.
More specifically, in order of severance:
- It hardcodes
--python to an arbitrary location ("--python", "/opt/venv/bin/python") which may not be available. I think you wanna set UV_SYSTEM_PYTHON=true instead.
- it performs a
uv sync which will uninstall extras and non-default groups; if you wanna do it at least pass --inexact.
- Is there a reason it sets a cache buster?
- I also find it weird that it installs a specific Python version by default
I think both steps may belong to the optional container setup path here, but a user-provided container should be considered prepared to just run uv pip install over the module-provided pytest_otel.
Even more, I'd make this step optional as well, because users may want to cache this part before copying their source code into the container to avoid rebuilding this error on every source code change.
Dagger version
dagger v0.21.0 (image://registry.dagger.io/engine:v0.21.0) darwin/arm64/v8
Steps to reproduce
No response
Log output
│ ✘ withExec uv pip install --python /opt/venv/bin/python /opt/pytest_otel 0.1s ERROR
│ ┃ error: No virtual environment or system Python installation found for path `/opt/venv/bin/python
│ ┃ uv venv` to create an environment
│ ! exit code: 2
What is the issue?
The current installation may easily fail if the user-provided container does not satisfy the assumptions of this installation process.
More specifically, in order of severance:
--pythonto an arbitrary location ("--python", "/opt/venv/bin/python") which may not be available. I think you wanna setUV_SYSTEM_PYTHON=trueinstead.uv syncwhich will uninstall extras and non-default groups; if you wanna do it at least pass--inexact.I think both steps may belong to the optional container setup path here, but a user-provided container should be considered prepared to just run
uv pip installover the module-providedpytest_otel.Even more, I'd make this step optional as well, because users may want to cache this part before copying their source code into the container to avoid rebuilding this error on every source code change.
Dagger version
dagger v0.21.0 (image://registry.dagger.io/engine:v0.21.0) darwin/arm64/v8
Steps to reproduce
No response
Log output