Crash occurs at the very end of canonical-certification-server run complaining of "Unsupported Option: with sys-info"

Bug #1302685 reported by Kent Baxley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Fix Released
High
Daniel Manrique

Bug Description

The canonical-certification-server tests crash with the following traceback at the very end, just as it tries to write the html and xml results files:

http://pastebin.ubuntu.com/7203806/

checkbox-ng 0.3-dev+bzr2871+pkg1~ubuntu14.04.1
plainbox-provider-certification-server 0.1-dev+bz42871+pkg4~ubuntu14.04.1

Related branches

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

THanks! The culprit is checkbox_ng/commands/cli.py. It creates a list of exporters to save the report in various formats (code trimmed for brevity, look at the actual file for context):

        exporter_list = [XMLSessionStateExporter, HTMLSessionStateExporter]
        exporter_list.append(XLSXSessionStateExporter)

Then it initializes them all with the same set of options:
        for exporter_cls in exporter_list:
            # Options are only relevant to the XLSX exporter
            exporter = exporter_cls(
                ['with-sys-info', 'with-summary', 'with-job-description',
                 'with-text-attachments'])

This is relying on the old behavior of XML and HTML exporters not supporting (and thus ignoring) options to the constructor.

Recently the XML exporter started supporting a single option, so it no longer ignores the parameter to the constructor. Since at least one of the options passed here (['with-sys-info']) is unsupported by the xml exporter, this causes the crash you see.

Exporters already know how to reject unknown options (which is what happens here), so the fix is to change this instance (and possibly others; I'll hunt down any offenders) so they don't send unsupported options to exporters.

Changed in plainbox:
status: New → In Progress
assignee: nobody → Daniel Manrique (roadmr)
importance: Undecided → High
affects: plainbox → checkbox-ng
Changed in checkbox-ng:
assignee: Daniel Manrique (roadmr) → nobody
Daniel Manrique (roadmr)
Changed in checkbox-ng:
assignee: nobody → Daniel Manrique (roadmr)
milestone: none → 0.3
Zygmunt Krynicki (zyga)
Changed in checkbox-ng:
status: In Progress → Fix Committed
Zygmunt Krynicki (zyga)
Changed in checkbox-ng:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.