normalize pkey#8
Conversation
📝 WalkthroughWalkthroughThis PR extends ChangesInfiniBandPKey pkey normalization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@components/nautobot/nautobot-app-overlays/nautobot_app_overlays/models.py`:
- Around line 374-377: The save() method canonicalizes pkey but downstream
lookup _find_existing_pkey may be doing exact-match on raw input, causing
unique_together conflicts; update _find_existing_pkey to call
NautobotAppOverlay.normalize_pkey(input_pkey) (or otherwise canonicalize the
lookup key) before querying and ensure any create payload paths also run
normalize_pkey on incoming pkey values so lookups and inserts use the same
canonical form (reference save(), normalize_pkey(), and _find_existing_pkey()).
🪄 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: Enterprise
Run ID: d5a83c7c-e022-4c88-bc98-5385e3b7e616
📒 Files selected for processing (2)
components/nautobot/nautobot-app-overlays/nautobot_app_overlays/models.pycomponents/nautobot/nautobot-app-overlays/nautobot_app_overlays/tests/test_models.py
|
/ok to test a09ac73 |
Description
Add normalization for pkey
Validation
The kind integration test is manual due to taking ~30 min to complete. When the PR is ready for review,
run Actions -> Kind Integration -> Run workflow against the copy-pr-bot generated
pull-request/<PR_NUMBER>branch. Use the defaulttest_pathfor the full suite,or narrow it only while debugging.
Passing Kind Integration run:
Checklist
CONTRIBUTING.md.docs screenshots, or Helm/rendered outputs.
Summary by CodeRabbit
New Features
Tests