Skip to content

Remove redundant VIRTUAL_ENV variable from Dockerfile#2947

Merged
adamtheturtle merged 5 commits intomainfrom
adamtheturtle/remove-virtual-env-dockerfile
Feb 18, 2026
Merged

Remove redundant VIRTUAL_ENV variable from Dockerfile#2947
adamtheturtle merged 5 commits intomainfrom
adamtheturtle/remove-virtual-env-dockerfile

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 18, 2026

Replace the redundant VIRTUAL_ENV environment variable with UV_PROJECT_ENVIRONMENT, which holds the same value and is already set. This reduces duplicate environment variable definitions in the Dockerfile.

🤖 Generated with Claude Code


Note

Low Risk
Low risk: Docker build env var cleanup and a test-only assertion change to ignore Jetty version differences; no production runtime logic changes.

Overview
Removes the redundant VIRTUAL_ENV variable from the mock VWS Flask server Dockerfile, using UV_PROJECT_ENVIRONMENT for both venv creation and PATH setup.

Updates tests/mock_vws/test_query.py to make the Jetty HTML error-body assertion tolerant of Jetty version changes by regex-normalizing the Powered by Jetty:// <version> footer before comparing expected vs actual.

Written by Cursor Bugbot for commit 94ff092. This will update automatically on new commits. Configure here.

Replace VIRTUAL_ENV with UV_PROJECT_ENVIRONMENT, which holds the same value and is already set. This reduces environment variable duplication.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
ENV VIRTUAL_ENV=/app/docker_venvs/.venv
ENV UV_PROJECT_ENVIRONMENT=/app/docker_venvs/.venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ENV PATH="$UV_PROJECT_ENVIRONMENT/bin:$PATH"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing standard VIRTUAL_ENV breaks Python venv detection

Medium Severity

VIRTUAL_ENV is a Python ecosystem standard env var used by tools like pip, shell prompts, and other utilities to detect an active virtual environment. UV_PROJECT_ENVIRONMENT is uv-specific and not a substitute — they serve different purposes. Removing VIRTUAL_ENV means standard Python tooling inside the container won't recognize the venv. The comment on lines 12–13 referencing the pythonspeed article also becomes misleading, since that technique explicitly relies on setting VIRTUAL_ENV.

Fix in Cursor Fix in Web

The real Vuforia service upgraded from Jetty 12.0.20 to 12.1.6,
causing the hardcoded expected response body to no longer match.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

adamtheturtle and others added 3 commits February 18, 2026 10:56
The real Vuforia service load-balances across instances with different
Jetty versions, causing the exact-match assertion to flap. Normalize
the version string before comparing so the test is stable.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@adamtheturtle adamtheturtle merged commit 65ed3ec into main Feb 18, 2026
11 checks passed
@adamtheturtle adamtheturtle deleted the adamtheturtle/remove-virtual-env-dockerfile branch February 18, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant