Skip to content

fix version identification#219

Merged
gadfort merged 2 commits into
mainfrom
adjust-halo
Jul 1, 2026
Merged

fix version identification#219
gadfort merged 2 commits into
mainfrom
adjust-halo

Conversation

@gadfort

@gadfort gadfort commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Improved version-aware data loading so releases can reference the correct package assets for both tagged versions and commit-based builds.
  • Bug Fixes

    • Fixed data source resolution when the installed package version differs from the published release version, helping avoid broken or mismatched archive links.
    • Added support for using commit identifiers in generated version metadata to make archive references more reliable.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@gadfort, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 37d9aa1c-14cc-4ae8-b0d6-0951fc43c3f6

📥 Commits

Reviewing files that changed from the base of the PR and between 6361591 and 1b0326f.

📒 Files selected for processing (1)
  • lambdapdk/__init__.py
📝 Walkthrough

Walkthrough

The 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.

Changes

Git commit metadata and dataroot resolution

Layer / File(s) Summary
Generate __git_commit__ in version template
`pyproject.toml`
The setuptools_scm write_to_template config is extended to include __git_commit__ populated from scm_version.node in the generated _version.py.
Consume commit metadata for dataroot URL resolution
`lambdapdk/__init__.py`
Imports __git_commit__ as _gitcommit (None on ImportError) and uses it in _LambdaPath.__init__ to conditionally build url_suffix and alternative_ref for PythonPathResolver.set_dataroot, preferring a v{__version__} tag when version matches, otherwise a commit-derived reference.

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)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and clearly related to the version metadata and git-reference handling changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch adjust-halo

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between f8c009f and 6361591.

📒 Files selected for processing (2)
  • lambdapdk/__init__.py
  • pyproject.toml

Comment thread lambdapdk/__init__.py
Comment thread lambdapdk/__init__.py
@gadfort gadfort merged commit 487570b into main Jul 1, 2026
4 checks passed
@gadfort gadfort deleted the adjust-halo branch July 1, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant