GlanceMirror class does not expose progress update callbacks

Bug #1340983 reported by Mike McCracken
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
simplestreams
Fix Released
Low
Unassigned
simplestreams (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

The GlanceMirror class has no callback to provide progress updates on
image downloads. OS images are often large enough (and you may be
syncing several images) that this presents a serious UX problem during
which a user (or client program) of simplestreams will not be able to
tell that anything is happening.

The attached diff exposes progress update callbacks with a minimum of
changes to existing program logic. The GlanceMirror class gets a basic
callback, and calling code is expected to handle figuring out what
images will be downloaded and their size before calling
GlanceMirror.sync(). In order to help with this, a separate class
"ItemInfoDryRunMirror" is added, to make use of the same filter logic
that GlanceMirror will use but instead just collect a list of images
to download and their size.

Since this is provided as optional keyword arguments, existing users
will not be affected.

[Test Case]

From the source tree top directory,

PYTHONPATH=. tools/sstream-mirror-glance --max=1 -v -v -v --output-dir \
images/ --cloud-name test_cloud --content-id test_content \
--keyring /usr/share/keyrings/ubuntu-cloudimage-keyring.gpg \
http://cloud-images.ubuntu.com/releases/ streams/v1/index.json

And verify that it prints status updates to stdout. The
sstream-mirror-glance tool has been updated to use the new api in
GlanceMirror.

[Regression Potential]

This has limited regression potential, because the new functionality
is provided as optional arguments. If anything is running the
sstream-mirror-glance script and parsing its output, that may break,
but that seems very unlikely because that script does not currently
produce anything useful to parse.

Related branches

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

This bug was fixed in the package simplestreams - 0.1.0~bzr354-0ubuntu1

---------------
simplestreams (0.1.0~bzr354-0ubuntu1) utopic; urgency=medium

  * New upstream snapshot.
    - support progress output in the glance mirror (LP: #1340983)
    - upstream uses pyflakes instead of pylint
 -- Scott Moser <email address hidden> Fri, 22 Aug 2014 10:06:19 -0400

Changed in simplestreams (Ubuntu):
status: New → Fix Released
Scott Moser (smoser)
Changed in simplestreams:
status: New → Fix Committed
importance: Undecided → Low
Changed in simplestreams (Ubuntu):
importance: Undecided → Low
Revision history for this message
Scott Moser (smoser) wrote : Fixed in simplestreams version 0.1.0.

This bug is believed to be fixed in simplestreams in version 0.1.0. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in simplestreams:
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.