Skip to content

Conversation

@ogenstad
Copy link
Contributor

@ogenstad ogenstad commented Nov 17, 2025

Update CI pipeline to use the ruff version from the lock file instead of having to update the CI each time uv is updated.

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflow dependencies and Python environment setup process to use modern tooling. Modified linting commands to utilize the updated dependency management system.

@github-actions github-actions bot added the group/ci Issue related to the CI pipeline label Nov 17, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 17, 2025

Walkthrough

The GitHub Actions CI workflow is updated to modernize the Python development environment setup. The python-lint job is configured to depend on prepare-environment. The existing Python setup and ruff installation approach is replaced with an approach that uses actions/setup-python@v6 with Python 3.12 and astral-sh/setup-uv@v4 for UV installation. UV version is sourced from prepare-environment outputs. A new step installs lint dependencies via uv sync --group lint. Linting commands are updated to execute through the UV wrapper: ruff check and ruff format --check --diff become uv run variants targeting the current directory.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective of the PR: sourcing ruff version from uv.lock in CI instead of manual management.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pog-ruff-version-from-uvlock

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6060485 and fe3e57a.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (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). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (2)
.github/workflows/ci.yml (2)

80-93: Modernized setup approach looks good, with explicit directory targeting.

The replacement of simple pip/ruff installation with a structured UV-based approach aligns with modern Python tooling practices. The explicit . argument in uv run ruff check . and uv run ruff format --check --diff . (lines 91, 93) is a minor but beneficial clarification over the previous implicit behavior, as it makes the linting scope explicit.

Python 3.12 is an appropriate fixed version for linting, since static analysis tools should produce consistent results regardless of the runtime Python version.


74-93: No issues found. The original review concerns are unfounded.

Both dependencies referenced in the workflow changes are properly configured:

  • UV_VERSION is correctly exported from define-versions.yml with value "0.9.8"
  • lint dependency group is properly defined in pyproject.toml under [dependency-groups] with ruff, mypy, yamllint, and astroid

The workflow changes are valid and will execute without failure.

Likely an incorrect or invalid review comment.


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 and usage tips.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 17, 2025

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: fe3e57a
Status: ✅  Deploy successful!
Preview URL: https://8a2e9d30.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pog-ruff-version-from-uvlock.infrahub-sdk-python.pages.dev

View logs

@ogenstad ogenstad force-pushed the pog-ruff-version-from-uvlock branch from 3f80878 to fe3e57a Compare November 17, 2025 18:30
@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                Coverage Diff                @@
##           infrahub-develop     #638   +/-   ##
=================================================
  Coverage             75.56%   75.56%           
=================================================
  Files                   113      113           
  Lines                  9514     9514           
  Branches               1448     1448           
=================================================
  Hits                   7189     7189           
  Misses                 1838     1838           
  Partials                487      487           
Flag Coverage Δ
integration-tests 34.96% <ø> (ø)
python-3.10 48.86% <ø> (ø)
python-3.11 48.86% <ø> (-0.03%) ⬇️
python-3.12 48.86% <ø> (+0.02%) ⬆️
python-3.13 48.84% <ø> (-0.03%) ⬇️
python-3.9 48.84% <ø> (ø)
python-filler-3.12 24.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ogenstad ogenstad marked this pull request as ready for review November 17, 2025 19:20
@ogenstad ogenstad requested a review from a team November 17, 2025 19:20
@ogenstad ogenstad merged commit 21d565e into infrahub-develop Nov 18, 2025
20 checks passed
@ogenstad ogenstad deleted the pog-ruff-version-from-uvlock branch November 18, 2025 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/ci Issue related to the CI pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants