Skip to content

fix: add .venv/bin to PATH in container Dockerfile#471

Merged
aidandaly24 merged 1 commit intomainfrom
fix/container-otel-path
Mar 2, 2026
Merged

fix: add .venv/bin to PATH in container Dockerfile#471
aidandaly24 merged 1 commit intomainfrom
fix/container-otel-path

Conversation

@aidandaly24
Copy link
Contributor

Description

Container builds using uv sync fail at runtime with exec: "opentelemetry-instrument": executable file not found in $PATH. This happens because uv sync ignores UV_SYSTEM_PYTHON=1 and always creates a .venv directory, installing console scripts to /app/.venv/bin/ which is not on $PATH. This adds /app/.venv/bin to PATH in the container Dockerfile template.

The other alternative solution is to switch from uv sync to uv pip install --system . which would actually install to system Python and put scripts in /usr/local/bin. This would also make UV_SYSTEM_PYTHON=1 meaningful.

Related Issue

Closes #

Documentation PR

N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

uv sync ignores UV_SYSTEM_PYTHON=1 and always creates a .venv directory,
so console scripts like opentelemetry-instrument are installed to
/app/.venv/bin/ which is not on PATH. This causes container startup to
fail with 'executable file not found in $PATH'.
@aidandaly24 aidandaly24 requested a review from a team March 2, 2026 19:31
@aidandaly24 aidandaly24 deployed to e2e-testing March 2, 2026 19:31 — with GitHub Actions Active
@github-actions github-actions bot added the size/xs PR size: XS label Mar 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.13% 2997 / 6790
🔵 Statements 43.71% 3155 / 7217
🔵 Functions 46.07% 622 / 1350
🔵 Branches 48.49% 1935 / 3990
Generated in workflow #790 for commit 3a3b55c by the Vitest Coverage Report Action

@aidandaly24 aidandaly24 merged commit 571a610 into main Mar 2, 2026
16 of 18 checks passed
@aidandaly24 aidandaly24 deleted the fix/container-otel-path branch March 2, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants