Skip to content

Merge release-1.11 into develop - #10084

Open
infrahub-github-bot-app[bot] wants to merge 23 commits into
developfrom
release-1.11
Open

Merge release-1.11 into develop#10084
infrahub-github-bot-app[bot] wants to merge 23 commits into
developfrom
release-1.11

Conversation

@infrahub-github-bot-app

@infrahub-github-bot-app infrahub-github-bot-app Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Merging release-1.11 into develop after merging pull request #10077.


Summary by cubic

Merges release-1.11 into develop. Migrates the frontend GraphQL transport to @urql/core, refactors merge/rebase validation and recompute, adds the IPAddress attribute kind with stricter kind‑change checks, and adds sort controls to the proposed changes list (defaults to newest first).

  • Refactors

    • Replaced Apollo with an imperative graphqlClient in @/shared/api/graphql/client; removed <ApolloProvider> and switched all entities/*/api calls to graphqlClient and graphql(). Kept TanStack Query; no GraphQL hooks/cache. Auth via @urql/exchange-auth (single refresh; 401 replay kept). Request‑priority header and uploads preserved. Removed @apollo/client, apollo-upload-client, @types/apollo-upload-client; added @urql/core, @urql/exchange-auth. Regenerated GraphQL types. Aligns with INFP-563.
    • Injected validator components into merge/rebase: MergeConstraintValidator now receives a determiner and a constraint-info merger. ConstraintValidatorDeterminer.get_constraints(), UniquenessConstraintScoper, and the deduplicator accept schema_branch at call time; wiring passes it at call sites (merge/rebase/proposed-change tasks, builders).
    • GraphQL single-relationship resolution: id‑only queries return the preloaded peer stub without hydrating the peer; the peer’s concrete kind is carried so generics also skip hydration.
    • Attribute kinds: added IPAddress (bare IP without mask). _normalize_value is now a classmethod and changing an attribute’s kind is rejected when stored values aren’t already canonical for the new kind. GraphQL exposes IPAddressType; SDK/types updated.
    • Docs/specs: recorded merge selective‑regen known limitations (IFC‑2950).
  • Bug Fixes

    • Uniqueness checks: node-scoped validations reach participating fields in mixed diffs and deduplicate across inheritance when broadened by schema changes. Rebase paths pass the candidate schema_branch so constraints compute accurately.
    • Coalesced recompute: relationship changes and deletions of a read peer refresh readers’ computed attributes, display labels, and HFIDs, including cross-relationship HFIDs. Derivation tolerates profile/template kinds and kinds missing from the branch.
    • Jinja2 computed attributes: macros that read a number-pool value now defer until allocation, and attributes depending on a deferred macro are also skipped until ready. Repository imports no longer always mark Jinja2 transforms as updated; template_path comparison normalizes Path vs string and validates all fields.
    • Frontend forms: relationship selectors honor common_parent; selections clear when the parent changes and inline “Add new” pre-fills the parent.
    • Git sync: branches in a terminal (merged/deleting) state are skipped to avoid aborting repository synchronization.

Written for commit ed60894. Summary will update on new commits.

Review in cubic

pa-lem and others added 7 commits July 28, 2026 16:36
Relationship selectors in object forms now honor the `common_parent` schema
property: options are filtered to peers that share the same parent as the value
picked for the referenced relationship in the same form, instead of listing
every peer.

- Add useCommonParentFilter hook: watches the sibling common_parent field and
  derives a single-hop `<X>__ids` filter (plus a matching RelationshipInput
  parent shape).
- Apply across the many, node, generic, and hierarchical relationship fields.
- Hide the manual parent picker on cardinality-one fields when common_parent is
  set, since the parent is then driven by the sibling field.

Keep the selection consistent with the filter so it can't be bypassed:
- Clear the current selection when the chosen parent changes (a peer valid under
  the old parent no longer satisfies the constraint).
- Pre-fill the inline "Add new" create form with the chosen parent, so a peer
  created there satisfies the constraint instead of being an escape hatch.
- Keep the filter applied on UUID searches (opt-in), and drop the hierarchical
  "Explore" tree tab, which browses a different axis and can't honor the filter.

Fixes IFC-1646.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix: skip merged branches during git repository sync

A git branch mapping to a merged (read-only) Infrahub branch caused
collect_pending_imports to issue a CoreRepositoryUpdate, which the graph
rejects for merged branches. The unhandled error aborted the entire sync
flow on every cron cycle, so no branches or repositories synced at all.

Branches in a terminal status are now skipped during collection, letting
the remaining branches and repositories sync as normal.

Also:
- Add a regression test covering the merged-branch case.
- Stub sdk.branch.all() in the git conftest, shared by the sync tests and
  the lock-scope test. The skip introduces a branch.all() call on the
  sync path, which the dummy SDK requester answers with an empty payload
  and raises KeyError: 'Branch'.
- Add a changelog fragment.

Fixes #9931
…ments (#10071)

* docs: add local development and evaluation sizing to hardware requirements

* docs: address review — recommend 6/8 cores for local eval, drop changelog
* docs: document Community single-core Neo4j limitation

* docs: address review — clarify Neo4j Community single-core, drop changelog
* docs: link hardware requirements from Community install page

* docs: drop changelog for minor doc link
Remove resolved violations that were previously ignored
@codspeed-hq

codspeed-hq Bot commented Jul 30, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 12 untouched benchmarks
🆕 1 new benchmark

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 test_query_rel_one_id_only N/A 655.1 ms N/A

Comparing release-1.11 (ed60894) with develop (cb1c605)

Open in CodSpeed

@bilalabbad
bilalabbad requested a review from a team as a code owner July 30, 2026 08:02
@github-actions github-actions Bot added the group/frontend Issue related to the frontend (React) label Jul 30, 2026
…ver lookup (#10069)

The coalesced merge and rebase recompute already refreshes the stored cross-relationship
human-friendly id. The earlier reproduction read InfrahubNode.hfid, which the SDK computes on
the client side from a cached peer, so it looked stale while the server value was correct.

Assert the server value through get_one_by_hfid: after merge and rebase the reader is found by
its new id and no longer by the old one. Drop the xfail markers so the tests guard the behavior.
Replace the two builder-level component tests with one unit test that checks the builder
schedules the HFID recompute for a cross-relationship id.
@github-actions github-actions Bot added the group/backend Issue related to the backend (API Server, Git Agent) label Jul 30, 2026
petercrocker and others added 11 commits July 30, 2026 12:21
infrahub-demo-sp already has the receiving update-infrahub.yml and
update-infrahub-sdk.yml workflows, but it was never added to this matrix,
so they have never fired. Adding it means a new Infrahub release opens a
version-bump PR there, whose CI runs the demo's integration suite against
the release.
Deleting a node that other nodes read across a relationship left the readers with derived values (display label, human-friendly id, computed attribute) that still named the deleted node after a merge or rebase.

An update whose changed fields include a relationship now also recomputes the node's own derived values that read across it, keyed by the node's own id. This covers both merge and rebase through the shared coalesced deriver, and attribute-only updates are unchanged.

Relationship resolution also tolerates profile and template kinds, so such a node in the change set no longer aborts the whole coalesced recompute.
…mber pool (closes #7836) (#10085)

* test: add failing test for IFC-2095-jinja2-unallocated-pool

Reproduces the Jinja2 computed-attribute crash when a macro formats a
pool-sourced attribute that is not yet allocated during node creation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: skip Jinja2 macros referencing unallocated pool attributes

A computed Jinja2 attribute whose template reads a pool-sourced local
attribute is now left unrendered while that attribute has no allocated
value, instead of rendering against None. The macro is evaluated once
the pool allocation has taken place.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: cover independent macros rendering when a pool is unallocated

Adds a Node.new(process_pools=False) case asserting that a macro which
does not reference the unallocated pool still renders, guarding against
skipping every macro instead of only pool-dependent ones.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: add changelog fragment for jinja2 pool fix

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: reuse Snow schema helper for pool computed-attribute tests

Derives the number-pool + Jinja2 computed-attribute schema from the
shared Snow helper via deepcopy, overriding only the identifier template
to exercise the leading-zero format filter, instead of defining a
bespoke inline schema.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: guard recompute path against unallocated pool variables

_resolve_jinja2_variables can now return None for a pool-sourced
dependency that is not yet allocated; the recompute path skips that
attribute instead of passing None into template rendering.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: extract pending-pool-dependency check from variable resolver

Keeps _resolve_jinja2_variables a pure variable-to-value mapping and
moves the "can this macro be rendered yet" decision into a dedicated
predicate, shared by the create and recompute paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: cover GraphQL create and mixed-variable pool macros

Adds a GraphQL create path exercising the reporter's scenario end to end,
and a macro referencing both the pool value and a plain attribute to
confirm every variable renders once the pool is allocated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: move GraphQL pool-macro test to the GraphQL mutation suite

Relocates the GraphQL create test next to the other jinja2-computed-
attribute mutation tests, and extracts the shared Snow schema builder and
number-pool provisioning into tests/helpers/number_pool so both the
core-layer and GraphQL-layer tests reuse them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: build a fresh ComputedAttribute in the number-pool helper

Assigns a new ComputedAttribute rather than mutating an optional field,
so the helper type-checks under ty.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: key changelog fragment to GitHub issue 7836

Renames the orphan changelog fragment so towncrier renders the link to
the original issue this fix closes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: defer computed attributes chained on a skipped pool macro

When a computed attribute is skipped because it reads an unallocated pool
value, any computed attribute that references it is now deferred as well,
instead of rendering against the skipped value. Macros are already
iterated in dependency order, so tracking the skipped set is enough to
cascade the skip.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: extract referenced-root-fields helper for macro dependencies

Replaces the hand-rolled `variable.split("__")[0]` root extraction, which
was repeated in both the create and recompute macro paths, with a single
named helper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: move referenced-root-fields onto InfrahubJinja2Template

The root-field extraction operates only on a template's variables, so it
belongs on the template rather than as a static method on Node. Both the
create and recompute macro paths call it through the template.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-import-IFC-336

Fix Jinja2 comparison during repository imports
…10062)

* perf(graphql): skip peer hydration for id-only single relationships

When a cardinality-one relationship query requests only the peer node's
`id` (no properties, metadata, or additional node fields), return the
peer ID already loaded on the parent instead of hydrating a full peer
Node via NodeDataLoader. This avoids redundant database work on
relationship-heavy queries such as cable-plan reports.

The resolver falls through to the existing NodeDataLoader / query_peers
paths whenever any other field, property, or metadata is requested, so
behavior is unchanged for all other queries.

* fix(graphql): skip id-only relationship shortcut for generic peers

The id-only single-relationship shortcut returns {"id": peer_id} without
the peer kind. For a relationship whose peer is a generic, the GraphQL
node field is an interface whose resolve_type needs the kind, so it fails
with "Unable to identify the type of the instance." Restrict the shortcut
to concrete peers; generic peers fall back to full hydration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ZdYyE4JewWbMZAbvWPjQe

* perf(graphql): carry peer kind so generic id-only relationships skip hydration

The id-only single-relationship shortcut had to be disabled for generic
peers: it returned {"id": peer_id} without a kind, and a generic peer
resolves to a GraphQL interface whose resolve_type indexes the type
registry by kind. That excluded a large share of core-schema
relationships from the optimization.

The peer's concrete kind was available all along. The relationship query
already binds the peer vertex and returns peer.uuid, so returning
peer.kind alongside it costs no extra round trip. Thread that kind
through GroupedPeerNodes, PeerWithRelationshipMetadata and Relationship
so the preloaded stub on a node's GraphQL response can carry __kind__,
and let the shortcut serve generic peers from it.

The shortcut declines whenever the kind is absent and the resolver
hydrates as before, so correctness never depends on the enrichment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* test(graphql): assert generic-peer id-only relationship skips hydration

Add a component test that exercises the id-only single-relationship shortcut
against a cardinality-one relationship whose peer is a generic. It monkeypatches
NodeDataLoader.load to raise, so a regression to the correct-but-slower
hydrating path fails loudly instead of passing silently.

* test(benchmark): add id-only single-relationship benchmark

Add test_query_rel_one_id_only mirroring test_query_rel_one but selecting
only the peer id (repository { node { id } }), so the id-only
single-relationship shortcut is exercised and validated by CodSpeed CI.

* update name, reduce comment

* consolidate tests

* reduce size of huge test file

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Aaron McCarty <aaron@opsmill.com>
* refactor(validators): inject the constraint determiner and merger into MergeConstraintValidator

MergeConstraintValidator built its determiner and constraint-info merger inside
validate() because both needed the candidate schema, which is only known per
call. Turn the schema into an argument on their entry methods so the components
can be constructed at the wiring layer and injected.

- ConstraintValidatorDeterminer.get_constraints() takes schema_branch
- UniquenessConstraintScoper.requires_validation()/affected_node_uuids() take schema_branch
- UniquenessConstraintDeduplicator.deduplicate() takes schema_branch
- ConstraintInfoMerger.merge() takes schema_branch
- MergeConstraintValidator receives determiner + merger, no longer needs db

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix test to run assertions

* one integration test for node-scoped uniqueness violations

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…9586)

* docs: polish 1.9.0 release notes — voice, clarity, learn-more links

Apply a voice and clarity pass to the 1.9.0 release notes:

- Voice: drop the marketing opener, remove a forbidden word and an
  idiom, replace product-as-agent value claims, cut vendor-positioning
  phrasing.
- Clarity for an international audience: split over-packed sentences,
  expand SIEM and hfid on first use, replace residual colloquialisms.
- Educational: add a "why" to namespace restrictions; add six
  "Learn more" links from feature sections to their docs pages.
- Fixes: correct the "are can be forwarded" grammar error and resolve
  the infrahub-sdk version placeholder to 1.20.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: polish 1.8.0 release notes — voice, clarity, learn-more links

Apply the same voice and clarity pass to the 1.8.0 notes:

- Voice: drop the marketing opener and filler ("now simpler",
  "continues to evolve", "enhance the day-to-day experience"), fix a
  first-person "we can now".
- Clarity: fix the File Object terminology drift and a comma splice,
  add four "Learn more" links to the feature docs.
- Correctness: fix the duplicate "Second" migration step (-> Third),
  two grammar errors ("helps speeding up", "command need to run"),
  and a stray semicolon in the MIME-type list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: replace figurative "carry/carries" in 1.9.0 notes

"carries the event as JSON" -> "contains"; "Webhooks can now carry ...
headers" -> "send". Direct verbs per the voice rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Yvonne <yvonne@opsmill.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Damien Garros <damien@opsmill.com>
Supersedes #10078, which cannot be resolved in place because its head is
`stable` (conflict resolution would require committing to `stable`).

Conflicts resolved:

- frontend/app/src/shared/components/inputs/relationship-many.tsx
  Import conflict only. `release-1.11` moved the node types out of
  `@/entities/nodes/types` into `@/entities/nodes/object/domain/model/node`
  (architecture refactor #9792); `stable` added `NodeFieldsWithMetadata` to
  the old path. Kept `release-1.11`'s module path and `stable`'s added symbol.

- frontend/app/.betterer.results
  Generated file; both sides only differed in content hashes and line
  numbers for the same three known tsc errors. Regenerated on the merged
  tree rather than hand-picking a side.

Silent semantic conflicts git merged cleanly but which do not compile
(both are the same deleted-module problem as above, in files only `stable`
touched, so git had no conflict to report):

- useCommonParentFilter.ts, relationship-one.tsx,
  relationship-hierarchical-input.tsx, add-relationship-action.tsx
  repointed `@/entities/nodes/types` -> `@/entities/nodes/object/domain/model/node`
- useCommonParentFilter.ts repointed `@/entities/schema/types`
  -> `@/entities/schema/domain/model/schema`

No behaviour was changed on either side; every hunk from both branches is
preserved.

Verified on the merged tree: biome ci, knip, betterer ci, vitest
(164 files / 1108 tests), ruff check, ruff format --check.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(frontend): filter relationship selectors by common_parent (#10039)

Relationship selectors in object forms now honor the `common_parent` schema
property: options are filtered to peers that share the same parent as the value
picked for the referenced relationship in the same form, instead of listing
every peer.

- Add useCommonParentFilter hook: watches the sibling common_parent field and
  derives a single-hop `<X>__ids` filter (plus a matching RelationshipInput
  parent shape).
- Apply across the many, node, generic, and hierarchical relationship fields.
- Hide the manual parent picker on cardinality-one fields when common_parent is
  set, since the parent is then driven by the sibling field.

Keep the selection consistent with the filter so it can't be bypassed:
- Clear the current selection when the chosen parent changes (a peer valid under
  the old parent no longer satisfies the constraint).
- Pre-fill the inline "Add new" create form with the chosen parent, so a peer
  created there satisfies the constraint instead of being an escape hatch.
- Keep the filter applied on UUID searches (opt-in), and drop the hierarchical
  "Explore" tree tab, which browses a different axis and can't honor the filter.

Fixes IFC-1646.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: skip merged branches during git repository sync (#9938)

fix: skip merged branches during git repository sync

A git branch mapping to a merged (read-only) Infrahub branch caused
collect_pending_imports to issue a CoreRepositoryUpdate, which the graph
rejects for merged branches. The unhandled error aborted the entire sync
flow on every cron cycle, so no branches or repositories synced at all.

Branches in a terminal status are now skipped during collection, letting
the remaining branches and repositories sync as normal.

Also:
- Add a regression test covering the merged-branch case.
- Stub sdk.branch.all() in the git conftest, shared by the sync tests and
  the lock-scope test. The skip introduces a branch.all() call on the
  sync path, which the dummy SDK requester answers with an empty payload
  and raises KeyError: 'Branch'.
- Add a changelog fragment.

Fixes #9931

* docs: add local development and evaluation sizing to hardware requirements (#10071)

* docs: add local development and evaluation sizing to hardware requirements

* docs: address review — recommend 6/8 cores for local eval, drop changelog

* docs: document Community single-core Neo4j limitation (#10072)

* docs: document Community single-core Neo4j limitation

* docs: address review — clarify Neo4j Community single-core, drop changelog

* docs: link hardware requirements from Community install page (#10073)

* docs: link hardware requirements from Community install page

* docs: drop changelog for minor doc link

* ci: dispatch Infrahub releases to infrahub-demo-sp (#10076)

infrahub-demo-sp already has the receiving update-infrahub.yml and
update-infrahub-sdk.yml workflows, but it was never added to this matrix,
so they have never fired. Adding it means a new Infrahub release opens a
version-bump PR there, whose CI runs the demo's integration suite against
the release.

* fix: render Jinja2 computed attributes sourced from an unallocated number pool (closes #7836) (#10085)

* test: add failing test for IFC-2095-jinja2-unallocated-pool

Reproduces the Jinja2 computed-attribute crash when a macro formats a
pool-sourced attribute that is not yet allocated during node creation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: skip Jinja2 macros referencing unallocated pool attributes

A computed Jinja2 attribute whose template reads a pool-sourced local
attribute is now left unrendered while that attribute has no allocated
value, instead of rendering against None. The macro is evaluated once
the pool allocation has taken place.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: cover independent macros rendering when a pool is unallocated

Adds a Node.new(process_pools=False) case asserting that a macro which
does not reference the unallocated pool still renders, guarding against
skipping every macro instead of only pool-dependent ones.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: add changelog fragment for jinja2 pool fix

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: reuse Snow schema helper for pool computed-attribute tests

Derives the number-pool + Jinja2 computed-attribute schema from the
shared Snow helper via deepcopy, overriding only the identifier template
to exercise the leading-zero format filter, instead of defining a
bespoke inline schema.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: guard recompute path against unallocated pool variables

_resolve_jinja2_variables can now return None for a pool-sourced
dependency that is not yet allocated; the recompute path skips that
attribute instead of passing None into template rendering.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: extract pending-pool-dependency check from variable resolver

Keeps _resolve_jinja2_variables a pure variable-to-value mapping and
moves the "can this macro be rendered yet" decision into a dedicated
predicate, shared by the create and recompute paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: cover GraphQL create and mixed-variable pool macros

Adds a GraphQL create path exercising the reporter's scenario end to end,
and a macro referencing both the pool value and a plain attribute to
confirm every variable renders once the pool is allocated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: move GraphQL pool-macro test to the GraphQL mutation suite

Relocates the GraphQL create test next to the other jinja2-computed-
attribute mutation tests, and extracts the shared Snow schema builder and
number-pool provisioning into tests/helpers/number_pool so both the
core-layer and GraphQL-layer tests reuse them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: build a fresh ComputedAttribute in the number-pool helper

Assigns a new ComputedAttribute rather than mutating an optional field,
so the helper type-checks under ty.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: key changelog fragment to GitHub issue 7836

Renames the orphan changelog fragment so towncrier renders the link to
the original issue this fix closes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: defer computed attributes chained on a skipped pool macro

When a computed attribute is skipped because it reads an unallocated pool
value, any computed attribute that references it is now deferred as well,
instead of rendering against the skipped value. Macros are already
iterated in dependency order, so tracking the skipped set is enough to
cascade the skip.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: extract referenced-root-fields helper for macro dependencies

Replaces the hand-rolled `variable.split("__")[0]` root extraction, which
was repeated in both the create and recompute macro paths, with a single
named helper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: move referenced-root-fields onto InfrahubJinja2Template

The root-field extraction operates only on a template's variables, so it
belongs on the template rather than as a static method on Node. Both the
create and recompute macro paths call it through the template.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* perf(graphql): skip peer hydration for id-only single relationships (#10062)

* perf(graphql): skip peer hydration for id-only single relationships

When a cardinality-one relationship query requests only the peer node's
`id` (no properties, metadata, or additional node fields), return the
peer ID already loaded on the parent instead of hydrating a full peer
Node via NodeDataLoader. This avoids redundant database work on
relationship-heavy queries such as cable-plan reports.

The resolver falls through to the existing NodeDataLoader / query_peers
paths whenever any other field, property, or metadata is requested, so
behavior is unchanged for all other queries.

* fix(graphql): skip id-only relationship shortcut for generic peers

The id-only single-relationship shortcut returns {"id": peer_id} without
the peer kind. For a relationship whose peer is a generic, the GraphQL
node field is an interface whose resolve_type needs the kind, so it fails
with "Unable to identify the type of the instance." Restrict the shortcut
to concrete peers; generic peers fall back to full hydration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ZdYyE4JewWbMZAbvWPjQe

* perf(graphql): carry peer kind so generic id-only relationships skip hydration

The id-only single-relationship shortcut had to be disabled for generic
peers: it returned {"id": peer_id} without a kind, and a generic peer
resolves to a GraphQL interface whose resolve_type indexes the type
registry by kind. That excluded a large share of core-schema
relationships from the optimization.

The peer's concrete kind was available all along. The relationship query
already binds the peer vertex and returns peer.uuid, so returning
peer.kind alongside it costs no extra round trip. Thread that kind
through GroupedPeerNodes, PeerWithRelationshipMetadata and Relationship
so the preloaded stub on a node's GraphQL response can carry __kind__,
and let the shortcut serve generic peers from it.

The shortcut declines whenever the kind is absent and the resolver
hydrates as before, so correctness never depends on the enrichment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* test(graphql): assert generic-peer id-only relationship skips hydration

Add a component test that exercises the id-only single-relationship shortcut
against a cardinality-one relationship whose peer is a generic. It monkeypatches
NodeDataLoader.load to raise, so a regression to the correct-but-slower
hydrating path fails loudly instead of passing silently.

* test(benchmark): add id-only single-relationship benchmark

Add test_query_rel_one_id_only mirroring test_query_rel_one but selecting
only the peer id (repository { node { id } }), so the id-only
single-relationship shortcut is exercised and validated by CodSpeed CI.

* update name, reduce comment

* consolidate tests

* reduce size of huge test file

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Aaron McCarty <aaron@opsmill.com>

* docs: polish 1.8.0 and 1.9.0 release notes (voice, clarity, links) (#9586)

* docs: polish 1.9.0 release notes — voice, clarity, learn-more links

Apply a voice and clarity pass to the 1.9.0 release notes:

- Voice: drop the marketing opener, remove a forbidden word and an
  idiom, replace product-as-agent value claims, cut vendor-positioning
  phrasing.
- Clarity for an international audience: split over-packed sentences,
  expand SIEM and hfid on first use, replace residual colloquialisms.
- Educational: add a "why" to namespace restrictions; add six
  "Learn more" links from feature sections to their docs pages.
- Fixes: correct the "are can be forwarded" grammar error and resolve
  the infrahub-sdk version placeholder to 1.20.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: polish 1.8.0 release notes — voice, clarity, learn-more links

Apply the same voice and clarity pass to the 1.8.0 notes:

- Voice: drop the marketing opener and filler ("now simpler",
  "continues to evolve", "enhance the day-to-day experience"), fix a
  first-person "we can now".
- Clarity: fix the File Object terminology drift and a comma splice,
  add four "Learn more" links to the feature docs.
- Correctness: fix the duplicate "Second" migration step (-> Third),
  two grammar errors ("helps speeding up", "command need to run"),
  and a stray semicolon in the MIME-type list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: replace figurative "carry/carries" in 1.9.0 notes

"carries the event as JSON" -> "contains"; "Webhooks can now carry ...
headers" -> "send". Direct verbs per the voice rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Yvonne <yvonne@opsmill.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Damien Garros <damien@opsmill.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Alex Gittings <agitting96@gmail.com>
Co-authored-by: iddocohen <iddocohen@gmail.com>
Co-authored-by: Pete Crocker <pete@petecrocker.com>
Co-authored-by: Pol Michel <40861490+polmichel@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Aaron McCarty <aaron@opsmill.com>
Co-authored-by: Yvonne <yvonne@bluecanyon.us>
Co-authored-by: Yvonne <yvonne@opsmill.com>
Co-authored-by: Damien Garros <damien@opsmill.com>
@pa-lem
pa-lem requested a review from a team as a code owner July 31, 2026 10:46
@github-actions github-actions Bot added type/documentation Improvements or additions to documentation group/ci Issue related to the CI pipeline labels Jul 31, 2026
* refactor(core): make _normalize_value a classmethod

Allow a value to be checked for canonicality without building an attribute
instance. No override used instance state, so behavior is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(core): add the IPAddress attribute kind

Store a bare IP address, rejecting any value that carries a prefix length or
netmask, and normalize IPv6 to its compressed lowercase form.

Reuse the AttributeIPHost value vertex and its binary index by returning
AttributeDBNodeType.IPHOST, so no graph schema change, index or migration is
needed. prefixlen is written as the family maximum because a bare address is a
single host and neo4j refuses to MERGE on a null property; it is deliberately
absent from the GraphQL type and from get_allowed_property_in_path.

Values sort lexically rather than numerically, since the shared binary index is
only reachable through IPAM's own queries.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(schema): reject non-canonical values when changing an attribute kind

A kind change does not rewrite stored values, so switching an attribute to
IPHost left a bare 10.0.0.1 in the database where the canonical form is
10.0.0.1/32, making value filters and uniqueness comparisons match a stale
string. Flag any stored value that is not already canonical for the new kind.

The check needs no list of the kinds it applies to: kinds that do not normalize
inherit an identity _normalize_value, so it is a no-op for them and covers a
future normalizing kind for free. In practice it applies to IPHost, IPNetwork,
IPAddress and MacAddress.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore(generated): regenerate schema, docs and frontend types for IPAddress

Output of backend.generate, schema.generate-graphqlschema,
schema.generate-jsonschema, docs.generate and the frontend codegen.

The graphql-cache.d.ts churn is gql.tada rehashing every cached document
because the schema changed; none of it is specific to the new kind.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* feat(frontend): support the IPAddress attribute kind

Register the kind so it renders as a plain text input in object forms, shows as
a column in list views, and offers a text filter. The four switches it is added
to fall through to warnUnexpectedType and render nothing for an unknown kind, so
each case is what keeps the field from silently disappearing.

Validate the value in the form as well, since a prefixed address is a mistake
worth catching before the round trip: a value containing a slash is reported as
needing a bare address, and anything else malformed as an invalid IPv4 or IPv6
address. Leading zeros are rejected to match the backend.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: document the IPAddress attribute kind

Add the kind to the hand-written kind list and the UI-behaviour table, and note
on the IPHost entry that it stores a prefix so the two read as distinct choices.

Record in the knowledge doc that _normalize_value is a classmethod so a value
can be checked without an attribute instance, and that a kind change is only
allowed when the stored values are already canonical for the new kind.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore(sdk): bump python_sdk for the IPAddress attribute kind

Advances python_sdk to the latest infrahub-develop and adds the generated
IPAddress attribute-kind models, which unblocks the SDK node tests for a bare
address.

The pointer spans 14 upstream commits as well as the IPAddress change, mostly
the infrahubctl schema-format work, so an unrelated SDK regression bisected to
this commit most likely comes from those.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(frontend): count IPv6 groups correctly in the IPAddress validator

A trailing dotted quad carries 32 bits, so it stands for the final two groups
rather than one. Counting it as one rejected valid addresses such as
1:2:3:4:5:6:1.2.3.4. Allowing eight explicit groups alongside a "::" run also
accepted invalid ones such as ::1:2:3:4:5:6:7:8, since the run has to stand for
at least one group of zeros.

The accept and reject cases are checked against ipaddress.ip_address so the form
validation and the backend agree on the same inputs.

Also refresh the betterer results: adding IPAddress to ATTRIBUTE_KIND changed the
content hashes of the two switch files and the text of several recorded errors
that embed the AttributeKind union, which the CI-mode check treats as a change
even though the error count is unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* add "netmask" to spelling exceptions

* bump python sdk to latest infrahub-develop after SDK PR merged

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
IFC-2950 (#10102)

Add three known limitations of the merge follow-up regeneration to the
performance-scenarios spec, each carrying its tracking ticket and the
release-1.11 code reference:

- relationship-reached data widens selection to the whole target group
  (IFC-2946)
- no size ceiling on the serialized merge diff summary versus the cache
  backend per-value limit (IFC-2943)
- each selective-regen merge and rebase leaks an orphaned persisted diff
  root (IFC-2941)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the type/spec A specification for an upcoming change to the project label Jul 31, 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) group/ci Issue related to the CI pipeline group/frontend Issue related to the frontend (React) type/documentation Improvements or additions to documentation type/spec A specification for an upcoming change to the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants