Merge lp:~thomir-deactivatedaccount/adt-cloud-worker/trunk-fix-bugs into lp:adt-cloud-worker

Proposed by Thomi Richards
Status: Merged
Approved by: Thomi Richards
Approved revision: 20
Merged at revision: 20
Proposed branch: lp:~thomir-deactivatedaccount/adt-cloud-worker/trunk-fix-bugs
Merge into: lp:adt-cloud-worker
Diff against target: 35 lines (+8/-2)
2 files modified
README.rst (+6/-0)
adt_cloud_worker/__init__.py (+2/-2)
To merge this branch: bzr merge lp:~thomir-deactivatedaccount/adt-cloud-worker/trunk-fix-bugs
Reviewer Review Type Date Requested Status
Celso Providelo (community) Approve
Review via email: mp+253015@code.launchpad.net

Commit message

Malformed test request payloads are now processed correctly.

Description of the change

This branch fixes two things:

1) It updates README.rst to be accurate (need to get uci-nova ssh setup script and install it manually - autopkgtest from phase0 PPA isn't enough).

2) It fixes a bug where, if a test payload message didn't have some of the required keys the resulting exception would crash the service.

To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) wrote :

Thomi,

Thanks for the code and doc tweak.

The charm & mojo spec codifies the uci-nova interim procedure for now, if we fork adt in our ppa it looks like it will be more trouble to merge trunk changes that we might need in this process, but maybe that's not necessarily true, we should re-evaluate this as we progress.

[]

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.rst'
2--- README.rst 2015-03-04 22:55:10 +0000
3+++ README.rst 2015-03-16 03:23:01 +0000
4@@ -35,6 +35,12 @@
5 $ sudo apt-get update
6 $ sudo apt-get install autopkgtest
7
8+.. note::
9+ Thomi: At the time of writing (16/3/2015), the autopkgtest from the PPA is not
10+ enough to make this work. You also need to manually branch
11+ lp:~canonical-ci-engineering/adt-cloud-worker/uci-nova and follow the instructions
12+ there.
13+
14 Install the service itself::
15
16 $ python setup.py install
17
18=== modified file 'adt_cloud_worker/__init__.py'
19--- adt_cloud_worker/__init__.py 2015-03-12 15:41:50 +0000
20+++ adt_cloud_worker/__init__.py 2015-03-16 03:23:01 +0000
21@@ -77,12 +77,12 @@
22 for later checking.
23 """
24 logger.info('Got: {}'.format(body))
25- _validate_request_contents(body)
26-
27 body['worker'] = self.worker_name
28+
29 # Run requested tests safely.
30 tarball_path = None
31 try:
32+ _validate_request_contents(body)
33 # Create and temporary directory for storing adt results.
34 dir_prefix = 'adt-{}-{}'.format(
35 self.worker_name, body['request_id'])

Subscribers

People subscribed via source and target branches

to all changes: