Merge lp://qastaging/~charlesk/keeper/untar into lp://qastaging/keeper/devel

Proposed by Charles Kerr
Status: Merged
Approved by: Xavi Garcia
Approved revision: 160
Merged at revision: 123
Proposed branch: lp://qastaging/~charlesk/keeper/untar
Merge into: lp://qastaging/keeper/devel
Diff against target: 1362 lines (+984/-108)
18 files modified
debian/control (+5/-1)
debian/keeper.install (+2/-1)
src/helper/folder-backup.sh.in (+1/-1)
src/tar/CMakeLists.txt (+72/-27)
src/tar/untar-main.cpp (+169/-0)
src/tar/untar.cpp (+144/-0)
src/tar/untar.h (+38/-0)
tests/CMakeLists.txt (+2/-1)
tests/com_canonical_keeper.py (+80/-45)
tests/unit/tar/CMakeLists.txt (+104/-29)
tests/unit/tar/keeper-untar-test.cpp (+232/-0)
tests/unit/tar/ku-invoke-nobus.sh.in (+1/-0)
tests/unit/tar/ku-invoke.sh.in (+1/-0)
tests/unit/tar/untar-test.cpp (+120/-0)
tests/utils/file-utils.cpp (+2/-1)
tests/utils/file-utils.h (+1/-1)
tests/utils/keeper-dbusmock-fixture.h (+9/-0)
tests/utils/main.cpp (+1/-1)
To merge this branch: bzr merge lp://qastaging/~charlesk/keeper/untar
Reviewer Review Type Date Requested Status
Xavi Garcia (community) Approve
unity-api-1-bot continuous-integration Approve
Review via email: mp+313189@code.qastaging.launchpad.net

Commit message

Add untar

Description of the change

Add untar.

* The Untar class itself, which manages a couple of QProcesses for xzcat and tar x. Add tar & xz to debian dependencies.

* Add untar-test unit test for the untar class

* Add keeper-untar executable that gets a restore socket from keeper, then untars from it

* Add keeper-untar-test that tests keeper-untar against the dbusmock service. Implement restore in the dbusmock service.

* Rename keeper-tar-create as keeper-tar for symmetry with keeper-untar

* Not pushed/completed: integration tests

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Xavi Garcia (xavi-garcia-mena) wrote :

Thanks, Charles.
It looks good and I've tested it with the service and the command line client and it works fine.

I tried to trigger a rebuild myself but jenkins is still complaining.

I've added a comment inline...

A found a minor issue, non blocking, but that in cases that the restore file is very big we could be trying to restore even we had an error in the step method. (the error in not checked when calling step)

And even more minor: the coding style for the brackets is different in some cases.
There are some cases like:
if (blah) {
   blah
}

Shouldn't it be:?
if (blah)
{
   blah
}

review: Needs Fixing
149. By Charles Kerr

in debian/control, remove errant newline

150. By Charles Kerr

in keeper-untar-test, extract out common test code into helper methods

151. By Charles Kerr

in keeper-untar, exit with failure if Untar::step() fails

152. By Charles Kerr

in Untar class, add finish() method to check that xz/tar finish and check their return values

153. By Charles Kerr

in keeper-untar, exit with failure if Untar.step() or Untar.finish() fail

154. By Charles Kerr

fix end-of-namespace semicolon warning

155. By Charles Kerr

in untar-test, use Untar.finish()

156. By Charles Kerr

in keeper-untar-test, add test cases for restoring corrupt archives

157. By Charles Kerr

in service dbusmock, wait for helpers to exit

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
158. By Charles Kerr

fix bad whitespace that caused whitespace test to fail

159. By Charles Kerr

fix flake8 warnings in service dbusmock

160. By Charles Kerr

fix minor int conversion warning in tests/utils/main.cpp

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

FAILED: Continuous integration, rev:
https://jenkins.canonical.com/unity-api-1/job/lp-keeper-ci/156/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/1277/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1284
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1065
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1065
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1065
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1065
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1065/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1065
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1065/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1065/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-keeper-ci/156/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:160
https://jenkins.canonical.com/unity-api-1/job/lp-keeper-ci/155/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1276
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1283
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1064
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1064/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1064
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1064/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1064
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1064/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1064
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1064/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1064
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1064/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1064
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1064/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-keeper-ci/155/rebuild

review: Approve (continuous-integration)
Revision history for this message
Xavi Garcia (xavi-garcia-mena) wrote :

Looks good to me, thanks Charles

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: