Merge lp://qastaging/~doanac/uci-engine/runner-refactor into lp://qastaging/uci-engine

Proposed by Andy Doan
Status: Rejected
Rejected by: Vincent Ladeuil
Proposed branch: lp://qastaging/~doanac/uci-engine/runner-refactor
Merge into: lp://qastaging/uci-engine
Diff against target: 442 lines (+213/-135)
4 files modified
test_runner/tstrun/run_worker.py (+13/-134)
test_runner/tstrun/testbed.py (+137/-1)
test_runner/tstrun/tests/test_testbed.py (+31/-0)
test_runner/tstrun/tests/test_worker.py (+32/-0)
To merge this branch: bzr merge lp://qastaging/~doanac/uci-engine/runner-refactor
Reviewer Review Type Date Requested Status
Vincent Ladeuil (community) Disapprove
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+226360@code.qastaging.launchpad.net

Commit message

test-runner: simplify run-worker code

The handle_request function was growing too large to debug. It also
was written in a way that made it hard to test with a simple CLI like
we have for the image-builder.

This refactors things so that its easier to test the actual runner w/o
needing anything from rabbit.

Description of the change

I want to get something like the image-builder's cloud_image.py script that lets you build an image without having to worry about amqp. This refactors some logic in way to make things easier to isolate and test.

The end result gives you the ability to run something like (from home or in the cloud):

  ./run-python ./test_runner/tstrun/testbed.py -i 00fd0e5c-07e1-11e4-8e1f-fa163ecb84ef.img -p phablet-tools -s saucy -e

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:665
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1046/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1046/rebuild

review: Approve (continuous-integration)
Revision history for this message
Vincent Ladeuil (vila) wrote :

Good points on the handle_request design, I'll try to make the best out of it.

Unfortunately, this conflicts with the design change required for the new autopkgtest, as explained since Malta and last summarized in https://app.asana.com/0/8499154990155/14578745408886 , adt-run needs to run on the worker not on the testbed anymore.

review: Disapprove
Revision history for this message
Vincent Ladeuil (vila) wrote :

This has been superseded by refactoring the test runner worker and further work better integrating adt-run.

Unmerged revisions

665. By Andy Doan

test-runner: simplify run-worker code

The handle_request function was growing too large to debug. It also
was written in a way that made it hard to test with a simple CLI like
we have for the image-builder.

This refactors things so that its easier to test the actual runner w/o
needing anything from rabbit.

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