Snap-declaration vs gadget connections


We have a brand store, and have been mostly defining snap interface connections in the gadget. We are considering using snap-declaration assertion instead.

What are the various pros/cons of each approach ?

Store snap-declaration is not always self service [ if it’s a non-simple config ], but is there any other downside ? If we move to using the assertion, is there any harm in leaving the connections defined in the gadget [ assuming there is no conflict ] ?

Cheers, Just

1 Like

Note that connection directives made in the gadget only apply on first boot.

There is no disadvantage for you to use auto-connections via the snap-declaration, except as you note that it is not always self-service, even if you have a brand store. Some interfaces need to be approved for usage.

There is no harm in leaving the connections defined in the gadget as well as having the same connections in the snap-declaration assertion.

The main differences between using gadget vs snap-declaration are as @kyleN points out, that gadget connections only apply on first boot and changes are never processed even on gadget refreshes to an already installed system.

Thanks for comments guys, that’s pretty much what I thought.

I think for our use case moving to the snap-declaration is probably best.

I guess the only thing worth clarifying for anyone else that reads this, I’m only talking about snaps that we are the maintainers of [ which we are publishing in our own Brand Store ]. For “third party” snaps, unless I’m missing something, the gadget is the only way.

Cheers, Just

i dont think so, snap declarations are overriding on a per-store level, so you should be able to define your own setup as needed, even for third party snaps as long as your device talks to your store …

Ooh, that is something I have missed. That’s awesome to know - thanks :+1:

I guess that is strictly not self service though currently as I can’t see “third party” snaps in the context of our brand store, via the store dashboard, to enable/disable any auto-connections.

Cheers, Just

There is some ability to do that, but yes it is not self-service you will need to discuss with the store team via your support ticket system