Merge lp:~sylvain-pineau/checkbox/export_comments into lp:checkbox

Proposed by Sylvain Pineau
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 1960
Merged at revision: 1970
Proposed branch: lp:~sylvain-pineau/checkbox/export_comments
Merge into: lp:checkbox
Diff against target: 88 lines (+14/-5)
4 files modified
plainbox/plainbox/impl/box.py (+2/-1)
plainbox/plainbox/impl/exporter/__init__.py (+5/-0)
plainbox/plainbox/impl/exporter/test_init.py (+4/-1)
plainbox/plainbox/impl/test_box.py (+3/-3)
To merge this branch: bzr merge lp:~sylvain-pineau/checkbox/export_comments
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+151392@code.launchpad.net

Description of the change

MR for plainbox

checkbox submissions usually include the reason why a job is not supported/initiated.
This merge proposal allows plainbox to export the same information in the job results comments.

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I was initially opposed using comments for that but given the limitations of the server side evolution I think this is a good idea, thanks.

+1

review: Approve
Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Download full text (49.4 KiB)

The attempt to merge lp:~sylvain-pineau/checkbox/export_comments into lp:checkbox failed. Below is the output from the failed tests.

[precise] Importing base box 'precise-cloud-i386'...
[precise]
[precise] Progress: 90%[precise]
[precise] No guest additions were detected on the base box for this VM! Guest
additions are required for forwarded ports, shared folders, host only
networking, and more. If SSH fails on this machine, please install
the guest additions and repackage the box to continue.

This is not an error message; everything may continue to work properly,
in which case you may ignore this message.
[precise] Matching MAC address for NAT networking...
[precise] Clearing any previously set forwarded ports...
[precise] Forwarding ports...
[precise] -- 22 => 2222 (adapter 1)
[precise] Creating shared folders metadata...
[precise] Clearing any previously set network interfaces...
[precise] Booting VM...
[precise] Waiting for VM to boot. This can take a few minutes.
[precise] VM booted and ready for use!
[precise] Mounting shared folders...
[precise] -- v-root: /vagrant
[precise] Running provisioner: Vagrant::Provisioners::Shell...
stdin: is not a tty
Ign http://security.ubuntu.com precise-security InRelease
Ign http://archive.ubuntu.com precise InRelease
Ign http://archive.ubuntu.com precise-updates InRelease
Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:2 http://security.ubuntu.com precise-security Release [49.6 kB]
Hit http://archive.ubuntu.com precise Release.gpg
Get:3 http://archive.ubuntu.com precise-updates Release.gpg [198 B]
Hit http://archive.ubuntu.com precise Release
Get:4 http://archive.ubuntu.com precise-updates Release [49.6 kB]
Get:5 http://security.ubuntu.com precise-security/main i386 Packages [239 kB]
Hit http://archive.ubuntu.com precise/main i386 Packages
Hit http://archive.ubuntu.com precise/restricted i386 Packages
Hit http://archive.ubuntu.com precise/universe i386 Packages
Hit http://archive.ubuntu.com precise/multiverse i386 Packages
Hit http://archive.ubuntu.com precise/main TranslationIndex
Hit http://archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://archive.ubuntu.com precise/restricted TranslationIndex
Get:6 http://security.ubuntu.com precise-security/restricted i386 Packages [3968 B]
Hit http://archive.ubuntu.com precise/universe TranslationIndex
Get:7 http://security.ubuntu.com precise-security/universe i386 Packages [69.9 kB]
Get:8 http://archive.ubuntu.com precise-updates/main i386 Packages [594 kB]
Get:9 http://security.ubuntu.com precise-security/multiverse i386 Packages [2362 B]
Get:10 http://security.ubuntu.com precise-security/main TranslationIndex [74 B]
Get:11 http://security.ubuntu.com precise-security/multiverse TranslationIndex [71 B]
Get:12 http://archive.ubuntu.com precise-updates/restricted i386 Packages [9503 B]
Get:13 http://security.ubuntu.com precise-security/restricted TranslationIndex [71 B]
Get:14 http://security.ubuntu.com precise-security/universe TranslationIndex [73 B]
Get:15 http://security.ubuntu.com precise-security/main Translation-en [112 kB]
Get:16 http://archive.ubuntu.com precise-updates/universe i386 Packages [184 kB]
G...

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The attempt to merge lp:~sylvain-pineau/checkbox/export_comments into lp:checkbox failed. Below is the output from the failed tests.

[precise] Bringing VM 'up'
[precise] Starting tests...
[precise] CheckBox test suite: pass
[precise] PlainBox test suite: fail
[precise] stdout: http://paste.ubuntu.com/5586418/
[precise] stderr: http://paste.ubuntu.com/5586419/
[precise] Integration tests: fail
[precise] stdout:
[precise] stderr: http://paste.ubuntu.com/5586420/
[precise] Suspending VM
[quantal] Bringing VM 'up'
[quantal] Starting tests...
[quantal] CheckBox test suite: pass
[quantal] PlainBox test suite: pass
[quantal] Integration tests: pass
[quantal] Suspending VM

You are trying to send an empty document, exiting.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The attempt to merge lp:~sylvain-pineau/checkbox/export_comments into lp:checkbox failed. Below is the output from the failed tests.

[precise] Bringing VM 'up'
[precise] Starting tests...
[precise] CheckBox test suite: pass
[precise] PlainBox test suite: fail
[precise] stdout: http://paste.ubuntu.com/5586624/
[precise] stderr: http://paste.ubuntu.com/5586625/
[precise] Integration tests: fail
[precise] stdout:
[precise] stderr: http://paste.ubuntu.com/5586626/
[precise] Suspending VM
[quantal] Bringing VM 'up'
[quantal] Starting tests...
[quantal] CheckBox test suite: pass
[quantal] PlainBox test suite: pass
[quantal] Integration tests: pass
[quantal] Suspending VM

You are trying to send an empty document, exiting.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The attempt to merge lp:~sylvain-pineau/checkbox/export_comments into lp:checkbox failed. Below is the output from the failed tests.

[precise] Bringing VM 'up'
[precise] Starting tests...
[precise] CheckBox test suite: pass
[precise] Running 'plainbox/setup.py egg_info' failed
[precise] stdout: http://paste.ubuntu.com/5593668/
[precise] stderr: http://paste.ubuntu.com/5593670/
[precise] NOTE: unable to execute tests, marked as failed
[precise] PlainBox test suite: fail
[precise] stdout: http://paste.ubuntu.com/5593671/
[precise] stderr: http://paste.ubuntu.com/5593672/
[precise] Integration tests: fail
[precise] stdout:
[precise] stderr: http://paste.ubuntu.com/5593673/
[precise] Suspending VM
[quantal] Bringing VM 'up'
[quantal] Starting tests...
[quantal] CheckBox test suite: pass
[quantal] PlainBox test suite: pass
[quantal] Integration tests: pass
[quantal] Suspending VM

You are trying to send an empty document, exiting.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The attempt to merge lp:~sylvain-pineau/checkbox/export_comments into lp:checkbox failed. Below is the output from the failed tests.

[precise] Bringing VM 'up'
[precise] Starting tests...
[precise] CheckBox test suite: pass
[precise] Running 'plainbox/setup.py egg_info' failed
[precise] stdout: http://paste.ubuntu.com/5594383/
[precise] stderr: http://paste.ubuntu.com/5594384/
[precise] NOTE: unable to execute tests, marked as failed
[precise] PlainBox test suite: fail
[precise] stdout: http://paste.ubuntu.com/5594385/
[precise] stderr: http://paste.ubuntu.com/5594386/
[precise] Integration tests: fail
[precise] stdout:
[precise] stderr: http://paste.ubuntu.com/5594387/
[precise] Suspending VM
[quantal] Bringing VM 'up'
[quantal] Starting tests...
[quantal] CheckBox test suite: pass
[quantal] PlainBox test suite: pass
[quantal] Integration tests: pass
[quantal] Suspending VM

You are trying to send an empty document, exiting.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The attempt to merge lp:~sylvain-pineau/checkbox/export_comments into lp:checkbox failed. Below is the output from the failed tests.

