Diff for "Foundations/Webservice/apport"

Not logged in - Log In / Register

Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2010-03-18 20:08:44
Size: 4686
Editor: gary
Comment:
Revision 4 as of 2019-05-28 23:58:01
Size: 5715
Editor: cjwatson
Comment: launchpad.dev → launchpad.test
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
raw text from an email by Diogo Matsubara: = Condensed version =

The original raw text of Diogo Matsubara's email is below.

First make sure your local Launchpad is listening on launchpad.test.

Next check out Apport, hack it to report to the local Launchpad and report a
bug in Evolution:

{{{
    $ bzr branch lp:apport trunk
    $ cd trunk
    $ perl -e "s/launchpad\.net/launchpad.test/g;" -pi $(find . -type f)
    $ cp backends/packaging-apt-dpkg.py apport/packaging_impl.py
    $ PYTHONPATH=. python bin/apport-cli evolution
}}}

When prompted, press "S" to send the bug data, watch for a POST to your local
Launchpad instance.

Then press 1 to navigate to the displayed URL or copy/paste it into your
browser. The page will continue to refresh until a background job is done.
To execute the background job run the below in your Launchpad buildout:

{{{
    $ bin/py cronscripts/process-apport-blobs.py
}}}

Continue with the bug reporting procedure until completed and you verify that
the gathered details about your environment are include in the bug report.


= Raw text from an email by Diogo Matsubara =
Line 7: Line 39:
{{{
Line 9: Line 41:
}}}
Line 11: Line 44:
https://launchpad.dev). My modifications are here: https://launchpad.test). My modifications are here:
Line 16: Line 49:
{{{
Line 19: Line 52:
   *** Collecting problem information

   
The collected information can be sent to the developers to improve the
   application. This might take a few minutes.
   Traceback (most recent call last):
    File "bin/apport-cli", line 404, in <module>
       if not app.run_argv():
     File "/usr/lib/python2.5/site-packages/apport/ui.py", line 435,
in run_argv
   return self.run_report_bug()
    File "/usr/lib/python2.5/site-packages/apport/ui.py", line 345,
in run_report_bug
  
self.collect_info(symptom_script)
    File "/usr/lib/python2.5/site-packages/apport/ui.py", line 596,
in collect_info
  
hookui.process_event()
    File "/usr/lib/python2.5/site-packages/apport/ui.py", line 1099,
in process_event
   if not self._request_event.is_set():
   AttributeError: '_Event' object has no attribute 'is_set'
   Exception exceptions.KeyboardInterrupt in <module 'threading' from
'/usr/lib/python2.5/threading.pyc'> ignored
*** Collecting problem information
The collected information can be sent to the developers to improve the
application. This might take a few minutes.
Traceback (most recent call last):
  File "bin/apport-cli", line 404, in <module>
    if not app.run_argv():
  File "/usr/lib/python2.5/site-packages/apport/ui.py", line 435, in run_argv
     return self.run_report_bug()
  File "/usr/lib/python2.5/site-packages/apport/ui.py", line 345, in run_report_bug
self.collect_info(symptom_script)
  File "/usr/lib/python2.5/site-packages/apport/ui.py", line 596, in collect_info
hookui.process_event()
  File "/usr/lib/python2.5/site-packages/apport/ui.py", line 1099, in process_event
     if not self._request_event.is_set():
AttributeError: '_Event' object has no attribute 'is_set'
Exception exceptions.KeyboardInterrupt in <module 'threading' from '/usr/lib/python2.5/threading.pyc'> ignored
}}}
Line 43: Line 70:
{{{
Line 45: Line 72:
}}}
Line 49: Line 76:
alias py='~/devel/canonical/lp-branches/trunk/bin/py' {{{
   
alias py='~/devel/canonical/lp-branches/trunk/bin/py'
}}}
Line 58: Line 87:
{{{
Line 60: Line 89:
}}}
Line 63: Line 92:
{{{
matsubara@tancho [..al/apport/trunk]$ py bin/apport-cli evolution
Line 64: Line 95:
   matsubara@tancho [..al/apport/trunk]$ py bin/apport-cli evolution *** Collecting problem information
Line 66: Line 97:
   *** Collecting problem information The collected information can be sent to the developers to improve the
application. This might take a few minutes.
....................................................
Line 68: Line 101:
   The collected information can be sent to the developers to improve the
   application. This might take a few minutes.
   ....................................................
*** Send problem report to the developers?
Line 72: Line 103:
   *** Send problem report to the developers? After the problem report has been sent, please fill out the form in the
automatically opened web browser.
Line 74: Line 106:
   After the problem report has been sent, please fill out the form in the
   automatically opened web browser.
What would you like to do? Your options are:
  S: Send report (10.0 KiB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  C: Cancel
Please choose (S/V/K/C):s
Line 77: Line 113:
   What would you like to do? Your options are:
     S: Send report (10.0 KiB)
     V: View report
     K: Keep report file for sending later or copying to somewhere else
     C: Cancel
   Please choose (S/V/K/C):s
*** Uploading problem information
Line 84: Line 115:
   *** Uploading problem information The collected information is being sent to the bug tracking system.
This might take a few minutes.
47%
Line 86: Line 119:
   The collected information is being sent to the bug tracking system.
   This might take a few minutes.
   47%
*** To continue, you must visit the following URL:
Line 90: Line 121:
   *** To continue, you must visit the following URL:   https://bugs.launchpad.net/ubuntu/+source/evolution/+filebug/4OuaJfadfrsyJgHAYVFrSRz2xY1?
Line 92: Line 123:
     https://bugs.launchpad.net/ubuntu/+source/evolution/+filebug/4OuaJfadfrsyJgHAYVFrSRz2xY1?

   
You can launch a browser now, or copy this URL into a browser on
You can launch a browser now, or copy this URL into a browser on
Line 97: Line 126:

   
Choices:
    1: Launch a browser now
     C: Cancel
   Please choose (1/C):
Choices:
  1: Launch a browser now
  C: Cancel
Please choose (1/C):
}}}
Line 105: Line 133:

   127.0.0.1 - "127.0.0.88" "launchpad.dev" [18/Mar/2010:15:40:53
-0200] "POST /+storeblob HTTP/1.1" 200 14941 13 0.165343046188 25 586
"Anonymous" "RootObject:+storeblob" "" "Python-urllib/2.5"
{{{
   127.0.0.1 - "127.0.0.88" "launchpad.test" [18/Mar/2010:15:40:53-0200] "POST /+storeblob HTTP/1.1" 200 14941 13 0.165343046188 25 586 "Anonymous" "RootObject:+storeblob" "" "Python-urllib/2.5"
}}}
Line 113: Line 139:

   https://bugs.launchpad.dev/ubuntu/+source/evolution/+filebug/4OuaJfadfrsyJgHAYVFrSRz2xY1?
{{{
   https://bugs.launchpad.test/ubuntu/+source/evolution/+filebug/4OuaJfadfrsyJgHAYVFrSRz2xY1?
}}}
Line 117: Line 144:
{{{
Line 120: Line 147:
}}}
Line 122: Line 150:
{{{
Line 123: Line 152:
   2010-03-18 18:46:45 INFO creating lockfile
   2010-03-18 18:47:05 INFO Running synchronously.
   2010-03-18 18:47:06 INFO Ran 1 IProcessApportBlobJobSource jobs.
   2010-03-18 18:47:06 INFO 0 IProcessApportBlobJobSource jobs did
not complete.
}}}
the output:
{{{
2010-03-18 18:46:45 INFO creating lockfile
2010-03-18 18:47:05 INFO Running synchronously.
2010-03-18 18:47:06 INFO Ran 1 IProcessApportBlobJobSource jobs.
2010-03-18 18:47:06 INFO 0 IProcessApportBlobJobSource jobs did not complete.
}}}
Line 130: Line 162:
{{{
Line 132: Line 164:
}}}

Condensed version

The original raw text of Diogo Matsubara's email is below.

First make sure your local Launchpad is listening on launchpad.test.

Next check out Apport, hack it to report to the local Launchpad and report a bug in Evolution:

    $ bzr branch lp:apport trunk
    $ cd trunk
    $ perl -e "s/launchpad\.net/launchpad.test/g;" -pi $(find . -type f)
    $ cp backends/packaging-apt-dpkg.py apport/packaging_impl.py
    $ PYTHONPATH=. python bin/apport-cli evolution

When prompted, press "S" to send the bug data, watch for a POST to your local Launchpad instance.

Then press 1 to navigate to the displayed URL or copy/paste it into your browser. The page will continue to refresh until a background job is done. To execute the background job run the below in your Launchpad buildout:

    $ bin/py cronscripts/process-apport-blobs.py

Continue with the bug reporting procedure until completed and you verify that the gathered details about your environment are include in the bug report.

Raw text from an email by Diogo Matsubara

Here are the steps I took to test bug https://bugs.edge.launchpad.net/ubuntu/+source/apport/+bug/538097

First I got a copy of apport trunk:

   $ bzr branch lp:apport trunk

then I modified it a little bit so it'd use the local LP instance (i.e. https://launchpad.test). My modifications are here: https://pastebin.canonical.com/29396/

Notice that I had to change apport to use isSet() instead of is_set() as I was getting this traceback:

   $ py bin/apport-cli bash

*** Collecting problem information
The collected information can be sent to the developers to improve the
application. This might take a few minutes.
Traceback (most recent call last):
  File "bin/apport-cli", line 404, in <module>
    if not app.run_argv():
  File "/usr/lib/python2.5/site-packages/apport/ui.py", line 435, in run_argv
     return self.run_report_bug()
  File "/usr/lib/python2.5/site-packages/apport/ui.py", line 345, in run_report_bug
     self.collect_info(symptom_script)
  File "/usr/lib/python2.5/site-packages/apport/ui.py", line 596, in collect_info
     hookui.process_event()
  File "/usr/lib/python2.5/site-packages/apport/ui.py", line 1099, in process_event
     if not self._request_event.is_set():
AttributeError: '_Event' object has no attribute 'is_set'
Exception exceptions.KeyboardInterrupt in <module 'threading' from '/usr/lib/python2.5/threading.pyc'> ignored

I also had to:

   $ cp backends/packaging-apt-dpkg.py apport/packaging_impl.py

to avoid an import error. This is something done by apport's setup.py

I ran apport-cli with py which is a bash alias to:

   alias py='~/devel/canonical/lp-branches/trunk/bin/py'

I then modified bin/py to include the local apport trunk (i.e. /home/matsubara/devel/canonical/apport/trunk)

Now that everything is set up, I did make run on LP trunk, using lp:~leonardr/launchpad/529348-fix revno: 9097

and then, on another terminal:

   $ py bin/apport-cli evolution

I used evolution because that's a sourcepackage already in local LP's sample data.

matsubara@tancho [..al/apport/trunk]$ py bin/apport-cli evolution

*** Collecting problem information

The collected information can be sent to the developers to improve the
application. This might take a few minutes.
....................................................

*** Send problem report to the developers?

After the problem report has been sent, please fill out the form in the
automatically opened web browser.

What would you like to do? Your options are:
  S: Send report (10.0 KiB)
  V: View report
  K: Keep report file for sending later or copying to somewhere else
  C: Cancel
Please choose (S/V/K/C):s

*** Uploading problem information

The collected information is being sent to the bug tracking system.
This might take a few minutes.
47%

*** To continue, you must visit the following URL:

  https://bugs.launchpad.net/ubuntu/+source/evolution/+filebug/4OuaJfadfrsyJgHAYVFrSRz2xY1?

You can launch a browser now, or copy this URL into a browser on
another computer.

Choices:
  1: Launch a browser now
  C: Cancel
Please choose (1/C):

I got the following on the the make run terminal:

   127.0.0.1 - "127.0.0.88" "launchpad.test" [18/Mar/2010:15:40:53-0200] "POST /+storeblob HTTP/1.1" 200 14941 13 0.165343046188 25 586 "Anonymous" "RootObject:+storeblob" "" "Python-urllib/2.5"

which indicates apport POSTed to the right place.

Then I hacked the URL to:

   https://bugs.launchpad.test/ubuntu/+source/evolution/+filebug/4OuaJfadfrsyJgHAYVFrSRz2xY1?

and opened it on my browser. I got the following message:

   "Please wait while bug data is processed. This page will refresh every 10
   seconds until processing is complete."

I ran:

   $ py cronscripts/process-apport-blobs.py

the output:

2010-03-18 18:46:45 INFO    creating lockfile
2010-03-18 18:47:05 INFO    Running synchronously.
2010-03-18 18:47:06 INFO    Ran 1 IProcessApportBlobJobSource jobs.
2010-03-18 18:47:06 INFO    0 IProcessApportBlobJobSource jobs did not complete.

On the next refresh I got the regular file bug page with the message:

   Extra debug information will be added to the bug report automatically.

I continued and successfully reported the bug. The data gathered by apport was included in the reported bug.

That was it. It looks like apport works with Leonard's branch. Let me know if you need further testing or if you want me to change something in this procedure.

Foundations/Webservice/apport (last edited 2019-05-28 23:58:01 by cjwatson)