Snaps info pre-fetching seems broken

Bug #1989198 reported by Olivier Gayot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity (Ubuntu)
Fix Released
High
Olivier Gayot

Bug Description

It seems that we have a mechanism to pre-fetch information about the snaps available. My understanding is that it impacts how fast the screen shows the information about a specific snap when the user presses enter on the snap list view.

However, in practice I always get the following debug log, which seems to indicate that we did not pre-fetch any snap info.

2022-09-09 13:09:46,158 DEBUG subiquity.server.controllers.snaplist:70 fetched list of 0 snaps

The code does this:

            task = self.tasks[None] = \
                    SingleInstanceTask(self._load_list, propagate_errors=False)
            task.start_sync()
            self.pending_snaps = self.model.get_snap_list()
            log.debug("fetched list of %s snaps", len(self.pending_snaps))

and it feels like we should wait for the task to complete before calling self.model.get_snap_list().

Revision history for this message
Olivier Gayot (ogayot) wrote (last edit ):

I think this got broken as part of this patch:

https://github.com/canonical/subiquity/commit/ee528fe6a

and more specifically:

```
- task = self.tasks[None] = schedule_task(self._load_list())
- await task
+ task = self.tasks[None] = SingleInstanceTask(self._load_list, propagate_errors=False)
+ task.start_sync()
```

Changed in subiquity (Ubuntu):
importance: Undecided → High
Changed in subiquity (Ubuntu):
status: New → Triaged
Revision history for this message
Olivier Gayot (ogayot) wrote :
Changed in subiquity (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Olivier Gayot (ogayot)
Olivier Gayot (ogayot)
Changed in subiquity (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Dan Bungert (dbungert) wrote :

We believe a fix for this can be found in Subiquity 22.10.1. On
install you will be offered to update to the new version of the
installer if network is available, or you can perform a manual update
by running the follwing in a terminal:
sudo snap refresh subiquity

Changed in subiquity (Ubuntu):
status: Fix Committed → Fix Released
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.