Skip to content

feat(infrahub): enhance peer node handling with unique identifier man…#111

Merged
minitriga merged 1 commit intomainfrom
atg-20260217-infrahub
Feb 17, 2026
Merged

feat(infrahub): enhance peer node handling with unique identifier man…#111
minitriga merged 1 commit intomainfrom
atg-20260217-infrahub

Conversation

@minitriga
Copy link
Contributor

@minitriga minitriga commented Feb 17, 2026

When syncing data in hierarchy it would not lookup from store before getting from infrahub.

Summary by CodeRabbit

Release Notes

  • Improvements
    • Enhanced relationship handling to intelligently reuse cached items when available instead of creating duplicates. Relationships now use unique identifiers for more efficient lookup and improved data consistency across one-to-one and one-to-many associations.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

Caution

Review failed

Failed to post review comments

Walkthrough

The pull request modifies relationship handling in the Infrahub adapter to implement unique_id-based lookups for peer items. Instead of always constructing new peer model instances, the code now derives a unique_id from peer model identifiers, checks if the peer item exists in the client store, and reuses cached instances when available. If not found, it creates and stores the peer item. This pattern is applied consistently across one-to-one relationships, one-to-one paths, and one-to-many relationships, with relationship values assigned as the peer item's unique_id.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: enhanced peer node handling with unique identifier management in the Infrahub adapter, which is the core focus of all modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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 and usage tips.

@cloudflare-workers-and-pages
Copy link

Deploying infrahub-sync with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0897996
Status: ✅  Deploy successful!
Preview URL: https://a534dcc6.infrahub-sync.pages.dev
Branch Preview URL: https://atg-20260217-infrahub.infrahub-sync.pages.dev

View logs

@minitriga minitriga added the type/bug Something isn't working as expected label Feb 17, 2026
@minitriga minitriga merged commit d05f10c into main Feb 17, 2026
15 checks passed
@minitriga minitriga deleted the atg-20260217-infrahub branch February 17, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant