Skip to content

fix: prevent dev dependency downloads at runtime#462

Merged
jmeridth merged 1 commit intomainfrom
fix/dockerfile-no-dev-entrypoint
Mar 19, 2026
Merged

fix: prevent dev dependency downloads at runtime#462
jmeridth merged 1 commit intomainfrom
fix/dockerfile-no-dev-entrypoint

Conversation

@zkoppert
Copy link
Collaborator

@zkoppert zkoppert commented Mar 18, 2026

Problem

The Dockerfile ENTRYPOINT uses uv run without --no-dev, causing it to re-sync the environment and download ~15MB of CI-only tools on every action invocation:

Downloading pygments (1.2MiB)
Downloading black (1.7MiB)
Downloading mypy (13.0MiB)

The build step correctly uses uv sync --frozen --no-dev, but uv run ignores that and resolves the full dependency graph including [dependency-groups] dev.

Fix

One-line change - add --no-dev to the entrypoint:

ENTRYPOINT ["uv", "run", "--no-dev", "--project", "/action/workspace"]

Context

Same fix as github-community-projects/pr-conflict-detector#41

@zkoppert zkoppert self-assigned this Mar 18, 2026
@github-actions github-actions bot added the fix label Mar 18, 2026
@zkoppert zkoppert force-pushed the fix/dockerfile-no-dev-entrypoint branch from a89b48f to 73c6a7b Compare March 19, 2026 04:23
Add --no-dev to the uv run ENTRYPOINT so that dev dependencies
(black, mypy, pylint, etc.) are not re-downloaded on every action
invocation. The build step already uses --no-dev during uv sync,
but uv run was resolving the full dependency graph at runtime.

Co-authored-by: Copilot <[email protected]>
@zkoppert zkoppert force-pushed the fix/dockerfile-no-dev-entrypoint branch from 73c6a7b to dd140ac Compare March 19, 2026 04:33
@zkoppert zkoppert marked this pull request as ready for review March 19, 2026 05:26
@zkoppert zkoppert requested a review from jmeridth as a code owner March 19, 2026 05:26
Copilot AI review requested due to automatic review settings March 19, 2026 05:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the GitHub Action container entrypoint to avoid pulling CI/dev-only Python dependencies at runtime when invoking the action, keeping action startup lighter and more deterministic.

Changes:

  • Add --no-dev to the Docker ENTRYPOINT uv run invocation to prevent resolving/installing dev dependency groups during runtime.

You can also share your feedback on Copilot code review. Take the survey.

@jmeridth jmeridth merged commit b57b8d0 into main Mar 19, 2026
40 checks passed
@jmeridth jmeridth deleted the fix/dockerfile-no-dev-entrypoint branch March 19, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants