feat(resolver): add versionmap-git source resolver#1197
Conversation
Add `VersionMapGitResolver` config model for the `versionmap-git` provider from the new-resolver-config proposal. Maps version numbers to git refs (commit SHAs or ref paths) with a separate `clone_url`, replacing the need for handwritten Python plugins. - Add `VersionMapGitResolver` pydantic model with `clone_url`, `build_sdist`, and `versionmap` fields - Register in `SourceResolver` discriminated union - Add to config reference docs - Add tests for config parsing, provider output, and validation Closes: AIPCC-17610 Co-Authored-By: Claude <claude@anthropic.com> Signed-off-by: Josef Skladanka <jskladan@redhat.com>
|
Warning Review limit reached
More reviews will be available in 40 minutes and 35 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughA new Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/reference/config-reference.rst (1)
44-45: ⚡ Quick winAdd a
versionaddeddirective for this new user-facing resolver entry.Line 44 introduces a new config model in user-facing docs, but there’s no explicit version marker in this section. Please add
.. versionadded::next to this entry for release traceability.Suggested patch
.. autopydantic_model:: VersionMapGitResolver + + .. versionadded:: 0.79.0As per coding guidelines: "Use Sphinx
versionadded,versionremoved,versionchangeddirectives for user-facing changes".🤖 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 `@docs/reference/config-reference.rst` around lines 44 - 45, The VersionMapGitResolver autopydantic_model directive in the config reference documentation is missing a versionadded directive to track when this new user-facing resolver was introduced. Add a `.. versionadded::` directive before the `.. autopydantic_model:: VersionMapGitResolver` line, specifying the appropriate version number where this resolver was first available, to comply with the documentation guidelines for user-facing changes.Source: Coding guidelines
🤖 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.
Inline comments:
In `@src/fromager/packagesettings/_resolver.py`:
- Around line 517-522: The validate_clone_url method in the Resolver class
currently accepts URLs with only a host and no repository path because Pydantic
v2 normalizes the path to "/" which is truthy. Add an additional validation
check after the existing path validation to explicitly reject URLs where the
path is only "/" or is root-only. This will prevent invalid git URLs that lack
an actual repository path from passing validation.
---
Nitpick comments:
In `@docs/reference/config-reference.rst`:
- Around line 44-45: The VersionMapGitResolver autopydantic_model directive in
the config reference documentation is missing a versionadded directive to track
when this new user-facing resolver was introduced. Add a `.. versionadded::`
directive before the `.. autopydantic_model:: VersionMapGitResolver` line,
specifying the appropriate version number where this resolver was first
available, to comply with the documentation guidelines for user-facing changes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 48b234c8-c0ab-46c3-a2e3-b4b237852236
📒 Files selected for processing (5)
docs/reference/config-reference.rstsrc/fromager/packagesettings/__init__.pysrc/fromager/packagesettings/_resolver.pytests/test_packagesettings_resolver.pytests/test_resolver.py
Co-Authored-By: Claude <claude@anthropic.com> Signed-off-by: Josef Skladanka <jskladan@redhat.com>
Add
VersionMapGitResolverconfig model for theversionmap-gitprovider from the new-resolver-config proposal. Maps version numbers to git refs (commit SHAs or ref paths) with a separateclone_url, replacing the need for handwritten Python plugins.VersionMapGitResolverpydantic model withclone_url,build_sdist, andversionmapfieldsSourceResolverdiscriminated unionCloses: AIPCC-17610