Snap refresh not working as expected on devmode snaps

Bug #1665102 reported by Greg Lutostanski
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

So yesterday I installed the juju snap...

$ sudo snap install juju --edge --devmode

then today... https://paste.ubuntu.com/24002666/

Does snap refresh just not work on devmode snaps, what is going on here? And why are they not auto-downloaded.

lutostag@cia:~$ snap --version
snap 2.21+16.10
snapd 2.21+16.10
series 16
ubuntu 16.10

Let me know if I can provide anything else.

P.S. it works if I manually $ snap install juju --edge --devmode #again

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

With devmode you always need to use the option:
$ snap refresh juju --devmode
and they are not auto-updated

Revision history for this message
Joshua Bayfield (jbayfield) wrote :

Marking as invalid according to Pat McGowan's comment.

Changed in snapd (Ubuntu):
status: New → Invalid
Revision history for this message
Greg Lutostanski (lutostag) wrote :

Thanks for quick reply. Documentation is ambiguous on this point and therefore confused me.

Filed a bug @ https://github.com/ubuntudesign/snapcraft.io/issues/281

Appreciate the awesomeness that is snap*!

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1665102] Re: Snap refresh not working

Hmm... my understanding of the intent was different.

You should get updates from devmode to devmode, and from devmode to
strict (safer), but you should not auto-update from strict to devmode or
classic.

I think it's a bug if that's not the current behavior, unless one of the
snapd core devs explains otherwise.

Mark

Revision history for this message
Pat McGowan (pat-mcgowan) wrote : Re: Snap refresh not working

reopening to get some confirmation

Changed in snapd (Ubuntu):
status: Invalid → New
summary: - Snap refresh not working
+ Snap refresh not working as expected on devmode snaps
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

The current behavior was the precise outcome of a very long conversation we (Mark and I) had in Heidelberg, about the subtle properties of such updates. We agreed to block devmode => strict refreshes because we could not get a clear agreement on what was the proper way to treat those updates. Specifically, on refreshes that go from a snap that proposes devmode to one that proposes strict should it:

1. Refresh and keep the devmode flag on

or

2. Refresh and disable the devmode flag

I believe the more natural semantic is (1), given the flag meaning (development mode), while Mark would like to have behavior (2), taking the flag off. Behavior (2) doesn't seem sensible to me because it's an automatic and transparent change behind the developer's back which is changing the behavior of said snap for no apparent reason. It would also cause the strange effect that a devmode snap can be updated to strict, but cannot be updated _through_ strict (devmode => strict => devmode), even though the developer explicitly said this snap was in development mode before.

So, if we go with 1, sounds good to me. If the idea is 2, then I'd prefer to keep the current behavior as we originally discussed in Heidelberg.

Revision history for this message
Greg Lutostanski (lutostag) wrote :

Thanks for the well thought out explanation.

I would proffer and alternative until either #1 or #2 can be decided upon.

Refresh for all snaps that stay in the same confinement mode. I.e. one --devmode snap to a more recent --devmode snap, which currently does not happen.

I agree that upgrades across confinement modes are more tricky and the right decision must be made, I think the snap team can come up with the correct approach for that in the longer term.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1665102] Re: Snap refresh not working as expected on devmode snaps

Ha! Of course I only remember my side of the discussion :)

Gustavo, are you suggesting that the snap would be refreshed and STAY in
devmode? Or that it would switch to strict (remember the possiblity of
devmode), and go to devmode if a subsequent revision specified devmode,
with no prompt?

I would be more comfortable with it staying in devmode through those
changes, if we show devmode nicely in the 'snap list' output.

Mark

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

it is also the case that snap refresh --list does not show new updates on the devmode snaps, which is consistent I suppose, but if it did show them one could know to manually do the refresh.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.