Manual merge develop into infrahub-develop#1053
Merged
polmichel merged 16 commits intoJun 2, 2026
Merged
Conversation
) Bumps [infrahub-testcontainers](https://github.com/opsmill/infrahub) from 1.9.3 to 1.9.5. - [Release notes](https://github.com/opsmill/infrahub/releases) - [Changelog](https://github.com/opsmill/infrahub/blob/stable/CHANGELOG.md) - [Commits](opsmill/infrahub@infrahub-v1.9.3...infrahub-v1.9.5) --- updated-dependencies: - dependency-name: infrahub-testcontainers dependency-version: 1.9.5 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>
* fix(branch): add MERGING to BranchStatus enum to match server (#9293) The server-side BranchStatus enum gained MERGING in Infrahub 1.9.3 (PR opsmill/infrahub#9116) but the SDK enum was not updated. Any branch returned with status="MERGING" — including a branch stranded in that state by a task worker dying mid-merge — caused client.branch.all() to raise ValidationError, which crashloops the task worker on every sync_remote_repositories run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(tests): use model_validate so ty accepts the parametrized status string ty rejects passing str where BranchStatus is annotated; switch to BranchData.model_validate({...}) which mirrors how the SDK actually parses server JSON in branch.py. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * review(branch): address PR feedback — drop test, rename changelog, shorten note - Drop test_branch_data_accepts_all_server_statuses: per review, the enum-coverage test belongs in the infrahub community repo where it can iterate over the actual server-side BranchStatus enum instead of a hardcoded list of strings. It will be added there as part of the PR that bumps the SDK commit pin. - Rename changelog +branchstatus-merging.fixed.md → 1037.fixed.md to link it to the newly-filed SDK-side issue #1037 (migrated from opsmill/infrahub#9293). - Shorten changelog note per review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(changelog): shorten 1037.fixed.md per review Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Phillip Simonds <phillip@opsmill.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Prepare for version 1.20.1 * fix version
* IHS-136: Update click version * update docs
Merge stable into develop
) Bumps [infrahub-testcontainers](https://github.com/opsmill/infrahub) from 1.9.5 to 1.9.6. - [Release notes](https://github.com/opsmill/infrahub/releases) - [Changelog](https://github.com/opsmill/infrahub/blob/stable/CHANGELOG.md) - [Commits](opsmill/infrahub@infrahub-v1.9.5...infrahub-v1.9.6) --- updated-dependencies: - dependency-name: infrahub-testcontainers dependency-version: 1.9.6 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>
Bumps [idna](https://github.com/kjd/idna) from 3.11 to 3.15. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md) - [Commits](kjd/idna@v3.11...v3.15) --- updated-dependencies: - dependency-name: idna dependency-version: '3.15' dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* IHS-75: Fix cardinality many error message * update news fragment
#952) * Marketplace * Auto-detect marketplace items; drop --load from download - Probe schema and collection endpoints in parallel so `infrahubctl marketplace download <ns>/<name>` no longer requires the user to pass `--collection` up front. Collision between the two resolves to schema with a warning (pass `--collection` to force the other path). `_detect_item_type` returns the winning 200 response so the download helper reuses it instead of re-fetching. - Remove the `--load` convenience flag; `download` is write-only. Users who want to push into Infrahub chain with `infrahubctl schema load`. - Introduce a four-class error taxonomy (invalid-input, not-found, network) with exit codes 1 vs 2, distinguishing "version not found" from "schema not found" when `--version` is passed. - Surface filesystem failures (unwritable `--output-dir`) cleanly rather than as a traceback. - Regenerate `infrahubctl-marketplace.mdx`; no longer advertises `--load`. - Add spec, plan, research, contract, quickstart, tasks, and checklist artifacts under `specs/001-marketplace-api-update/`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Fix vale style errors in marketplace CLI help text Spell out 'semver' and replace 'config/env' with the full words so vale's spelling and word-swap rules pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Pad research.md table separator rows CI runs markdownlint v0.40.0 which flags MD060 (table-column-style) when the separator row uses compact pipes while the data rows are padded. Match the repo's existing style (docs/python-sdk/introduction.mdx) by padding the separator rows too. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Rename marketplace command to `get` and add `--stdout` - Rename `infrahubctl marketplace download` to `infrahubctl marketplace get` to match the convention used by similar tools (kubectl, gh, etc.) and stay consistent with future `marketplace list` / `marketplace search` commands. - Add `--stdout/-s` flag that streams content to stdout (status, warnings, and errors routed to stderr) so output can be piped into commands like `infrahubctl schema check` once stdin support lands. Skips disk writes entirely. For collections, schemas are concatenated as multi-doc YAML, only injecting `---` separators when missing. - Route `_fail` errors through stderr unconditionally so failures don't pollute stdout when piping. - Regenerate `infrahubctl-marketplace.mdx` and add `stdout`/`stderr` to the vale spelling exceptions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Address cubic review: classify partial probe failures and download errors as network - `_detect_item_type`: a transport failure on either probe (when no 200 winner exists) now raises `network`, not `not-found`. Mixing a 404 on one endpoint with a 5xx or transport failure on the other previously fell through to `not-found`, which masked real connectivity problems. Identified by cubic. - `get`: wrap the post-detect download calls so `httpx.HTTPError` (transport failures and 5xx via `raise_for_status`) raises `_fail("network", ...)` (exit 2) instead of being swallowed by the default `@catch_exception` exit 1. Identified by cubic. - Update quickstart success example to match the actual `Downloaded schema …` output. - Add three tests: partial probe failure -> network, versioned download network error, and `--collection` flag network error. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Add changelog fragment for marketplace command Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Address ogenstad review: enum error class, type narrowing, SDK proxy config, marketplace_url - Replace ErrorClass Literal + _ERROR_EXIT_CODES dict with _ErrorClass(Enum) so the exit code mapping is co-located with the error definition - Remove type: ignore[return-value] by using inline isinstance guards so the type checker narrows httpx.Response naturally in each branch - Build httpx.AsyncClient via _make_http_client() using the SDK's proxy and TLS config (ConfigBase.proxy, proxy_mounts, tls_context) and follow_redirects=True - Move marketplace_url from infrahubctl Settings to SDK ConfigBase (INFRAHUB_MARKETPLACE_URL); regenerate config.mdx Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Address code review: NoReturn _fail, _status_console rename, SETTINGS config, helper extraction Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Address minor review issues: module-level helper, consistent error messages, collection=False test, spec renames - Move is_transport_failure to module level as _is_transport_failure - Replace f"Error: {detail}" 404 messages with consistent "No schema/collection named..." format - Remove now-unused contextlib.suppress import - Add test_collection_false_downloads_schema covering the defensive bool|None path - Update spec.md, plan.md, tasks.md: rename command references from download to get Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * fix `infrahubctl marketplace get --collection` * Address ogenstad review comments on marketplace command - Add MarketplaceIdentifier dataclass; _parse_identifier now returns it instead of a bare tuple, removing positional ordering assumptions - collection: bool | None = None → bool = False with is_flag=True; the if/elif/else block becomes if collection: ... else: auto-detect - Reverse prefetched condition to lead with truthy (if prefetched:) - if version is not None → if version - Add MarketplaceItemType annotation on the collection branch - Use keyword arguments throughout _download_schema / _download_collection calls Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Fix CI: use NamedTuple for MarketplaceIdentifier, format long _fail line @DataClass + from __future__ import annotations triggers a Python 3.12 bug in dataclasses._is_type during docs generation. NamedTuple avoids this entirely while providing the same immutable named-field semantics. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Fix ty false positive on CliRunner(mix_stderr=False) typer 0.25.1 (used in CI via the stable lockfile) removed explicit mix_stderr from CliRunner.__init__, causing ty to flag the call as unknown-argument even though it still works at runtime via **kwargs. Silence with type: ignore[call-arg]. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Show exception type when httpx error has empty message ReadTimeout and similar httpx exceptions can have an empty str() representation, producing "Marketplace request failed: " with nothing after the colon. Fall back to the exception class name so the output is always informative (e.g. "Marketplace request failed: ReadTimeout"). Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Remove mix_stderr=False from CliRunner, update stdout tests Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Use result.output instead of result.stdout in marketplace tests In typer 0.25.1 result.stdout only captures stdout; error messages written to err_console (stderr) only appear in result.output. Switching all assertions to result.output works across both typer versions. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Wim Van Deun <7521270+wvandeun@users.noreply.github.com>
Merge stable into develop
Prepare for version 1.21.0 of the SDK
Bumps [dulwich](https://github.com/dulwich/dulwich) from 0.24.7 to 1.2.5. - [Release notes](https://github.com/dulwich/dulwich/releases) - [Changelog](https://github.com/jelmer/dulwich/blob/main/NEWS) - [Commits](jelmer/dulwich@dulwich-0.24.7...dulwich-1.2.5) --- updated-dependencies: - dependency-name: dulwich dependency-version: 1.2.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Merge stable into develop
…hub-dev-merge-develop # Conflicts: # pyproject.toml # uv.lock
Deploying infrahub-sdk-python with
|
| Latest commit: |
5d96736
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://945bf0e5.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://pmi-20260602-infrahub-dev-me.infrahub-sdk-python.pages.dev |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## infrahub-develop #1053 +/- ##
====================================================
- Coverage 81.87% 81.71% -0.17%
====================================================
Files 134 135 +1
Lines 11676 11638 -38
Branches 1735 1759 +24
====================================================
- Hits 9560 9510 -50
- Misses 1569 1576 +7
- Partials 547 552 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
1 issue found
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/infrahubctl/infrahubctl-marketplace.mdx">
<violation number="1" location="docs/docs/infrahubctl/infrahubctl-marketplace.mdx:3">
P3: Marketplace docs say schemas only, but this command also supports collections.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| @@ -0,0 +1,46 @@ | |||
| # `infrahubctl marketplace` | |||
|
|
|||
| Browse and download schemas from the Infrahub Marketplace. | |||
There was a problem hiding this comment.
P3: Marketplace docs say schemas only, but this command also supports collections.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/docs/infrahubctl/infrahubctl-marketplace.mdx, line 3:
<comment>Marketplace docs say schemas only, but this command also supports collections.</comment>
<file context>
@@ -0,0 +1,46 @@
+# `infrahubctl marketplace`
+
+Browse and download schemas from the Infrahub Marketplace.
+
+**Usage**:
</file context>
Suggested change
| Browse and download schemas from the Infrahub Marketplace. | |
| Browse and download schemas and collections from the Infrahub Marketplace. |
ogenstad
approved these changes
Jun 2, 2026
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.
Merges
developintoinfrahub-developto bring the latest changes (incl. v1.21.0 prep) into the Infrahub-tracked line. Alternative to #1043 with conflicts resolved.Conflicts resolved
Both files conflicted on the same dependency-version divergence. Kept
infrahub-develop's higher versions to avoid downgrading:pyproject.toml(ctl+allextras): keptariadne-codegen==0.18.0(over develop's0.15.3) andclick>=8.3,<9(over develop's>=8.2,<9).uv.lock: regenerated viauv lockagainst the resolvedpyproject.toml—click 8.3.3,ariadne-codegen 0.18.0, version bumped1.20.0 → 1.21.0.uv lock --checkpasses.Summary by cubic
Brings SDK v1.21.0 into
infrahub-developand adds theinfrahubctl marketplace getcommand (auto-detects schema vs collection, supports--version,--collection, and--stdout). Kept higher dependency versions during conflict resolution and regenerateduv.lock; also setsbranch.create(sync_with_git=False), addsMERGINGstatus, and improves cardinality-many error text.New Features
infrahubctl marketplace get: fetch schemas or collections via REST; auto-detects type; supports--version,--collection,--stdout; configurable base URL viamarketplace_url/INFRAHUB_MARKETPLACE_URL; docs and tests added.Dependencies
ariadne-codegen==0.18.0andclick>=8.3,<9; regenerateduv.lock(click 8.3.3,ariadne-codegen 0.18.0); bumped project version to1.21.0.Written for commit 5d96736. Summary will update on new commits.