Skip to content

Merge stable into develop#1060

Open
infrahub-github-bot-app[bot] wants to merge 5 commits into
developfrom
stable
Open

Merge stable into develop#1060
infrahub-github-bot-app[bot] wants to merge 5 commits into
developfrom
stable

Conversation

@infrahub-github-bot-app
Copy link
Copy Markdown
Contributor

@infrahub-github-bot-app infrahub-github-bot-app Bot commented Jun 5, 2026

Merging stable into develop after merging pull request #1057.


Summary by cubic

Switches infrahubctl marketplace get --collection from ZIP downloads to per-schema downloads via the collection metadata endpoint. Schemas now save under <output_dir>/<collection>/<schema>.yml, and stdout outputs a valid multi-document YAML stream.

  • New Features

    • Resolve collections via metadata and fetch each member using the single-schema path.
    • Save files to <output_dir>/<collection>/<schema>.yml; if names clash across namespaces, use <collection>/<namespace>/<schema>.yml. Filenames drop versions and overwrite cleanly.
    • Stdout adds --- between schemas when needed; the summary counts only successful downloads and warns on malformed or missing members.
  • Bug Fixes

    • infrahubctl no longer prints a spurious Error: 1 or traceback when exiting with typer.Exit; it now exits cleanly with only the intended error output.

Written for commit 3c6b5c0. Summary will update on new commits.

Review in cubic

minitriga and others added 4 commits June 3, 2026 16:10
…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
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jun 5, 2026

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3c6b5c0
Status: ✅  Deploy successful!
Preview URL: https://41e50af8.infrahub-sdk-python.pages.dev

View logs

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
infrahub_sdk/ctl/marketplace.py 95.65% 1 Missing ⚠️
@@             Coverage Diff             @@
##           develop    #1060      +/-   ##
===========================================
- Coverage    81.71%   81.67%   -0.04%     
===========================================
  Files          135      135              
  Lines        11625    12185     +560     
  Branches      1759     1919     +160     
===========================================
+ Hits          9499     9952     +453     
- Misses        1575     1646      +71     
- Partials       551      587      +36     
Flag Coverage Δ
integration-tests 41.88% <0.00%> (+0.31%) ⬆️
python-3.10 55.28% <95.65%> (+0.19%) ⬆️
python-3.11 55.28% <95.65%> (+0.19%) ⬆️
python-3.12 55.28% <95.65%> (+0.17%) ⬆️
python-3.13 55.28% <95.65%> (+0.17%) ⬆️
python-3.14 55.27% <95.65%> (+0.17%) ⬆️
python-filler-3.12 22.35% <0.00%> (-0.03%) ⬇️

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 92.25% <95.65%> (+1.34%) ⬆️

... and 3 files with indirect coverage changes

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants