Skip to content

ci: use uv for woodpecker smoke - #667

Merged
delete-cloud merged 1 commit into
mainfrom
codex/woodpecker-uv-sync-smoke
Jul 2, 2026
Merged

delete-cloud merged 1 commit into
mainfrom
codex/woodpecker-uv-sync-smoke

Conversation

@delete-cloud

@delete-cloud delete-cloud commented Jul 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • switch Woodpecker lint-and-smoke-tests from pip install -e '.[dev,redis]' ruff to uv sync plus uv run
  • add UV_CACHE_DIR=/cache/uv/coding-agent-loop on the existing woodpecker-runner-cache:/cache PVC
  • keep the dependency surface equivalent to the old smoke step with --extra redis --extra dev --no-group dev, and keep ruff as a transient uv run --with ruff tool dependency

Notes

  • uses --frozen instead of --locked because CI sets UV_DEFAULT_INDEX to the Aliyun mirror while uv.lock records PyPI sources; --locked fails by treating that source change as a lock update
  • leaves build-image and build-deploy-tools unchanged

Verification

  • git diff --check -- .
  • woodpecker-cli lint .woodpecker/ci.yml
  • local Python 3.12 uv sync + uv run ruff + uv run pytest completed with 22 passed
  • Docker python:3.12-slim cold run completed with 22 passed
  • Docker python:3.12-slim warm-cache run using the same mounted cache completed with Prepared 64 packages in 6ms and 22 passed
  • local subagent review: no P1/P2

Summary by CodeRabbit

  • Chores
    • Updated CI to use a faster, more consistent dependency setup and test execution flow.
    • Improved caching and environment configuration during lint and smoke test runs.
    • Switched automated checks to run through the new workflow.

Switch lint-and-smoke-tests to install uv, sync locked project dependencies from uv.lock with the existing redis/dev extras, and run ruff/pytest through uv while reusing the Woodpecker runner cache PVC.

Use --frozen because CI points UV_DEFAULT_INDEX at the Aliyun mirror while uv.lock records PyPI sources; --locked would require a lock source update. Keep --no-group dev so lint/smoke does not pull dependency-group dev packages like mypy/pandas.

Verification: woodpecker-cli lint .woodpecker/ci.yml; local uv sync/run ruff/pytest on Python 3.12; Docker python:3.12-slim cold and warm cache runs; local subagent review found no P1/P2.
@coderabbitai

coderabbitai Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Woodpecker CI configuration's lint-and-smoke-tests step is updated to use uv for dependency management instead of pip. It adds UV environment variables, cache directory setup, and replaces pip install -e plus direct ruff/pytest calls with uv sync --frozen and uv run invocations.

Changes

CI uv migration

Layer / File(s) Summary
uv-based lint-and-smoke-tests step
.woodpecker/ci.yml
Adds UV environment variables and cache dirs, installs uv, replaces pip install -e with uv sync --frozen (redis, dev extras), and runs ruff check/pytest via uv run.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: switching the Woodpecker smoke CI step to uv.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/woodpecker-uv-sync-smoke

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
.woodpecker/ci.yml (2)

24-24: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Pin the ruff version used via --with ruff.

The rest of the sync (line 23) is deterministic via --frozen against uv.lock, but ruff here is an unpinned transient dependency. uv run --with installs the extra package into a temporary overlay environment without touching the locked project env, so its resolved version can silently change between CI runs as new ruff releases land, causing unrelated lint failures.

