Merge lp://qastaging/~sil2100/ubuntu-system-image/server-tags into lp://qastaging/ubuntu-system-image/server
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Łukasz Zemczak | ||||
Approved revision: | 290 | ||||
Merged at revision: | 281 | ||||
Proposed branch: | lp://qastaging/~sil2100/ubuntu-system-image/server-tags | ||||
Merge into: | lp://qastaging/ubuntu-system-image/server | ||||
Diff against target: |
645 lines (+475/-64) 6 files modified
README.rst (+1/-0) bin/copy-image (+15/-49) bin/tag-image (+201/-0) lib/systemimage/generators.py (+7/-14) lib/systemimage/tests/test_tools.py (+123/-1) lib/systemimage/tools.py (+128/-0) |
||||
To merge this branch: | bzr merge lp://qastaging/~sil2100/ubuntu-system-image/server-tags | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Barry Warsaw (community) | Approve | ||
Review via email: mp+276911@code.qastaging.launchpad.net |
Commit message
Add quick functionality to system-image server to enable image tagging. We already have something called image descriptions, but those are a typical system-image thing. Image tags are generally similar with the difference that tags are appended to the image's version_detail, making them instantly available on images themselves (not requiring querying system-image explicitly).
Description of the change
Add quick functionality to system-image server to enable image tagging.
We already have something called image descriptions, but those are a typical system-image thing. Image tags are generally similar with the difference that tags are appended to the image's version_detail, making them instantly available on images themselves (not requiring querying system-image explicitly).
In the same time I moved out some common parts from scripts to the tools part of systemimage, to make those at least a bit testable. I found an issue with deltabase generation though, which I will try to fix with another merge. I started out with generally re-writing the bin scripts to make them testable but generally moved those changes out as they were much more invasive for the functionality we add.
Tested preliminary, still need to test some edge-cases but submitting the MR for review already.
Generally looks good. Some questions and comments inlined.
My high level concern is whether all the refactored code, and new code is adequately tested. Maybe the refactored code wasn't tested in the original branch, in which case, this might be a good opportunity to add *some* testing, even if it's incomplete.
But there's also bin/tag-image. Is this script tested anywhere? One thing you could think about is moving most of the logic to a module and then test that module, leaving bin/tag-image a thin wrapper around that module. Kind of like what you're doing with the refactored code above.
So I think I'd like to see a few more tests.