← Back to issue list

Inject instanced host snaps to the provider

View original Github issue

Metadata

Project
craft-providers
Number
#622
Type
issue
State
closed
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Resolved downstream: craft-application added instanced-snap support in PR #467 (77a3582b), removing the need for a craft-providers API change.

Resolution: closed superseded

Reason: Closed on March 25, 2025 after the capability was implemented in downstream applications rather than craft-providers. Maintainer lengau explicitly noted that the apps could perform the injection without this provider change.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done Add a way to support a snap instance key from the host when injecting it into the client, without instancing the snap inside the client or requiring that snapd in there even have parallel installs enabled. Essentially, this needs an optional `instance_key` in https://github.com/canonical/craft-providers/blob/5547eedd0aed552d2c91d4808d3a236d63f72e38/craft_providers/actions/snap_installer.py#L317 and then passthroughs in related places. ### Why it needs to get done Snapd has parallel installs as an experimental option. We need to be able to get an instanced version of a host snap and install it without being instanced. See also: https://github.com/canonical/craft-application/issues/411

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Resolved downstream: craft-application added instanced-snap support in PR #467 (77a3582b), removing the need for a craft-providers API change.
qwen/qwen3.6-35b-a3b — closed resolved Marked as done by lengau (2025-03-25) because downstream apps can now inject instanced host snaps without requiring changes to craft-providers.

Update history

Date Change
created

Related work

Related issues

Issue Project State Summary Similarity
#4084 providers: inject current snapcraft snap into instances snapcraft merged Merged PR #4084 as commit b852f9ac8, injecting the current Snapcraft snap into provider instances so parallel-installed instances can build core22 snaps.
74%
#1779137 build provider support to inject snaps on the host snapcraft (launchpad) closed Build providers gained host-snap injection when Snapcraft runs from a snap; fixed by merged snapcore/snapcraft#2174 (commit 283ab0bb8).
74%
#997 feat(Provider): inject the base snap craft-application merged Merged as commit 41cee32d, injecting the application's base snap into the provider so managed instances need not download it; fixes #952 (CRAFT-4889).
73%
#891 (internal) Install snap via craft-providers API (CRAFT-1277) charmcraft merged Merged PR #891 as commit 456601ff, switching Charmcraft snap installation to the craft-providers API and completing CRAFT-1277.
72%
#444 feat(snaps): inject base snap from host craft-providers merged Merged PR #444 in commit 03704c1, injecting each host snap's base snap and reusing an existing base; released in craft-providers 1.20.0.
71%
#3933 providers: install snaps and packages via craft-providers API snapcraft merged Merged PR #3933 (commit 929a26fd6) reworked snapcraft/providers to install snaps and packages via the craft-providers API instead of bespoke code (CRAFT-1281, CRAFT-1283).
71%
#2174 build_providers: inject snaps when running from a snap snapcraft merged Merged PR #2174 (commit 283ab0bb8) to inject host Snapcraft and base snaps when running from the snapcraft snap, while non-snap runs install them from the store.
71%