Skip to content

Conversation

@srivatsankrishnan
Copy link
Contributor

@srivatsankrishnan srivatsankrishnan commented Dec 19, 2025

Summary

Fix docs build failure caused by SCM version mismatch during uv sync.

  • Update Build and Deploy Documentation workflow to use a full git checkout (fetch-depth: 0) so SCM-based versioning is stable.

  • Pin Python to the repo’s .python-version via actions/setup-python.

  • Run uv sync with --frozen to ensure the environment matches uv.lock deterministically.

Root cause

The failing step was building/installing cloudai itself during the docs workflow’s uv sync.

  • cloudai uses SCM-based dynamic versioning (pdm-backend + source = "scm").

  • In CI, the repo was checked out in a way that could be shallow / missing full git history/tags, which makes SCM-version computation flaky.

  • Under that condition, the build backend can produce inconsistent versions between wheel filename and wheel metadata, leading to:
    --metadata version: 0.1.dev…+g
    --wheel filename version: 0.1.dev…+g.dYYYYMMDD

Tools reject this as an invalid wheel (“metadata version does not match wheel filename”), so the docs job fails during “Set up envir

Test Plan

  • CI/CD
  • Manual Github action workflow (fork)
image

Additional Notes

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

📝 Walkthrough

Walkthrough

Two GitHub Actions workflows are updated to fetch full git history during checkout, configure Python version selection from a .python-version file, and add a --frozen flag to the uv sync command in the docs workflow for reproducible builds.

Changes

Cohort / File(s) Summary
Checkout Configuration
\.github/workflows/ci.yml`, `.github/workflows/docs.yml``
Added fetch-depth: 0 to Checkout step to fetch complete git history instead of shallow clone
Python Version Management
\.github/workflows/ci.yml`, `.github/workflows/docs.yml``
Added python-version-file: ".python-version" to Set up Python step for consistent version selection
Build Dependency Resolution
\.github/workflows/docs.yml``
Changed uv sync --extra docs to uv sync --frozen --extra docs for reproducible dependency locking

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that fetch-depth: 0 is necessary for both workflows' downstream tasks (e.g., version detection, changelog generation)
  • Confirm .python-version file exists and contains the intended Python version
  • Validate that --frozen flag in docs workflow prevents unintended dependency updates and aligns with intended behavior

Poem

🐰 A rabbit hops through workflows so fast,
With full git history and frozen updates at last,
Python versions from files, no guessing required—
Reproducible builds are what we desired!

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description is well-detailed and clearly explains the root cause, the changes made, and the test plan, making it directly related to the changeset.
Title check ✅ Passed The title accurately describes the main purpose of the changes: fixing docs build failure through SCM versioning stability in CI workflows.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a 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.

@srivatsankrishnan srivatsankrishnan marked this pull request as ready for review December 19, 2025 00:28
@srivatsankrishnan srivatsankrishnan changed the title Build and Deploy documentation Fix docs build failure by ensuring stable SCM versioning in CI workflow Dec 19, 2025
Copy link
Contributor

@amaslenn amaslenn left a comment

Choose a reason for hiding this comment

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

This PR adds a workaround addressing symptoms, not the root cause. The real issue is that #760 didn't update uv.lock file.

Please add the following command to avoid such issues in future: uv lock --check (right after "Install dependencies" step under "lint" job).

@srivatsankrishnan please do not create new PRs for the same topic as you did with (#756 and #760), that ruins review process.

@amaslenn amaslenn added the bug Something isn't working label Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants