Conversation
--------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Guillaume Mazoyer <guillaume@opsmill.com>
Deploying infrahub-sdk-python with
|
| Latest commit: |
c300a41
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://710fb6d3.infrahub-sdk-python.pages.dev |
) 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>
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
|
|
||
| # Either no server state, or checksum mismatched — stage + save. | ||
| if isinstance(source, Path): | ||
| self.upload_from_path(path=source) |
There was a problem hiding this comment.
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 |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merging stable into develop after merging pull request #963.