Skip to content

Conversation

rhamzeh
Copy link
Member

@rhamzeh rhamzeh commented Sep 16, 2025

Description

Workflow changes from @abhiaagarwal's PR here: #193

What problem is being solved?

How is it being solved?

What changes are made to solve it?

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • Chores

    • Migrated CI to UV-based tooling for dependency management, builds, and publishing.
    • Streamlined workflows with improved caching and simplified step sequencing.
    • Isolated linting to a targeted condition to reduce noise.
    • No changes to runtime behavior or user-facing features.
  • Tests

    • Consolidated test execution into a single command with coverage enforcement.
    • Coverage reporting remains enabled.
@rhamzeh rhamzeh requested a review from a team as a code owner September 16, 2025 19:57
Copy link
Contributor

coderabbitai bot commented Sep 16, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The GitHub Actions workflow in .github/workflows/main.yaml was migrated from a pip/setuptools-based process to uv. Steps now use astral-sh/setup-uv, uv sync, uv run pytest, and uv build. Linting via ruff is gated to a specific matrix entry. Codecov upload remains. The publish job mirrors uv setup and build.

Changes

Cohort / File(s) Change summary
CI workflow migration to uv
\.github/workflows/main.yaml
Replaced actions/setup-python with astral-sh/setup-uv (version/checksum, cache inputs). Dependencies installed via uv sync; urllib3 pinned via matrix with uv pip. Added conditional ruff step for Python 3.10/urllib3 1.26.19. Tests run via uv run pytest with coverage. Publish job uses uv sync and uv build. Removed prior pip/setuptools steps and old caching inputs.

Sequence Diagram(s)

sequenceDiagram autonumber actor Dev as GitHub Actions Runner participant UVSetup as setup-uv Action participant UV as uv Tooling participant Pytest as pytest participant Ruff as ruff participant Codecov as Codecov Uploader Dev->>UVSetup: Set up uv and Python (matrix) Dev->>UV: uv sync Dev->>UV: uv pip install urllib3==${{ matrix.urllib3-version }} alt Lint gated (py==3.10 && urllib3==1.26.19) Dev->>UV: uv run ruff check UV->>Ruff: Execute lint end Dev->>UV: uv run pytest --cov-fail-under 60 --cov openfga_sdk UV->>Pytest: Execute tests opt On main/coverage conditions Dev->>Codecov: Upload coverage end 
Loading
sequenceDiagram autonumber actor Dev as GitHub Actions Runner (Publish) participant UVSetup as setup-uv Action participant UV as uv Tooling Dev->>UVSetup: Set up uv and Python (3.10) Dev->>UV: uv sync Dev->>UV: uv build note right of UV: Build artifacts (sdist/wheel) 
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


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.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title "fix(ci): fix build with uv" is concise, uses a conventional commit prefix, and accurately describes the primary change in the PR—updating the CI to use uv (setup-uv, uv sync, uv build/run). It clearly signals the intent to fix the CI build and is specific enough for a reviewer scanning history to understand the main purpose.
@rhamzeh rhamzeh force-pushed the fix/release branch 2 times, most recently from 263610a to 77361ba Compare September 16, 2025 20:06
@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.73%. Comparing base (5ff4a74) to head (49d9d6f).

Additional details and impacted files
@@ Coverage Diff @@ ## main #225 +/- ## ======================================= Coverage 70.73% 70.73% ======================================= Files 134 134 Lines 10884 10884 ======================================= Hits 7699 7699 Misses 3185 3185 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@rhamzeh rhamzeh changed the title fix(ci): fix build w/ uv fix(ci): fix build with uv Sep 16, 2025
@rhamzeh rhamzeh added this pull request to the merge queue Sep 16, 2025
Merged via the queue into main with commit 42cc5cc Sep 16, 2025
28 checks passed
@rhamzeh rhamzeh deleted the fix/release branch September 16, 2025 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants