add checkbox submission reference

Bug #379393 reported by Martin Pitt
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Invalid
Wishlist
Martin Pitt
checkbox (Ubuntu)
Fix Released
Medium
David Murphy

Bug Description

Binary package hint: apport

Apport bugs should include a reference to the hw database, as currently submitted by checkbox.

Questions:
 - Where to get the submission ID from?
 - How to link a bug report to a hwdb entry? (If that's not possible, we'll just include the verbatim ID into the description field)

Martin Pitt (pitti)
Changed in apport (Ubuntu):
status: New → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Abel writes:

-------- 8< ------------

Finally, Launchpad is able to link bugs and hardware profiles via the LP webservice API.

If bug is a launchpadlib object representing a bug, and if hwsubmission is the launchpadlib representation of a hardware report in Launchpad, call

    bug.linkHWSubmission(hwsubmission)

to link the bag und the hardware report.

You can create the hwsubmission object by calling

    hwsubmission = lp.load('https://api.edge.launchpad.net/beta/+hwdb/+submission/%s' % submission_key)

where submission_key is the unique ID provided by checkbox in the field "field.submission_key" when it uploads the hardware report via https://launchpad.net/+hwdb/+submit .

So, apport can now create these links between bugs and and hardware reports -- if it knows the submission_key.

IIRC the problem remains that checkbox does not store at present submission_key on the user's machine.

----------------- 8< --------------------

Changed in apport (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Opening checkbox task. Once checkbox stores the submission key somewhere, please tell me here, then I'll add this in apport.

Changed in checkbox (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
David Murphy (schwuk)
Changed in checkbox (Ubuntu):
assignee: nobody → Dave Murphy (schwuk)
milestone: none → karmic-alpha-3
Marc Tardif (cr3)
Changed in checkbox (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

So how do I get the submission reference nowadays?

Changed in apport (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
David Murphy (schwuk) wrote :

Martin,

With the new version of Checkbox, two files are written to $XDG_CACHE_HOME/checkbox - submission and system. These are plaintext files containing the respective IDs generated during the last run of checkbox. If they're not there, Checkbox has never been run.

Martin Pitt (pitti)
Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Wishlist
status: Incomplete → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Sorry, it just occurred to me that in the general case we can't link the hwdb submission key, we can just add the key value to the description field. This is because Apport's job ends with opening a browser window to file a bug, and never gets back the ID.

So either developers need to grab the key and fetch the corresponding hwdb object manually, or LP needs to be extended to accept a checkbox submission key in the +storeblob area (in the MIME headers, similar to the Private:, Subscribers:, and Tags: fields). The latter would obviously be preferrable, but needs further changes in LP.

Abel, what do you think?

For now I'll just add the reference key to the description.

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, and adding the actual key is already done by /usr/share/apport/general-hooks/checkbox.py, so there's nothing to do in Apport right now. I'll reopen this if/when LP extends the +storeblob API accordingly.

Thanks all!

Changed in apport (Ubuntu):
status: In Progress → Invalid
Revision history for this message
Abel Deuring (adeuring) wrote : Re: [Bug 379393] Re: add checkbox submission reference

On 03.09.2009 20:09, Martin Pitt wrote:
> Sorry, it just occurred to me that in the general case we can't link the
> hwdb submission key, we can just add the key value to the description
> field. This is because Apport's job ends with opening a browser window
> to file a bug, and never gets back the ID.
>
> So either developers need to grab the key and fetch the corresponding
> hwdb object manually, or LP needs to be extended to accept a checkbox
> submission key in the +storeblob area (in the MIME headers, similar to
> the Private:, Subscribers:, and Tags: fields). The latter would
> obviously be preferrable, but needs further changes in LP.
>
> Abel, what do you think?
>
> For now I'll just add the reference key to the description.
>

I think adding a header like

 HWDB-Submission: submission-key

is fine. (Actually, a user might have run checkbox more than once on a
machine, so we should also allow

 HWDB-Submission: submission-key, submission-key...

)

I opened bug 424382 for the Launchpad side.

> Ah, and adding the actual key is already done by /usr/share/apport
> /general-hooks/checkbox.py, so there's nothing to do in Apport right
> now. I'll reopen this if/when LP extends the +storeblob API accordingly.

Not sure what this means. Do we already have they submission keys
somewhere in the data sent by Apport to +storeblob?

Revision history for this message
Martin Pitt (pitti) wrote :

Abel Deuring [2009-09-04 15:07 -0000]:
> HWDB-Submission: submission-key
> I opened bug 424382 for the Launchpad side.

Thanks! Added Apport task and subscribed.

> > Ah, and adding the actual key is already done by /usr/share/apport
> > /general-hooks/checkbox.py, so there's nothing to do in Apport right
> > now. I'll reopen this if/when LP extends the +storeblob API accordingly.
>
> Not sure what this means. Do we already have they submission keys
> somewhere in the data sent by Apport to +storeblob?

I meant that apport bugs already have the submission reference in the
description, so if someone wants to, he can fetch it from LP manually.

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.