Does snap revert trigger the usual pre-refresh and post-refresh hooks?

Question is what’s in the title :slight_smile:

I can’t seem to find a solid answer in the hooks documentation, nor in previous threads on the forum:

There was some discussion of adding revert hooks many years ago, but these were not added: Install/remove hooks

I started to poke around at the snapd source code, but I figured it would be good to get this answered publicly and documented, so I’m opening this thread here.

Thanks!

I talked to the snapd team, and it seems snap revert does not cause pre/post-refresh hooks to run. As mentioned, there was previous discussion around adding hooks specifically for reverts, but that has not yet been planned. So snaps need to do their own coordination around detecting/handling reverts, if relevant.

CC @medubelko it would be great to include this information in the hooks documentation, along with information about the other hooks. Thanks!