Does snap refresh trigger the disconnect/connect hooks?

Hi,

my snap has a plug of content interface and dis-/connect hooks. This plug is for reading the shared read-only content.
At the first time of “snap install” I connected this interface manually. The commando “snap connect” triggered connect hook. After that, I did “snap install” again. I noticed that the target (folder for shared content) of the plug was deleted and created again. But the disconnect and connect hooks has not been triggered.

what will happen if I do “snap refresh”? Dose this interface also be disconnected and connected again automatically?
Does “snap refresh” trigger the disconnect/connect hooks?

Thanks

No, at the moment disconnect+connect hooks are not re-executed on refreshes; this is a limitation/problem we are aware of and it will be addressed.
You can expect existing connections to remain and “content” interface plugs to get internally updated (including security profiles) if any of their definitions were changed. And you can expect connect hooks to be executed for any new automatic connections that new revision of a snap may introduce.

I hope that helps.

Thank you :slightly_smiling_face: