Skip to content

fix(xtest): normalize refs/heads/ prefix in version resolution#444

Merged
dmihalcik-virtru merged 3 commits intomainfrom
DSPX-3010-fix-pushed-sdk
May 1, 2026
Merged

fix(xtest): normalize refs/heads/ prefix in version resolution#444
dmihalcik-virtru merged 3 commits intomainfrom
DSPX-3010-fix-pushed-sdk

Conversation

@dmihalcik-virtru
Copy link
Copy Markdown
Member

@dmihalcik-virtru dmihalcik-virtru commented Apr 30, 2026

Resolves refs/heads/ inputs (other than main) by stripping the
prefix before lookup, so callers passing full git refs like
refs/heads/release/sdk-v0.17 no longer fail version resolution.

Example failure this should fix: https://github.com/opentdf/web-sdk/actions/runs/25129340002

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

@dmihalcik-virtru dmihalcik-virtru requested review from a team as code owners April 30, 2026 13:53
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Warning

Rate limit exceeded

@dmihalcik-virtru has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 49 minutes and 52 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0805182c-54a8-459a-b808-70d704c1fae9

📥 Commits

Reviewing files that changed from the base of the PR and between c241f94 and 8d03232.

📒 Files selected for processing (2)
  • otdf-sdk-mgr/src/otdf_sdk_mgr/resolve.py
  • otdf-sdk-mgr/tests/test_resolve.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DSPX-3010-fix-pushed-sdk

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
Review rate limit: 0/1 reviews remaining, refill in 49 minutes and 52 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the _annotate function in resolve.py to strip the refs/heads/ prefix from the version string and adds a test case to verify resolution for non-main branches. The review feedback points out a potential regression where stripping this prefix could cause branch names that resemble hexadecimal SHAs to be incorrectly processed by SHA resolution logic later in the function. It also suggests using str.removeprefix() for better readability and notes that this change might affect the alias field in the final result.

Comment thread otdf-sdk-mgr/src/otdf_sdk_mgr/resolve.py Outdated
@github-actions
Copy link
Copy Markdown

@dmihalcik-virtru dmihalcik-virtru changed the title fix(otdf-sdk-mgr): normalize refs/heads/ prefix in version resolution fix(xtest): normalize refs/heads/ prefix in version resolution Apr 30, 2026
dmihalcik-virtru and others added 2 commits May 1, 2026 09:37
Resolves refs/heads/<branch> inputs (other than main) by stripping the
prefix before lookup, so callers passing full git refs like
refs/heads/release/sdk-v0.17 no longer fail version resolution.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dmihalcik-virtru dmihalcik-virtru force-pushed the DSPX-3010-fix-pushed-sdk branch from 3fcd0b6 to 8275879 Compare May 1, 2026 13:37
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

X-Test Failure Report

ronelliott
ronelliott previously approved these changes May 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

X-Test Failure Report

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

@dmihalcik-virtru dmihalcik-virtru merged commit 88550e3 into main May 1, 2026
15 checks passed
@dmihalcik-virtru dmihalcik-virtru deleted the DSPX-3010-fix-pushed-sdk branch May 1, 2026 21:19
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.

2 participants