-
Notifications
You must be signed in to change notification settings - Fork 116
CI improvements #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI improvements #197
Conversation
- Separate ruff and mypy runs for visibility - use `--frozen` flag for uv to keep uv.lock intact - update ruff version in precommit hooks
WalkthroughCI and tooling configs updated: python-uv setup action defaults adjusted (python-version, sync-flags, cache inputs, working-directory) and its .venv cache step removed; workflows split lint into separate Ruff and mypy jobs with mypy caching and adjusted test scopes; pre-commit and mypy dev dependency updated. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant GH as GitHub Actions
participant WF as run_tests.yml
participant UVAction as python-uv-setup action
participant UV as uv
participant Ruff as Ruff job
participant Mypy as Mypy job
Note over UVAction,UV: setup inputs (python-version: 3.13.9, working-directory: ".")
GH->>WF: workflow trigger
WF->>UVAction: setup python & sync (sync-flags include --frozen)
UVAction->>UV: uv sync --all-extras --dev --frozen
UV-->>UVAction: dependencies synced
WF->>Ruff: install deps → run ruff
WF->>Mypy: install deps → restore .mypy_cache → run mypy core → run mypy plugins → save .mypy_cache
Ruff-->>WF: results
Mypy-->>WF: results
WF-->>GH: complete
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/run_tests.yml (1)
38-41: Mypy invocations lack explicit --frozen flag.Lines 39 and 41 run mypy via
uv runwithout an explicit--frozenflag. AlthoughUV_FROZEN=1should propagate the behavior at the workflow level, the.pre-commit-config.yamlexplicitly includes--frozenin its mypy entries. For consistency and clarity, consider adding--frozento these uv invocations as well, or document why the workflow-level env var is sufficient.- - name: Run mypy core - run: uv run mypy --install-types --non-interactive agents-core/vision_agents - - name: Run mypy for plugins - run: uv run mypy --install-types --non-interactive --exclude 'plugins/.*/tests/.*' plugins + - name: Run mypy core + run: uv run --frozen mypy --install-types --non-interactive agents-core/vision_agents + - name: Run mypy for plugins + run: uv run --frozen mypy --install-types --non-interactive --exclude 'plugins/.*/tests/.*' plugins
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.github/actions/python-uv-setup/action.yml(1 hunks).github/workflows/run_tests.yml(1 hunks).pre-commit-config.yaml(2 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/run_tests.yml
29-29: property "environment" is not defined in object type {check_run_id: number; container: {id: string; network: string}; services: {string => {id: string; network: string; ports: {string => string}}}; status: string}
(expression)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: unit / Ruff
- GitHub Check: unit / Test "not integration"
- GitHub Check: unit / Mypy
- GitHub Check: unit / Ruff
- GitHub Check: unit / Mypy
- GitHub Check: unit / Test "not integration"
🔇 Additional comments (5)
.github/actions/python-uv-setup/action.yml (1)
49-49: Deterministic dependency installation via --frozen.The addition of the
--frozenflag ensures that uv won't update the lock file during CI, maintaining reproducibility across runs. Well done..pre-commit-config.yaml (2)
25-31: Frozen mypy invocations align with overall strategy.Both mypy hooks now use
uv run --frozen, ensuring deterministic type checking environments. The path specification formypy-maintargetsagents-core/vision_agentsexplicitly, and the plugins hook maintains its exclusion pattern.
4-4: No breaking changes identified—version bump is safe.The Ruff v0.14.5 release notes contain no documented breaking changes. The version bump from v0.12.8 to v0.14.5 is compatible with existing configurations.
.github/workflows/run_tests.yml (2)
14-16: UV_FROZEN environment variable establishes frozen mode globally.Setting
UV_FROZEN=1as a workflow-level environment variable ensures alluv runcommands inherit frozen-mode behavior without explicit flags. This is a clean, centralized approach to the deterministic build objective.
19-20: Ruff and mypy job separation improves observability.Separating these jobs clarifies which linting tool is running, making it easier to identify failures at a glance. The job name accurately reflects its sole responsibility.
I'd recommend running pre-commit/prek for handling linters instead of giving each one a new wrapper. If the individual visibilities of the linters are important, they can still be called separately but via pre-commit/prek Also, this seems related to #100 . Would be nice to have a review together. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/actions/python-uv-setup/action.yml(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: unit / Mypy
- GitHub Check: unit / Test "not integration"
- GitHub Check: unit / Ruff
- GitHub Check: unit / Mypy
- GitHub Check: unit / Ruff
- GitHub Check: unit / Test "not integration"
🔇 Additional comments (1)
.github/actions/python-uv-setup/action.yml (1)
7-15: Updated defaults align well with PR objectives.The pinned Python version (
3.13.9), expandedsync-flags(including--frozenand--link-mode=copy), and newworking-directorydefault are sensible choices for cache hit optimization and reproducibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
.github/workflows/run_tests.yml(3 hunks)pyproject.toml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: unit / Ruff
- GitHub Check: unit / Test "not integration"
- GitHub Check: unit / Run Mypy for core
- GitHub Check: unit / Ruff
- GitHub Check: unit / Test "not integration"
- GitHub Check: unit / Run Mypy for core
🔇 Additional comments (3)
pyproject.toml (1)
76-76: Align mypy dependencies with new caching strategy.Adding
mypycandfaster-cacheextras improves mypy performance and complements the new caching infrastructure in the workflow..github/workflows/run_tests.yml (2)
14-16: Environment variable properly configured for cache optimization.Setting
UV_FROZEN=1will prevent lock file mutations during CI runs, improving cache hits and addressing the PR objective. The inline comment is helpful.
19-28: Ruff job separation improves CI visibility.Splitting linting into separate jobs enables independent re-runs and clearer failure attribution, aligning with the PR objectives.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/run_tests.yml (1)
19-28: Consider using pre-commit as a CI orchestrator (optional architectural refactor).The separation of Ruff and mypy into distinct jobs provides good visibility. However, as noted in the PR comments, delegating orchestration to pre-commit (or prek) while invoking each tool separately through that orchestrator could simplify maintenance and keep tool configuration centralized. This is optional and can be addressed in follow-up work.
Also applies to: 30-53
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/run_tests.yml(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: unit / Mypy
- GitHub Check: unit / Test "not integration"
- GitHub Check: unit / Test "not integration"
- GitHub Check: unit / Mypy
🔇 Additional comments (2)
.github/workflows/run_tests.yml (2)
14-16: Well-structured use of UV_FROZEN environment variable.Setting
UV_FROZEN=1at the workflow level cleanly implements the PR objective to keepuv.lockintact across all steps, which should improve cache consistency and CI performance. This is a solid approach.
30-53: Mypy job properly structured with correct cache configuration.The mypy job cleanly separates type checking from linting, and the cache key correctly references only
pyproject.toml(not a non-existentmypy.ini). The separation of core and plugin type checks improves visibility as intended.
|
Hey @ulgens, thanks for keeping an eye on the PRs 👍 . In the description, I meant separating Ruff and Mypy runs only in CI/CD. The precommit hooks work the same as before. |
|
@dangusev I mean and This approach allows to use the same config in multiple places without redefining parameters and dependencies/versions. It decreases the fragmentation, makes the CI config easier to understand and maintain. |
--frozenflag for uv to keep uv.lock intact. It should also improve UV cache hits, speeding up the CISummary by CodeRabbit
Chores
CI
Style