requestsync --lp is crazy (opens multiple bug reports)

Bug #311289 reported by Adrien Cunin
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-launchpad-bugs
In Progress
High
Markus Korn
ubuntu-dev-tools (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: ubuntu-dev-tools

I just used requestsync --lp ngircd jaunty, and it opened 5 bug reports instead of one. I aborted when I noticed it was opening multiple bugs.

% requestsync --lp ngircd jaunty
Changes have been made to the package in Ubuntu.
Please edit the report and give an explanation.
Press ENTER to start your editor. Press Control-C to abort now.
Not saving the report file will abort the request, too.

Using cookie file at /home/adri2000/.lpcookie.txt
Summary:
Please sync ngircd 0.12.1-2 (universe) from Debian unstable (main).

Description:
Please sync ngircd 0.12.1-2 (universe) from Debian unstable (main).

Explanation of the Ubuntu delta and why it can be dropped:
Main Ubuntu change (/var/run/ foo) now is in Debian.
Other Ubuntu changes were trying to fix init script problems; starting with
0.12.1-1, the init script is a complete rewrite and should work better.

Changelog since current jaunty version 0.10.3-2ubuntu3:

ngircd (0.12.1-2) unstable; urgency=low

  * Create /var/run/ngircd/ when starting the daemon Closes: #507259
     -- Patch thanks to Adrien Cunin
  * Add myself to Uploaders

 -- Matt Arnold <email address hidden> Tue, 23 Dec 2008 11:54:00 -0500

ngircd (0.12.1-1) unstable; urgency=low

  * New upstream release (Closes: #465815, #466063).
  * Maintainer set to Debian IRC Team.
  * Added Vcs-* fields in debian/control.
  * Added Homepage field in debian/control.
  * Removed Homepage from description field in debian/control.
  * Bumped policy version to 3.8.0.
  * Enabled syslog (Closes: #452028).
  * New init-script derived from actual dh-templates. (Closes: #478338).

 -- Mario Iseli <email address hidden> Sat, 13 Sep 2008 16:47:32 +0200

Do you want to edit the report before sending [y/N]? Press Control-C to abort.

^CTraceback (most recent call last):
  File "/usr/bin/requestsync", line 536, in <module>
    if post_bug(srcpkg, subscribe, mapping[status], title, report):
  File "/usr/bin/requestsync", line 380, in post_bug
    bug = Bug.New(product = product, summary = bugtitle, description = bugtext)
  File "/usr/lib/python2.5/site-packages/launchpadbugs/connector.py", line 112, in New
    return getattr(self.module, "create_new_bugreport")(connection=self.connection, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/launchpadbugs/html_bug.py", line 1488, in create_new_bugreport
    result = connection.post(url, args)
  File "/usr/lib/python2.5/site-packages/launchpadbugs/http_connection.py", line 256, in post
    return self._safe_urlopen(url, data, True)
  File "/usr/lib/python2.5/site-packages/launchpadbugs/http_connection.py", line 308, in _safe_urlopen
    sock = opener.open(url,data)
  File "/usr/lib/python2.5/urllib2.py", line 387, in open
    response = meth(req, response)
  File "/usr/lib/python2.5/urllib2.py", line 498, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.5/urllib2.py", line 419, in error
    result = self._call_chain(*args)
  File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.5/urllib2.py", line 582, in http_error_302
    return self.parent.open(new)
  File "/usr/lib/python2.5/urllib2.py", line 381, in open
    response = self._open(req, data)
  File "/usr/lib/python2.5/urllib2.py", line 399, in _open
    '_open', req)
  File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.5/urllib2.py", line 1115, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.5/urllib2.py", line 1079, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/usr/lib/python2.5/httplib.py", line 866, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.5/httplib.py", line 889, in _send_request
    self.endheaders()
  File "/usr/lib/python2.5/httplib.py", line 860, in endheaders
    self._send_output()
  File "/usr/lib/python2.5/httplib.py", line 732, in _send_output
    self.send(msg)
  File "/usr/lib/python2.5/httplib.py", line 699, in send
    self.connect()
  File "/usr/lib/python2.5/httplib.py", line 1134, in connect
    sock.connect((self.host, self.port))
^C File "<string>", line 1, in connect
zsh: exit 1 requestsync --lp ngircd jaunty

The sync request in question is bug #311282 and its duplicates are marked as such.

Revision history for this message
Adrien Cunin (adri2000) wrote :

Forgot to mention that this is using ubuntu-dev-tools 0.46 on intrepid, although anyway it seems requestsync hasn't changed much since.

Changed in ubuntu-dev-tools:
importance: Undecided → High
Revision history for this message
Markus Korn (thekorn) wrote :

the problem is in launchpadbugs.HTTPConnection._safe_urlopen()
This is requesting a page up to five times if an urllib2.URLError is raised.

Changed in python-launchpad-bugs:
assignee: nobody → thekorn
importance: Undecided → High
status: New → In Progress
Revision history for this message
Markus Korn (thekorn) wrote :

This is a reproducer for launchpadlib and raw http requests (run it like python reproducer.py LOGINEMAIL PASSWORD)

The problem seems to be the slowness of launchpad. After creating a bugreport the page for this new bugreport is not available instantaneous, so trying to read this new page raises an HTTPError. This has never been a problem before and depends on the length of the text in the description.

However this should *never* result in creating 5 new bugreports.

Revision history for this message
Markus Korn (thekorn) wrote :

fixed reproducer, this is not reproducible on staging

Revision history for this message
Markus Korn (thekorn) wrote :

another important fact: in comment #3 it has to be "...This is a reproducer for launchpadbugs and ..."

Revision history for this message
Jonathan Davies (jpds) wrote :

I've added sleep's to the --lp reporting tool in requestsync, this appears to fix the bug (see bug #313208).

I've commited and pushed it as of revision 251 on lp:ubuntu-dev-tools.

Changed in ubuntu-dev-tools:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-dev-tools - 0.51

---------------
ubuntu-dev-tools (0.51) jaunty; urgency=low

  * buildd: Added checks for arch-indep packages and packages which have no
    builds in a release.
  * hugdaylist: String improvements.
  * requestsync:
    - Use optparse instead of getopt for option parsing.
    - Skip existing bug report check if python-launchpad-bugs is not
      installed.
    - Implemented sleeps to --lp bug reporting in case of a slow
      Launchpad to stop mass bug filing (LP: #311289).

 -- Jonathan Davies <email address hidden> Tue, 30 Dec 2008 15:51:55 +0000

Changed in ubuntu-dev-tools:
status: Fix Committed → Fix Released
Revision history for this message
Onkar Shinde (onkarshinde) wrote :

Any chance for this fix to enter intrepid-updates?

Revision history for this message
Jonathan Davies (jpds) wrote :

This bug is too small for intrepid-updates. But you are more than welcome to grab it from the Bazaar branch with: bzr branch lp:ubuntu-dev-tools - I generally try to keep the trunk as stable as possible.

Revision history for this message
Jonathan Davies (jpds) wrote :

Scrub that last, you should be able to install the resulting binary package available from:

https://launchpad.net/ubuntu/jaunty/i386/ubuntu-dev-tools/0.51

...all the needed dependencies are in intrepid. So installation shouldn't be a problem.

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.