Skip to content

set source of pool rels on Templates#8536

Closed
ajtmccarty wants to merge 1 commit intoajtm-03062026-template-rel-poolsfrom
ajtm-03072026-to-graphql-pool-source
Closed

set source of pool rels on Templates#8536
ajtmccarty wants to merge 1 commit intoajtm-03062026-template-rel-poolsfrom
ajtm-03072026-to-graphql-pool-source

Conversation

@ajtmccarty
Copy link
Contributor

should follow #8535

adds an extra layer of logic to the single relationship graphql resolver to handle a special case for templates using a resource pool on a relationship

if a Template instance has a xyz_from_resource_pool relationship linked to a CoreIPAddress/PrefixPool, this really means that the source of the xyz relationship will be the CoreIPAddress/PrefixPool on the xyz_from_resource_pool relationship

the new graphql serialization logic handles this by setting the source of the xyz relationship to the linked resource pool in this format

xyz {
    properties {
        source {
            id
            ...
        }
    }
}

in combination with #8535, this allows the _from_resource_pool relationships to be completely ignored by users of the UI, SDK, object files, and graphql

@github-actions github-actions bot added the group/backend Issue related to the backend (API Server, Git Agent) label Mar 7, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 7, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (4)
  • main
  • stable
  • develop
  • release-.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 689072cf-0c99-41cf-a4f5-40708c364057

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 7, 2026

Merging this PR will improve performance by 38.85%

⚡ 12 improved benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
test_base_schema_duplicate_CoreProposedChange 2.1 ms 1.7 ms +23.77%
test_get_menu 246.2 ms 188.7 ms +30.48%
test_relationshipmanager_getpeer 157.9 µs 130.4 µs +21.05%
test_graphql_generate_schema 517.5 ms 372.7 ms +38.85%
test_query_rel_one 663.2 ms 502.8 ms +31.89%
test_query_one_model 465 ms 354.8 ms +31.04%
test_schemabranch_process 1,041.1 ms 794.1 ms +31.11%
test_load_node_to_db_node_schema 66.6 ms 51.5 ms +29.17%
test_nodemanager_querypeers 1.5 ms 1.3 ms +21.05%
test_schemabranch_duplicate 7.3 ms 5.5 ms +31.74%
test_get_schema 328.3 ms 250.9 ms +30.83%
test_query_rel_many 693.6 ms 523.6 ms +32.45%

Comparing ajtm-03072026-to-graphql-pool-source (e423ded) with ajtm-03062026-template-rel-pools (c9213da)

Open in CodSpeed

@ajtmccarty ajtmccarty marked this pull request as ready for review March 8, 2026 00:05
@ajtmccarty ajtmccarty requested a review from a team as a code owner March 8, 2026 00:05
@ajtmccarty
Copy link
Contributor Author

we are not taking the from_pool approach any longer. it's going to be _from_resource_pool all the way

@ajtmccarty ajtmccarty closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/backend Issue related to the backend (API Server, Git Agent)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants