snapd icon indicating copy to clipboard operation
snapd copied to clipboard

daemon, client: Set error kind when can't refresh snap that is busy.

Open robert-ancell opened this issue 1 year ago • 4 comments

This is a normal use case for a client, so we want to be able to distinguish this from other refresh errors.

robert-ancell avatar Mar 19 '24 02:03 robert-ancell

Was noticed in https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2484

robert-ancell avatar Mar 19 '24 02:03 robert-ancell

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.92%. Comparing base (2b48274) to head (bac3ad8). Report is 12 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13729      +/-   ##
==========================================
+ Coverage   78.91%   78.92%   +0.01%     
==========================================
  Files        1043     1043              
  Lines      134345   134427      +82     
==========================================
+ Hits       106014   106095      +81     
- Misses      21719    21720       +1     
  Partials     6612     6612              
Flag Coverage Δ
unittests 78.92% <100.00%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Mar 19 '24 02:03 codecov-commenter

As a side note, we need to update the docs when this lands https://snapcraft.io/docs/snapd-error-codes

ZeyadYasser avatar Mar 25 '24 09:03 ZeyadYasser

This will be used by gnome-software, which tries to update multiple snaps (i.e. the equivalent of refresh all). One snap being busy makes the whole update look like it failed and the user is notified; the desired behaviour is to ignore those snaps that are busy, much like the refreshAll logic above.

robert-ancell avatar Mar 25 '24 19:03 robert-ancell