canonical / craft-application

The basis for *craft applications
https://canonical-craft-application.readthedocs-hosted.com/en/latest
GNU Lesser General Public License v3.0
7 stars 11 forks source link

Support snap parallel installs #411

Closed lengau closed 5 days ago

lengau commented 1 month ago

What needs to get done

If the application is installed as a snap, we need to be able to copy that same parallel install's revision into the provider rather than the default (un-instanced) revision.

Why it needs to get done

https://github.com/canonical/charmcraft/issues/1770

syncronize-issues-to-jira[bot] commented 1 month ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3212.

This message was autogenerated

dilyn-corner commented 3 weeks ago

I mentioned a trivially reproducible case in the snapcraft matrix room, but I will cross-post it here for easy reference:

git clone -b split_kernel_initrd_plugins --depth 1 https://github.com/kubiko/snapcraft
cd snapcraft

snapcraft
snap install --dangerous --classic snapcraft_8*.snap snapcraft_kernel

cd ../

git clone -b 24-riscv64-nezha --depth 1 https://github.com/canonical/iot-field-kernel-snap
cd iot-field-kernel-snap
snapcraft_kernel

Error message you will receive:

Bad snapcraft.yaml content:
- plugin not registered: 'initrd' (in field 'parts.initrd')  

snapcraft_kernel is precisely the version of snapcraft which supports the initrd plugin -- the snapcraft installed as snapcraft is actually the one being injected into the build environment.

mr-cal commented 5 days ago

Closing because this piece in craft-application is fixed, but we will likely run into the next issue in craft-providers.

The craft-providers fix is probably changing this line to snapname.split('')[0].