Merge lp:~le-chi-thu/lava-dispatcher/rapport-result-submit-failures into lp:lava-dispatcher

Proposed by Le Chi Thu
Status: Merged
Merged at revision: 304
Proposed branch: lp:~le-chi-thu/lava-dispatcher/rapport-result-submit-failures
Merge into: lp:lava-dispatcher
Diff against target: 34 lines (+7/-3)
1 file modified
lava_dispatcher/job.py (+7/-3)
To merge this branch: bzr merge lp:~le-chi-thu/lava-dispatcher/rapport-result-submit-failures
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle (community) Approve
Review via email: mp+104353@code.launchpad.net

Description of the change

When the dispatcher fail to submit the test result, the error was not handle correctly and there is not logging so the summary page did not tell why the job not complete.

http://validation.linaro.org/lava-server/scheduler/job/17614

See the current error msg here.
http://validation.linaro.org/lava-server/scheduler/job/17614/log_file#entry26

To post a comment you must log in.
280. By Le Chi Thu <email address hidden> <email address hidden>

Synched with trunk and fix a typo error

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Huh, missed this. Sorry about that. Seems fine, I'll merge it -- with one tweak: I don't think we should trap the exception from submit_job, because we still want the dispatcher to exit with code 1 if the submit action fails.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lava_dispatcher/job.py'
--- lava_dispatcher/job.py 2012-05-08 22:03:24 +0000
+++ lava_dispatcher/job.py 2012-05-10 20:04:22 +0000
@@ -85,7 +85,7 @@
85 'items': {'type': 'string'},85 'items': {'type': 'string'},
86 'optional': True,86 'optional': True,
87 },87 },
88 }, 88 },
89 }89 }
9090
9191
@@ -143,7 +143,7 @@
143 if 'device_type' in self.job_data:143 if 'device_type' in self.job_data:
144 metadata['target.device_type'] = self.job_data['device_type']144 metadata['target.device_type'] = self.job_data['device_type']
145 self.context.test_data.add_metadata(metadata)145 self.context.test_data.add_metadata(metadata)
146 146
147 self.context.test_data.add_tags(self.tags)147 self.context.test_data.add_tags(self.tags)
148148
149 try:149 try:
@@ -190,7 +190,11 @@
190 params = submit_results.get('parameters', {})190 params = submit_results.get('parameters', {})
191 action = lava_commands[submit_results['command']](191 action = lava_commands[submit_results['command']](
192 self.context)192 self.context)
193 action.run(**params)193 try:
194 logging.info("Submiting the test result with parameters = %s", params)
195 action.run(**params)
196 except Exception as err:
197 logging.error("Failed to submit the test result. Error = %s", err)
194198
195 def _set_logging_level(self):199 def _set_logging_level(self):
196 # set logging level is optional200 # set logging level is optional

Subscribers

People subscribed via source and target branches