♻️ Proposed fix: pin ruff version
-      - uv run --frozen --extra redis --extra dev --no-group dev --with ruff ruff check src/coding_agent/observability/ src/coding_agent/ui/http_server.py src/coding_agent/ui/session_manager.py tests/ui/test_server_compat_imports.py tests/coding_agent/test_agent_observability.py tests/coding_agent/test_bee_template_pack_smoke.py
+      - uv run --frozen --extra redis --extra dev --no-group dev --with "ruff==<pinned-version>" ruff check src/coding_agent/observability/ src/coding_agent/ui/http_server.py src/coding_agent/ui/session_manager.py tests/ui/test_server_compat_imports.py tests/coding_agent/test_agent_observability.py tests/coding_agent/test_bee_template_pack_smoke.py
🤖 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 @.woodpecker/ci.yml at line 24, The CI step using uv run with --with ruff is
pulling an unpinned transient ruff version, which can vary between runs; update
the workflow command to use a fixed ruff version in the same place so linting
stays deterministic. Keep the change in the ci.yml job that runs ruff check, and
ensure the pinned version is explicit wherever --with ruff is currently used.

23-25: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicated sync flags across three commands; consider --no-sync on the uv run lines.

The full --frozen --extra redis --extra dev --no-group dev flag set is repeated on all three lines. uv sync already puts the environment in the desired state on line 23; uv run re-triggers an inexact sync check on lines 24-25, which is redundant overhead and a maintenance risk if the flag set needs to change later (three places to update in sync).

♻️ Proposed simplification using `--no-sync`
       - uv sync --frozen --extra redis --extra dev --no-group dev
-      - uv run --frozen --extra redis --extra dev --no-group dev --with ruff ruff check src/coding_agent/observability/ src/coding_agent/ui/http_server.py src/coding_agent/ui/session_manager.py tests/ui/test_server_compat_imports.py tests/coding_agent/test_agent_observability.py tests/coding_agent/test_bee_template_pack_smoke.py
-      - uv run --frozen --extra redis --extra dev --no-group dev pytest tests/ui/test_server_compat_imports.py tests/coding_agent/test_agent_observability.py tests/coding_agent/test_bee_template_pack_smoke.py -q
+      - uv run --no-sync --with ruff ruff check src/coding_agent/observability/ src/coding_agent/ui/http_server.py src/coding_agent/ui/session_manager.py tests/ui/test_server_compat_imports.py tests/coding_agent/test_agent_observability.py tests/coding_agent/test_bee_template_pack_smoke.py
+      - uv run --no-sync pytest tests/ui/test_server_compat_imports.py tests/coding_agent/test_agent_observability.py tests/coding_agent/test_bee_template_pack_smoke.py -q
🤖 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 @.woodpecker/ci.yml around lines 23 - 25, The CI steps in the workflow repeat
the same uv sync flags across the `uv run` commands, which is redundant after
the prior `uv sync` step. Update the `uv run` invocations in the workflow to
reuse the already-prepared environment by adding `--no-sync`, while keeping the
existing `uv sync` step and the same test/ruff commands, so the setup remains
consistent and easier to maintain.
🤖 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 @.woodpecker/ci.yml:
- Line 24: The CI step using uv run with --with ruff is pulling an unpinned
transient ruff version, which can vary between runs; update the workflow command
to use a fixed ruff version in the same place so linting stays deterministic.
Keep the change in the ci.yml job that runs ruff check, and ensure the pinned
version is explicit wherever --with ruff is currently used.
- Around line 23-25: The CI steps in the workflow repeat the same uv sync flags
across the `uv run` commands, which is redundant after the prior `uv sync` step.
Update the `uv run` invocations in the workflow to reuse the already-prepared
environment by adding `--no-sync`, while keeping the existing `uv sync` step and
the same test/ruff commands, so the setup remains consistent and easier to
maintain.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 91e0d2bf-e2f0-4db7-989a-d836cd1d40f1

📥 Commits

Reviewing files that changed from the base of the PR and between ba1c7f3 and a12ae0d.

📒 Files selected for processing (1)
  • .woodpecker/ci.yml

@delete-cloud
delete-cloud merged commit 011d0e6 into main Jul 2, 2026
2 checks passed
@delete-cloud
delete-cloud deleted the codex/woodpecker-uv-sync-smoke branch July 2, 2026 13:24
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