Repository navigation
fix(ci): avoid uv sync in image build - #644
Conversation
Export locked runtime requirements with uv, then install them with pip inside the image builder venv. This keeps uv.lock as the version source while avoiding the Woodpecker/Kaniko uv sync path that stalled on large wheels.\n\nVerification:\n- woodpecker-cli lint .woodpecker/ci.yml\n- git diff --check\n- uv export --frozen --no-dev --extra redis --no-emit-project --no-hashes --output-file /tmp/coding-agent-image-requirements.txt\n- docker build --target builder --build-arg PYTHON_BASE_IMAGE=python:3.12-slim --build-arg PIP_DEFAULT_TIMEOUT=120 --build-arg PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple --build-arg UV_DEFAULT_INDEX=https://mirrors.aliyun.com/pypi/simple -f coding-agent/Dockerfile coding-agent
📝 WalkthroughWalkthroughThe Dockerfile builder stage drops ChangesDockerfile dependency install refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
coding-agent/Dockerfile (1)
42-42: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the build backend in the locked install path.
pyproject.tomldeclares[build-system].requires = ["hatchling"], sopip install --no-deps .can still fetch hatchling in an isolated build env outside/tmp/requirements.txt. If this image is meant to be fully lock-driven, preinstall hatchling from the exported requirements or use--no-build-isolation.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@coding-agent/Dockerfile` at line 42, The Dockerfile install step still allows pip to resolve the build backend outside the locked requirements, so keep the package build fully lock-driven. Update the `pip install` flow in the image build to ensure `hatchling` is installed from the exported requirements before installing the project, or switch the `python -m pip install` invocation to use `--no-build-isolation` so `pyproject.toml` build requirements are not fetched separately.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@coding-agent/Dockerfile`:
- Line 42: The Dockerfile install step still allows pip to resolve the build
backend outside the locked requirements, so keep the package build fully
lock-driven. Update the `pip install` flow in the image build to ensure
`hatchling` is installed from the exported requirements before installing the
project, or switch the `python -m pip install` invocation to use
`--no-build-isolation` so `pyproject.toml` build requirements are not fetched
separately.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f3b33769-37bb-455d-ba58-b4c05f8edc93
📒 Files selected for processing (1)
coding-agent/Dockerfile
Summary\n- keep uv.lock as the runtime dependency source via uv export\n- install exported locked requirements with pip inside the image builder venv\n- avoid the Woodpecker/Kaniko uv sync path that stalled on large wheels\n\n## Verification\n- woodpecker-cli lint .woodpecker/ci.yml\n- git diff --check\n- uv export --frozen --no-dev --extra redis --no-emit-project --no-hashes --output-file /tmp/coding-agent-image-requirements.txt\n- docker build --target builder --build-arg PYTHON_BASE_IMAGE=python:3.12-slim --build-arg PIP_DEFAULT_TIMEOUT=120 --build-arg PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple --build-arg UV_DEFAULT_INDEX=https://mirrors.aliyun.com/pypi/simple -f coding-agent/Dockerfile coding-agent\n\n## Context\nWoodpecker main pipeline #155 was stopped after build-image spent 45+ minutes in uv sync with no image manifest produced. The same dependency set installs successfully through pip in roughly two minutes locally while still using versions exported from uv.lock.
Summary by CodeRabbit