Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b00d8ce
chore(deps): bump follow-redirects from 1.15.11 to 1.16.0 in /docs
dependabot[bot] Apr 14, 2026
87351fe
chore(deps): bump fast-uri from 3.1.0 to 3.1.2 in /docs
dependabot[bot] May 9, 2026
b4013f0
chore(deps): bump @babel/plugin-transform-modules-systemjs in /docs
dependabot[bot] May 9, 2026
11b6841
chore(deps): bump actions/labeler from 6.0.1 to 6.1.0
dependabot[bot] May 11, 2026
05d636b
fix(repository): detect existing repo when .git is a worktree gitlink
petercrocker May 16, 2026
9c338be
chore(deps): bump starlette from 0.49.3 to 1.0.1
dependabot[bot] Jun 4, 2026
6f8fb27
chore(deps): bump pyarrow from 22.0.0 to 23.0.1
dependabot[bot] Jun 5, 2026
62205a4
Merge pull request #1066 from opsmill/dependabot/uv/pyarrow-23.0.1
ogenstad Jun 9, 2026
2895c9d
Merge pull request #1072 from opsmill/stable
ogenstad Jun 10, 2026
74505cd
Merge pull request #1059 from opsmill/dependabot/uv/starlette-1.0.1
ogenstad Jun 10, 2026
f07528b
Merge pull request #1075 from opsmill/stable
ogenstad Jun 10, 2026
59af0f5
Merge pull request #1029 from opsmill/fix-worktree-git-file
petercrocker Jun 11, 2026
05ac997
IHS-119: Fix upsert not working for numberpool and attribute in hfid …
solababs Jun 11, 2026
73a5d35
fix(node): preserve unfetched optional one-cardinality relationships …
iddocohen Jun 15, 2026
2cd7f50
chore(deps-dev): bump infrahub-testcontainers from 1.9.7 to 1.9.8 (#1…
dependabot[bot] Jun 15, 2026
d15468d
chore(changelog): rename fragment to issue number for towncrier autol…
iddocohen Jun 16, 2026
b9bcd31
Merge pull request #1079 from opsmill/ic-from-graphql-preserves-unfet…
iddocohen Jun 16, 2026
f8bf7ca
Merge remote-tracking branch 'origin/stable' into merge-stable-into-d…
polmichel Jun 16, 2026
f7c5109
Resolve attribute.py merge: port is_unresolved_pool_attribute to hasattr
polmichel Jun 16, 2026
9fc055b
chore(deps-dev): bump vite from 8.0.11 to 8.0.16 in /docs
dependabot[bot] Jun 16, 2026
9d42f09
Merge pull request #1082 from opsmill/merge-stable-into-develop-20260616
polmichel Jun 16, 2026
b889a0b
chore(deps): bump ws in /docs
dependabot[bot] Jun 18, 2026
9977473
chore(deps): bump webpack-dev-server from 5.2.3 to 5.2.5 in /docs
dependabot[bot] Jun 18, 2026
b656196
chore(deps): bump launch-editor from 2.13.2 to 2.14.1 in /docs
dependabot[bot] Jun 18, 2026
7e2517a
Merge pull request #1087 from opsmill/dependabot/npm_and_yarn/docs/mu…
dgarros Jun 21, 2026
dc79f35
Merge pull request #1011 from opsmill/dependabot/github_actions/stabl…
dgarros Jun 21, 2026
8143571
Merge pull request #1005 from opsmill/dependabot/npm_and_yarn/docs/ba…
dgarros Jun 21, 2026
e6a3375
Merge pull request #1003 from opsmill/dependabot/npm_and_yarn/docs/fa…
dgarros Jun 21, 2026
27a0b25
Merge pull request #1083 from opsmill/dependabot/npm_and_yarn/docs/vi…
dgarros Jun 21, 2026
e1ada1e
Merge pull request #1088 from opsmill/dependabot/npm_and_yarn/docs/we…
dgarros Jun 21, 2026
f65ecf2
Merge pull request #1089 from opsmill/dependabot/npm_and_yarn/docs/la…
dgarros Jun 21, 2026
cd528eb
Merge pull request #945 from opsmill/dependabot/npm_and_yarn/docs/fol…
dgarros Jun 21, 2026
39fd612
Merge pull request #1093 from opsmill/stable
dgarros Jun 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v6.0.1
- uses: actions/labeler@v6.1.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
1 change: 1 addition & 0 deletions changelog/1080.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Calling `.save(allow_upsert=True)` on a node hydrated by `from_graphql` no longer silently clears optional one-cardinality relationships that the GraphQL response didn't fetch. Explicitly assigning `node.rel = None` still clears the relationship.
1 change: 1 addition & 0 deletions changelog/339.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Calling `.save(allow_upsert=True)` on a node whose human-friendly identifier contains a CoreNumberPool-sourced attribute now raises a clear `ValidationError` instead of crashing with an opaque backend error.
55 changes: 55 additions & 0 deletions docs/docs/python-sdk/guides/resource-manager.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -309,3 +309,58 @@ query {
```

Notice that we have one IP address allocated by the Resource manager in the test branch. The query in the main branch shows us this allocation, indicating that it has been allocated and the resource cannot be allocated again. However, the IP address does not exist itself within the main branch.

## CoreNumberPool and attribute allocation

`CoreNumberPool` allocates integer values (such as VLAN IDs or AS numbers) directly to node attributes. The pool assigns the integer value at the moment the node is created on the server.

```python
vlan = await client.create(
kind="InfraVLAN",
name="VLAN-100",
vlan_id={"from_pool": {"id": pool_id}},
)
await vlan.save()
```

### Limitation: `allow_upsert=True` with a pool-sourced HFID attribute

`CoreNumberPool` assigns the integer value at server creation time. The SDK does not know the assigned value before the node exists. When a node's human-friendly identifier (HFID) includes a pool-sourced attribute, the SDK cannot construct the HFID needed to look up an existing node for upsert.

:::warning

Calling `save(allow_upsert=True)` on a node whose HFID contains a `CoreNumberPool`-sourced attribute raises `ValidationError` before any network call is made.

```python
# Schema has human_friendly_id: ["vlan_id__value"]
vlan = await client.create(
kind="InfraVLAN",
name="VLAN-100",
vlan_id={"from_pool": {"id": pool_id}},
)

# This raises ValidationError — the pool-assigned vlan_id is unknown client-side
await vlan.save(allow_upsert=True)
```

**Alternatives:**

- **Two-step pattern** — create the node first, then update it in a separate call:

```python
await vlan.save() # creates node, pool assigns vlan_id
# later, if you need to update:
vlan.name.value = "VLAN-100-updated"
await vlan.save() # now _existing=True, calls update
```

- **Explicit id** — if you already know the node's UUID, set `node.id` before saving. The upsert will use the UUID directly and skip HFID lookup:

```python
vlan.id = "known-uuid"
await vlan.save(allow_upsert=True) # guard bypassed
```

- **Deterministic identifier** — if possible, design your schema so the HFID uses a non-pool attribute (for example, a human-assigned `name`) and keep `vlan_id` out of the HFID.

:::
16 changes: 16 additions & 0 deletions docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/attribute.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,19 @@ Check whether this attribute's value is sourced from a resource pool.
**Returns:**

- True if the attribute value is a resource pool node or was explicitly allocated from a pool.

#### `is_unresolved_pool_attribute`

```python
is_unresolved_pool_attribute(self) -> bool
```

Return True when pool-backed but no concrete scalar value is available yet.

A pool-backed attribute is unresolved when:

- its value is a pool node object (the pool reference itself, not an allocated scalar), or
- its value is None and the from_pool allocation dict is set.

An attribute whose _from_pool dict is set but whose value has already been populated
with the allocated scalar (e.g. after a prior save) is considered resolved.
Loading
Loading