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
=== modified file 'plainbox/plainbox/impl/box.py'
--- plainbox/plainbox/impl/box.py 2013-02-26 13:53:45 +0000
+++ plainbox/plainbox/impl/box.py 2013-03-03 16:45:25 +0000
@@ -415,7 +415,8 @@
415 else:415 else:
416 job_result = JobResult({416 job_result = JobResult({
417 'job': job,417 'job': job,
418 'outcome': JobResult.OUTCOME_NOT_SUPPORTED418 'outcome': JobResult.OUTCOME_NOT_SUPPORTED,
419 'comments': job_state.get_readiness_description()
419 })420 })
420 if job_result is None and not ns.dry_run:421 if job_result is None and not ns.dry_run:
421 logger.warning("Job %s did not return a result", job)422 logger.warning("Job %s did not return a result", job)
422423
=== modified file 'plainbox/plainbox/impl/exporter/__init__.py'
--- plainbox/plainbox/impl/exporter/__init__.py 2013-02-25 11:02:59 +0000
+++ plainbox/plainbox/impl/exporter/__init__.py 2013-03-03 16:45:25 +0000
@@ -73,6 +73,7 @@
73 OPTION_WITH_RESOURCE_MAP = 'with-resource-map'73 OPTION_WITH_RESOURCE_MAP = 'with-resource-map'
74 OPTION_WITH_JOB_DEFS = 'with-job-defs'74 OPTION_WITH_JOB_DEFS = 'with-job-defs'
75 OPTION_WITH_ATTACHMENTS = 'with-attachments'75 OPTION_WITH_ATTACHMENTS = 'with-attachments'
76 OPTION_WITH_COMMENTS = 'with-comments'
7677
77 SUPPORTED_OPTION_LIST = (78 SUPPORTED_OPTION_LIST = (
78 OPTION_WITH_IO_LOG,79 OPTION_WITH_IO_LOG,
@@ -83,6 +84,7 @@
83 OPTION_WITH_RESOURCE_MAP,84 OPTION_WITH_RESOURCE_MAP,
84 OPTION_WITH_JOB_DEFS,85 OPTION_WITH_JOB_DEFS,
85 OPTION_WITH_ATTACHMENTS,86 OPTION_WITH_ATTACHMENTS,
87 OPTION_WITH_COMMENTS,
86 )88 )
8789
88 def __init__(self, option_list=None):90 def __init__(self, option_list=None):
@@ -139,6 +141,9 @@
139 continue141 continue
140 data['result_map'][job_name] = OrderedDict()142 data['result_map'][job_name] = OrderedDict()
141 data['result_map'][job_name]['outcome'] = job_state.result.outcome143 data['result_map'][job_name]['outcome'] = job_state.result.outcome
144 if self.OPTION_WITH_COMMENTS in self._option_list:
145 data['result_map'][job_name]['comments'] = \
146 job_state.result.comments
142147
143 # Add Job definitions if requested148 # Add Job definitions if requested
144 if self.OPTION_WITH_JOB_DEFS in self._option_list:149 if self.OPTION_WITH_JOB_DEFS in self._option_list:
145150
=== modified file 'plainbox/plainbox/impl/exporter/test_init.py'
--- plainbox/plainbox/impl/exporter/test_init.py 2013-02-21 11:17:48 +0000
+++ plainbox/plainbox/impl/exporter/test_init.py 2013-03-03 16:45:25 +0000
@@ -124,6 +124,7 @@
124 'job': job_b,124 'job': job_b,
125 'outcome': 'pass',125 'outcome': 'pass',
126 'return_code': 0,126 'return_code': 0,
127 'comments': 'foo',
127 'io_log': make_io_log(128 'io_log': make_io_log(
128 (IOLogRecord(0, 'stdout', b'ready: yes\n'),),129 (IOLogRecord(0, 'stdout', b'ready: yes\n'),),
129 session_dir)130 session_dir)
@@ -160,13 +161,15 @@
160 'plugin': 'shell',161 'plugin': 'shell',
161 'command': 'echo testing && true',162 'command': 'echo testing && true',
162 'io_log': ['dGVzdGluZwo='],163 'io_log': ['dGVzdGluZwo='],
163 'requires': 'job_b.ready == "yes"'164 'requires': 'job_b.ready == "yes"',
165 'comments': None,
164 },166 },
165 'job_b': {167 'job_b': {
166 'outcome': 'pass',168 'outcome': 'pass',
167 'plugin': 'resource',169 'plugin': 'resource',
168 'command': 'echo ready: yes',170 'command': 'echo ready: yes',
169 'io_log': ['cmVhZHk6IHllcwo='],171 'io_log': ['cmVhZHk6IHllcwo='],
172 'comments': 'foo',
170 }173 }
171 },174 },
172 'attachment_map': {175 'attachment_map': {
173176
=== modified file 'plainbox/plainbox/impl/test_box.py'
--- plainbox/plainbox/impl/test_box.py 2013-02-26 14:55:20 +0000
+++ plainbox/plainbox/impl/test_box.py 2013-03-03 16:45:25 +0000
@@ -338,9 +338,9 @@
338 self.assertEqual(call.exception.args, (0,))338 self.assertEqual(call.exception.args, (0,))
339 expected = """339 expected = """
340 Each format may support a different set of options340 Each format may support a different set of options
341 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-json341 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
342 rfc822: with-io-log, squash-io-log, flatten-io-log, with-run-list, with-job-list, with-resource-map, with-job-defs, with-attachments342 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
343 text: with-io-log, squash-io-log, flatten-io-log, with-run-list, with-job-list, with-resource-map, with-job-defs, with-attachments343 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
344 """344 """
345 self.assertEqual(io.combined, cleandoc(expected) + "\n")345 self.assertEqual(io.combined, cleandoc(expected) + "\n")
346346

Subscribers

People subscribed via source and target branches