Merge develop into infrahub-develop#1069
Merged
Merged
Conversation
…ubdirectory `marketplace get --collection` previously fetched a ZIP and dumped every schema flat into the output directory with the version baked into each filename (e.g. `infrahub-dcim-1.0.0.yml`). Re-downloading accumulated stale versions side by side, and the naming was inconsistent with single-schema downloads (`dcim.yml`). Collections are now resolved via the collection metadata endpoint, which lists each member schema and its latest published version. Each member is downloaded individually through the existing `_download_schema` path, so naming, versioning, and error handling match single-schema downloads. Members land in `<output_dir>/<collection name>/<schema name>.yml`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e collisions Address review findings on the per-schema collection download: - The summary now counts schemas actually downloaded instead of every member entry, so skipped members (missing namespace/name) no longer inflate the count; skipped members also emit a warning instead of disappearing silently. - Members sharing a schema name across namespaces are disambiguated into <collection>/<namespace>/<name>.yml instead of silently overwriting each other. - The stdout `---` separator is tied to emitted documents rather than the raw member index. - Collection metadata items with unexpected shapes are filtered out instead of raising AttributeError. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(ctl): download marketplace collections per-schema into a named subdirectory
Merge stable into develop
Deploying infrahub-sdk-python with
|
| Latest commit: |
b47bb9c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9eeca4ab.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://develop.infrahub-sdk-python.pages.dev |
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## infrahub-develop #1069 +/- ##
====================================================
+ Coverage 82.02% 82.26% +0.23%
====================================================
Files 135 135
Lines 11841 11956 +115
Branches 1762 1785 +23
====================================================
+ Hits 9713 9836 +123
+ Misses 1576 1573 -3
+ Partials 552 547 -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:
|
…1065) * IHS-183: Fix typing errors for protocols * fix ty * fix failing tests * address comments * use CoreNodeBase in get_schema_name * remove breakpoint * add test for store get_schema_name * update test * Make RelatedNode/RelationshipManager generic over peer type (#1063) Parameterise RelatedNode, RelatedNodeSync, RelationshipManager and RelationshipManagerSync over the peer type (defaulting to InfrahubNode/ InfrahubNodeSync for backward compatibility) and have infrahubctl protocols emit the peer type for each relationship. Relationship traversal via .peer/ .peers/indexing now preserves the peer type instead of collapsing to the dynamic InfrahubNode. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: regenerate SDK docs for generic RelatedNode peer types The develop merge combined upstream peer/get docstrings with our generic PeerT/PeerTSync return types, leaving the committed related_node.mdx stale. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Sola Infrahub User <sola@opsmill.com> Co-authored-by: Aaron McCarty <aaron@opsmill.com> Co-authored-by: Sola Babatunde <solababatunde12@gmail.com> Co-authored-by: Mikhail Yohman <mikhail@opsmill.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 develop into infrahub-develop after merging pull request #1060.
Summary by cubic
Switches
infrahubctl marketplace get --collectionto per-schema downloads with a clean directory layout and safer stdout. Addsinfrahubctl graphql query-report, and makes relationship helpers generic so.peer/.peerskeep the correct node type in the SDK and generated protocols.New Features
--collectionnow reads collection metadata and downloads each member via the schema endpoint; saves to<output_dir>/<collection>/<schema>.ymland disambiguates duplicate names with<namespace>/; counts only downloaded schemas and warns on invalid members.---between documents if missing.graphql query-reportreports if a query targets unique nodes; supports--onlineand--branch.RelatedNode,RelatedNodeSync,RelationshipManager, andRelationshipManagerSyncare generic over their peer type, andinfrahubctl protocolsemits parameterized relationships (e.g.,device: RelatedNode[NetworkDevice]); traversal preserves peer types and remains backward compatible.Bug Fixes
infrahubctlno longer prints an extra "Error: 1" or a traceback when a command exits withtyper.Exit.CoreNodeBasesubclasses and duck typing to resolve schema names and resource pool nodes reliably.Written for commit b47bb9c. Summary will update on new commits.