Merge lp://staging/~brendan-donegan/checkbox-certification/bug1185026 into lp://staging/checkbox-certification

Proposed by Brendan Donegan
Status: Merged
Approved by: Daniel Manrique
Approved revision: 596
Merged at revision: 594
Proposed branch: lp://staging/~brendan-donegan/checkbox-certification/bug1185026
Merge into: lp://staging/checkbox-certification
Diff against target: 291 lines (+3/-210)
2 files modified
bin/checkbox-certification-submit (+0/-208)
debian/changelog (+3/-2)
To merge this branch: bzr merge lp://staging/~brendan-donegan/checkbox-certification/bug1185026
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Brendan Donegan (community) Needs Resubmitting
Review via email: mp+166057@code.staging.launchpad.net

Description of the change

Updating the SubmissionParser to enable HEXR to parse the kernel version from the submission required adding a setKernelState function to the 'TestRun' interface. This was not done in checkbox-certification-submit and this caused a traceback as shown in the linked bug. The traceback occured in the 'parse_stream' function which is used by a large block of redundant code that sends 'messages' that the old certification site is able to handle. That site is gone and never coming back, so having this code around is just a nuisance.

This merge request removes all code that was used to do this, and leaves only the code required for proper functioning of the method of submitting used by the current certification site.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Lines 145-159 of the diff remove the ability to submit a file via stdin. The file-to-submit argument is now effectively mandatory, but this is not expressed in the arg parsing section, with the result that, if I call the script without a submission filename, I get a rather cryptic error:

$ bin/checkbox-certification-submit --hwid a00D000000Kkk5j
2013-05-28 11:56:27,057 INFO Preparing to submit results using Hardware ID: a00D000000Kkk5j
2013-05-28 11:56:27,058 INFO Preparing to upload submission via REST to https://certification.canonical.com/submissions/submit/
Traceback (most recent call last):
  File "bin/checkbox-certification-submit", line 153, in <module>
    sys.exit(main())
  File "bin/checkbox-certification-submit", line 125, in main
    with open(args.results_file, "rb") as submission_file:
TypeError: invalid file: None

This should be fixed somehow. I'm not sure the ability to pipe stdin to the script was used much, so the easiest way is to just make args.results_file mandatory, but I'm happy with other possible solutions.

review: Needs Fixing
596. By Brendan Donegan

Make results_file mandatory

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Make results_file mandatory instead of optional. No longer possible to pipe a submission file from stdin, but this was probably not used.

review: Needs Resubmitting
Revision history for this message
Daniel Manrique (roadmr) wrote :

+1 then, thanks!

review: Approve

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