GlanceMirror class does not expose progress update callbacks
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.
"ItemInfoDryRun
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-
images/ --cloud-name test_cloud --content-id test_content \
--keyring /usr/share/
http://
And verify that it prints status updates to stdout. The
sstream-
GlanceMirror.
[Regression Potential]
This has limited regression potential, because the new functionality
is provided as optional arguments. If anything is running the
sstream-
but that seems very unlikely because that script does not currently
produce anything useful to parse.
Related branches
- Scott Moser: Pending requested
-
Diff: 197 lines (+105/-5)3 files modifiedsimplestreams/mirrors/glance.py (+40/-2)
simplestreams/util.py (+39/-1)
tools/sstream-mirror-glance (+26/-2)
Changed in simplestreams: | |
status: | New → Fix Committed |
importance: | Undecided → Low |
Changed in simplestreams (Ubuntu): | |
importance: | Undecided → Low |
This bug was fixed in the package simplestreams - 0.1.0~bzr354- 0ubuntu1
--------------- bzr354- 0ubuntu1) utopic; urgency=medium
simplestreams (0.1.0~
* 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