fix version identification#219
Conversation
|
Warning Review limit reached
Next review available in: 9 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?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 reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. 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, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. 📝 WalkthroughWalkthroughThe setuptools_scm version template now generates a __git_commit__ variable from scm_version.node. lambdapdk/__init__.py imports this as _gitcommit and uses it in _LambdaPath.__init__ to conditionally select a version-tag or commit-derived reference when resolving the dataroot archive URL. ChangesGit commit metadata and dataroot resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)Not applicable — the change involves conditional logic within a single component's initialization path, not a multi-actor interaction flow. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
Actionable comments posted: 2
🤖 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 `@lambdapdk/__init__.py`:
- Around line 26-34: The version selection logic in __init__ currently slices
_gitcommit unconditionally, which can turn the placeholder value into an invalid
ref; update the __init__ path that computes _version and url_suffix to first
verify _gitcommit is a usable git node string before removing the leading
prefix. If _gitcommit is missing or equals the build-time placeholder, fall back
to the release/version-based ref instead of passing a bogus value into
set_dataroot, and keep the existing version check behavior in sync with
version/__version__.
- Around line 17-23: The fallback handling in lambdapdk.__init__ currently ties
__git_commit__ to the version imports, so an ImportError for _gitcommit also
clears version and __version__. Split the _gitcommit import from the
version/__version__ imports in the module-level import logic, and keep the
existing version values intact even if __git_commit__ is missing in _version.py.
Use the existing __version__, version, and _gitcommit symbols to separate the
fallback paths cleanly.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 26b2e3d9-42e0-4809-98d1-5749778de56f
📒 Files selected for processing (2)
lambdapdk/__init__.pypyproject.toml
Summary by CodeRabbit
New Features
Bug Fixes