jobs using dkms_info script use it incorrectly, tests fail to run

Bug #1455197 reported by Daniel Manrique
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Critical
Daniel Manrique

Bug Description

I got this while trying to produce a test run to write the dkms parser.

The jobs call the command like this:

id: device_package_info_attachment
plugin: attachment
command: dkms_info --format onelines

id: dkms_info_attachment
plugin: attachment
command: dkms_info --dkms --format dumps

However, dkms_info claims not to support those options:

    def register_arguments(self, parser):
        """Register command line arguments for dkms-info."""

        parser.add_argument(
            '--format', default="onelines",
            choices=["summary", "json"],
            help=("Choose output format type: "
                  "summary (one line per packages) "
                  "or json (json format, fully information)"))

        parser.add_argument(
            '--output', default=None,
            help=("Output filename to store the output date"))

For starters there's clearly a bug in the --format parameter, which defaults to "onelines" but then claims only "summary" and "json" are valid options. I think the default should be "summary".

Next, the jobs need fixing to use "summary" instead of "onelines" and "json" instead of "dumps".

Next, the --dkms parameter is not defined anywhere at all. I don't know what this parameter is supposed to do.

And then, other places in the script (docstrings, comments) where the old parameters are mentioned also need to be fixed.

I'll need to triage this as critical because we need to have it fixed by next week before we start rolling out tools to the KH2 people. Luckily it looks like an easy fix :)

Related branches

Daniel Manrique (roadmr)
Changed in plainbox-provider-checkbox:
assignee: nobody → Daniel Manrique (roadmr)
status: Triaged → In Progress
Zygmunt Krynicki (zyga)
Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
Changed in plainbox-provider-checkbox:
milestone: none → 0.21
Changed in plainbox-provider-checkbox:
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.