[precise] Bringing VM 'up'
[precise] Unable to 'up' VM!
[precise] stdout: http://paste.ubuntu.com/5595849/
[precise] stderr: http://paste.ubuntu.com/5595850/
[precise] NOTE: unable to execute tests, marked as failed
[quantal] Bringing VM 'up'
[quantal] Unable to 'up' VM!
[quantal] stdout: http://paste.ubuntu.com/5595851/
[quantal] stderr: http://paste.ubuntu.com/5595852/
[quantal] NOTE: unable to execute tests, marked as failed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plainbox/plainbox/impl/box.py'
2--- plainbox/plainbox/impl/box.py 2013-02-26 13:53:45 +0000
3+++ plainbox/plainbox/impl/box.py 2013-03-03 16:45:25 +0000
4@@ -415,7 +415,8 @@
5 else:
6 job_result = JobResult({
7 'job': job,
8- 'outcome': JobResult.OUTCOME_NOT_SUPPORTED
9+ 'outcome': JobResult.OUTCOME_NOT_SUPPORTED,
10+ 'comments': job_state.get_readiness_description()
11 })
12 if job_result is None and not ns.dry_run:
13 logger.warning("Job %s did not return a result", job)
14
15=== modified file 'plainbox/plainbox/impl/exporter/__init__.py'
16--- plainbox/plainbox/impl/exporter/__init__.py 2013-02-25 11:02:59 +0000
17+++ plainbox/plainbox/impl/exporter/__init__.py 2013-03-03 16:45:25 +0000
18@@ -73,6 +73,7 @@
19 OPTION_WITH_RESOURCE_MAP = 'with-resource-map'
20 OPTION_WITH_JOB_DEFS = 'with-job-defs'
21 OPTION_WITH_ATTACHMENTS = 'with-attachments'
22+ OPTION_WITH_COMMENTS = 'with-comments'
23
24 SUPPORTED_OPTION_LIST = (
25 OPTION_WITH_IO_LOG,
26@@ -83,6 +84,7 @@
27 OPTION_WITH_RESOURCE_MAP,
28 OPTION_WITH_JOB_DEFS,
29 OPTION_WITH_ATTACHMENTS,
30+ OPTION_WITH_COMMENTS,
31 )
32
33 def __init__(self, option_list=None):
34@@ -139,6 +141,9 @@
35 continue
36 data['result_map'][job_name] = OrderedDict()
37 data['result_map'][job_name]['outcome'] = job_state.result.outcome
38+ if self.OPTION_WITH_COMMENTS in self._option_list:
39+ data['result_map'][job_name]['comments'] = \
40+ job_state.result.comments
41
42 # Add Job definitions if requested
43 if self.OPTION_WITH_JOB_DEFS in self._option_list:
44
45=== modified file 'plainbox/plainbox/impl/exporter/test_init.py'
46--- plainbox/plainbox/impl/exporter/test_init.py 2013-02-21 11:17:48 +0000
47+++ plainbox/plainbox/impl/exporter/test_init.py 2013-03-03 16:45:25 +0000
48@@ -124,6 +124,7 @@
49 'job': job_b,
50 'outcome': 'pass',
51 'return_code': 0,
52+ 'comments': 'foo',
53 'io_log': make_io_log(
54 (IOLogRecord(0, 'stdout', b'ready: yes\n'),),
55 session_dir)
56@@ -160,13 +161,15 @@
57 'plugin': 'shell',
58 'command': 'echo testing && true',
59 'io_log': ['dGVzdGluZwo='],
60- 'requires': 'job_b.ready == "yes"'
61+ 'requires': 'job_b.ready == "yes"',
62+ 'comments': None,
63 },
64 'job_b': {
65 'outcome': 'pass',
66 'plugin': 'resource',
67 'command': 'echo ready: yes',
68 'io_log': ['cmVhZHk6IHllcwo='],
69+ 'comments': 'foo',
70 }
71 },
72 'attachment_map': {
73
74=== modified file 'plainbox/plainbox/impl/test_box.py'
75--- plainbox/plainbox/impl/test_box.py 2013-02-26 14:55:20 +0000
76+++ plainbox/plainbox/impl/test_box.py 2013-03-03 16:45:25 +0000
77@@ -338,9 +338,9 @@
78 self.assertEqual(call.exception.args, (0,))
79 expected = """
80 Each format may support a different set of options
81- json: with-io-log, squash-io-log, flatten-io-log, with-run-list, with-job-list, with-resource-map, with-job-defs, with-attachments, machine-json
82- rfc822: with-io-log, squash-io-log, flatten-io-log, with-run-list, with-job-list, with-resource-map, with-job-defs, with-attachments
83- text: with-io-log, squash-io-log, flatten-io-log, with-run-list, with-job-list, with-resource-map, with-job-defs, with-attachments
84+ json: with-io-log, squash-io-log, flatten-io-log, with-run-list, with-job-list, with-resource-map, with-job-defs, with-attachments, with-comments, machine-json
85+ rfc822: with-io-log, squash-io-log, flatten-io-log, with-run-list, with-job-list, with-resource-map, with-job-defs, with-attachments, with-comments
86+ text: with-io-log, squash-io-log, flatten-io-log, with-run-list, with-job-list, with-resource-map, with-job-defs, with-attachments, with-comments
87 """
88 self.assertEqual(io.combined, cleandoc(expected) + "\n")
89

Subscribers

People subscribed via source and target branches