Skip to content

Merge develop into infrahub-develop#1179

Merged
infrahub-github-bot-app[bot] merged 2 commits into
infrahub-developfrom
develop
Jul 14, 2026
Merged

Merge develop into infrahub-develop#1179
infrahub-github-bot-app[bot] merged 2 commits into
infrahub-developfrom
develop

Conversation

@infrahub-github-bot-app

@infrahub-github-bot-app infrahub-github-bot-app Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Merging develop into infrahub-develop after merging pull request #1177.


Summary by cubic

Add dependency-aware downloads to infrahubctl marketplace get and a -y/--yes overwrite option. This resolves and fetches transitive schema dependencies via the Marketplace API and organizes them consistently on disk or stdout.

  • New Features
    • --dependencies: resolves transitive deps via /dependencies for schemas and collections (respects -v for pinned versions).
    • Grouping: requested/prerequisite collections → <collection>/; standalone deps → output root; schema deps grouped by owning collection.
    • Failure handling: collection members fail if missing; standalone deps soft-fail; unresolved kinds and visibility-hidden counts are reported.
    • -y/--yes: overwrite existing files; otherwise keep and avoid duplicates (prompt only on TTY).
    • Safety/UX: path traversal checks, namespace-based disambiguation for same-name schemas, and YAML --- separators for multi-doc stdout; docs and tests updated.

Written for commit e27f5f0. Summary will update on new commits.

Review in cubic

minitriga and others added 2 commits July 13, 2026 11:13
)

## feat(ctl): add marketplace --dependencies flag with server-side resolution

Add `--dependencies` flag to `marketplace get` for collections and schemas, recursively downloading transitive dependencies resolved server-side via new `/dependencies` endpoints.

### Key features
- **Collections:** prerequisite collections grouped into subdirectories, members and standalone schemas in output root
- **Schemas:** dependencies grouped by owning collection (or root if standalone)
- **Soft-fail** for unresolved/missing schema dependencies; strict for collection members
- **Deduplication, cycle safety,** and reconciliation with existing schemas (keep by default, overwrite with `-y`)
- **Path validation** (`_safe_segment`) to prevent directory traversal attacks
- **Versioned** schema downloads resolve the pinned version's dependencies

### Technical changes
- Replaced client-side dependency walk with single server-side `/dependencies` endpoint call
- Report visibility-hidden dependencies in summary

**Refs:** IHS-246, #1117
Merge stable into develop
@infrahub-github-bot-app
infrahub-github-bot-app Bot requested a review from a team as a code owner July 14, 2026 07:32
@github-actions github-actions Bot added the type/documentation Improvements or additions to documentation label Jul 14, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: e27f5f0
Status: ✅  Deploy successful!
Preview URL: https://c31ab5e1.infrahub-sdk-python.pages.dev
Branch Preview URL: https://develop.infrahub-sdk-python.pages.dev

View logs

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.41104% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
infrahub_sdk/ctl/marketplace.py 91.41% 7 Missing and 7 partials ⚠️
@@                 Coverage Diff                  @@
##           infrahub-develop    #1179      +/-   ##
====================================================
+ Coverage             83.04%   83.12%   +0.08%     
====================================================
  Files                   139      139              
  Lines                 12703    12847     +144     
  Branches               1906     1934      +28     
====================================================
+ Hits                  10549    10679     +130     
- Misses                 1586     1593       +7     
- Partials                568      575       +7     
Flag Coverage Δ
integration-tests 41.63% <14.11%> (-0.31%) ⬇️
python-3.10 57.02% <91.41%> (+0.39%) ⬆️
python-3.11 57.02% <91.41%> (+0.37%) ⬆️
python-3.12 57.04% <91.41%> (+0.39%) ⬆️
python-3.13 57.04% <91.41%> (+0.39%) ⬆️
python-3.14 57.03% <91.41%> (+0.39%) ⬆️
python-filler-3.12 22.46% <0.00%> (-0.26%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
infrahub_sdk/ctl/marketplace.py 93.01% <91.41%> (-0.65%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@infrahub-github-bot-app
infrahub-github-bot-app Bot merged commit b3f3912 into infrahub-develop Jul 14, 2026
36 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.

1 participant