Skip to content

feature: add --dependencies flag to infrahubctl marketplace get for automatic collection dependency resolution #1117

Description

@minitriga

Component

  • infrahubctl CLI

Describe the Feature Request

Add a --dependencies flag to infrahubctl marketplace get so that downloading a collection also pulls in the schemas that collection depends on, not just its own member schemas.

Describe the Use Case

When a user downloads a marketplace collection today, they get only the collection's member schemas. Those members often reference schemas defined in other collections or standalone marketplace schemas, so the downloaded bundle won't load cleanly into Infrahub without the user manually hunting down and fetching each missing dependency.

The infrahub-marketplace backend now derives a collection's dependencies automatically and exposes them (opsmill/infrahub-marketplace#71). The marketplace UI already shows users the command infrahubctl marketplace get <ns>/<name> --collection --dependencies and an "Include required schemas" toggle — but the SDK doesn't implement the flag yet, so anyone who copies that command from the UI hits an error. This closes that gap and lets users get a directly-loadable bundle in one command.

Additional Information

  • Backend support: opsmill/infrahub-marketplace#71 — the collection detail endpoint returns a dependencies field (dependency schemas + prerequisite collections), and the collection download endpoint accepts ?dependencies=true to bundle transitive, public dependency schemas (cycle-safe, visibility-aware).
  • Relevant SDK file: infrahub_sdk/ctl/marketplace.py.
  • The UI surfaces this flag ahead of SDK support, so until this ships the copied command errors for users.

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions