Skip to content

Merge stable into develop#1010

Merged
ogenstad merged 5 commits into
developfrom
stable
May 12, 2026
Merged

Merge stable into develop#1010
ogenstad merged 5 commits into
developfrom
stable

Conversation

@infrahub-github-bot-app

Copy link
Copy Markdown
Contributor

Merging stable into develop after merging pull request #963.

ogenstad and others added 2 commits May 10, 2026 19:27
---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Guillaume Mazoyer <guillaume@opsmill.com>
@infrahub-github-bot-app infrahub-github-bot-app Bot requested a review from a team as a code owner May 11, 2026 08:17
@github-actions github-actions Bot added the type/documentation Improvements or additions to documentation label May 11, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 11, 2026

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: c300a41
Status: ✅  Deploy successful!
Preview URL: https://710fb6d3.infrahub-sdk-python.pages.dev

View logs

)

Bumps [infrahub-testcontainers](https://github.com/opsmill/infrahub) from 1.9.2 to 1.9.3.
- [Release notes](https://github.com/opsmill/infrahub/releases)
- [Changelog](https://github.com/opsmill/infrahub/blob/stable/CHANGELOG.md)
- [Commits](opsmill/infrahub@infrahub-v1.9.2...infrahub-v1.9.3)

---
updated-dependencies:
- dependency-name: infrahub-testcontainers
  dependency-version: 1.9.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 9 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx">

<violation number="1" location="docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx:171">
P2: Fix the malformed `UploadResult` cross-reference (`class:`) to `:class:` so the return type renders correctly in generated docs.</violation>
</file>

<file name="infrahub_sdk/node/node.py">

<violation number="1" location="infrahub_sdk/node/node.py:938">
P2: `upload_if_changed` ignores an explicit `name` when `source` is a `Path`, so uploads use `source.name` instead of the caller-provided filename.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


**Returns:**

- class:`UploadResult` with ``was_uploaded=False`` (skipped) or

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Fix the malformed UploadResult cross-reference (class:) to :class: so the return type renders correctly in generated docs.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/node.mdx, line 171:

<comment>Fix the malformed `UploadResult` cross-reference (`class:`) to `:class:` so the return type renders correctly in generated docs.</comment>

<file context>
@@ -73,8 +97,88 @@ The node must have been saved (have an id) before calling this method.
+
+**Returns:**
+
+- class:`UploadResult` with ``was_uploaded=False`` (skipped) or
+- ``was_uploaded=True`` (transfer occurred), and the resulting server
+- checksum (``None`` only when no server checksum was available
</file context>
Suggested change
- class:`UploadResult` with ``was_uploaded=False`` (skipped) or
- :class:`UploadResult` with ``was_uploaded=False`` (skipped) or

Comment thread infrahub_sdk/node/node.py

# Either no server state, or checksum mismatched — stage + save.
if isinstance(source, Path):
self.upload_from_path(path=source)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: upload_if_changed ignores an explicit name when source is a Path, so uploads use source.name instead of the caller-provided filename.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At infrahub_sdk/node/node.py, line 938:

<comment>`upload_if_changed` ignores an explicit `name` when `source` is a `Path`, so uploads use `source.name` instead of the caller-provided filename.</comment>

<file context>
@@ -770,14 +818,131 @@ async def download_file(self, dest: Path | None = None) -> bytes | int:
+
+        # Either no server state, or checksum mismatched — stage + save.
+        if isinstance(source, Path):
+            self.upload_from_path(path=source)
+        else:
+            self.upload_from_bytes(content=source, name=resolved_name)
</file context>
Suggested change
self.upload_from_path(path=source)
self.upload_from_path(path=source)
self._file_name = resolved_name

dependabot Bot and others added 2 commits May 11, 2026 11:51
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.3 to 2.7.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@2.6.3...2.7.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.7.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add raises section to existing docstrings
@ogenstad ogenstad merged commit 1733bc0 into develop May 12, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants