Skip to content

fix(devcontainer): the devops on PATH is the editable install of the checkout, not a copy the image built #2449

Closed

Description

@dan-petty

Problem Description

The devcontainer image installs a copy of src/ into the system site-packages at build time (.devcontainer/Dockerfile:41-45: uv pip install --system --break-system-packages --no-deps /tmp/devops-cli), and /usr/local/bin/devops runs that copy. A terminal where the workspace .venv is not active finds /usr/local/bin/devops first on PATH (devcontainer.json sets no PATH). That copy has none of the changes merged after the image build, and it reports its version as 0.3.1 while the checkout is 0.8.3.

On 2026-10-28, after #2410 and #2411 merged:

A rebuild refreshes the copy only until the next merge.

Reproduction Steps

  1. In a devcontainer built before a merge that adds a setting, open a terminal without the .venv active.
  2. Run devops --version and uv run devops --version.

Expected vs Actual Behavior

Expected: devops in any devcontainer terminal is the editable install of the checkout, so devops --version equals uv run devops --version, and a merge needs no rebuild.

Actual: devops is the copy the image built, and it stays at the image's commit.

Environment Diagnostics

devops-cli 0.8.3 at main 890e228; /usr/local/bin/devops from the image built on 2026-10-25 reports 0.3.1.

Proposed Solution

  • The devcontainer puts ${containerWorkspaceFolder}/.venv/bin first on PATH (remoteEnv), so devops and python are the project environment's.
  • The image keeps the dependency layer for its cache, and installs the package itself only where a job that uses the image needs it. Find each job that runs devops from the image (the DevContainer Image workflow and any CI job on that image) before removing the system install.
  • A check fails when a new devcontainer terminal's devops --version differs from uv run devops --version.

Existing Tool Considered

The Dev Containers remoteEnv property and uv's project environment (uv sync into .venv, which a volume already holds) cover the need. Nothing is built.

Activity

  1. added
    source/agent
    type/bug
    status/new
    value/medium
    effort/low
    on Oct 28, 2026
  2. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The devcontainer resolves devops to a stale system copy instead of the editable install, causing command failures after merges.
    • Priority: P2-Medium. It caused real command failures on 2026-10-28 but is confined to the development environment.
    • Value: Medium. Developers get wrong versions and failed commands until they rebuild the image or activate the venv manually.
    • Effort: Low. The fix is a remoteEnv PATH entry plus removal of one install line, and the body states nothing is built.
    • Related: docs(devcontainer): align devcontainer usage guide with modern best practices #144, which asks for a different change. Both touch devcontainer configuration and the .venv path, but #144 is a closed docs alignment task while the candidate fixes a runtime PATH resolution bug.
  3. added
    priority/p2-medium
    on Oct 28, 2026
  4. removed
    status/new
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions