fails to parse subscribers on edge

Bug #327620 reported by Colin Watson
4
Affects Status Importance Assigned to Milestone
python-launchpad-bugs
Fix Released
High
Markus Korn

Bug Description

Using r175 of lp:~bughelper-dev/python-launchpad-bugs/main, parsing a bug's subscriber list fails as follows:

Traceback (most recent call last):
  File "/home/lp_archive/bin/sru-accept", line 34, in <module>
    bug.subscribers.add('ubuntu-sru')
  File "/home/lp_archive/python/launchpadbugs/lphelper.py", line 256, in <lambda>
    if fget : fget = lambda s, n=fget.__name__ : getattr(s, n)()
  File "/home/lp_archive/python/launchpadbugs/html_bug.py", line 81, in func
    x.parse()
  File "/home/lp_archive/python/launchpadbugs/html_bug.py", line 1033, in parse
    parse_error(False, "Subscribers.__xml.edge.stable", xml=self.__xml, url=self.__url)
  File "/home/lp_archive/python/launchpadbugs/exceptions.py", line 220, in parse_error
    raise PythonLaunchpadBugsXMLParsingError(path, xml, url)
launchpadbugs.exceptions.PythonLaunchpadBugsXMLParsingError: Wrong XPath-Expr while parsing Subscribers.__xml.edge.stable (https://bugs.edge.launchpad.net/ubuntu/+source/hal-info/+bug/295251)

Here's the serialised XML that it's trying to parse. Looks like python-launchpad-bugs doesn't know about the content-link stuff?

<div class="portlet" id="portlet-subscribers">
  <div class="section">
    <div><a style="
      background: url(/@@/edit) center left no-repeat;
      line-height: 20px;
      padding-left: 18px" href="https://bugs.edge.launchpad.net/ubuntu/+source/hal-info/+bug/295251/+subscribe" class="menu-link-subscription">Subscribe/Unsubscribe</a></div>
    <div><a style="
      background: url(/@@/add) center left no-repeat;
      line-height: 20px;
      padding-left: 18px" href="https://bugs.edge.launchpad.net/ubuntu/+source/hal-info/+bug/295251/+addsubscriber" class="menu-link-addsubscriber">Subscribe someone else</a></div>
  </div>
  <a id="subscribers-content-link" href="/bugs/295251/+bug-portlet-subscribers-content"></a>
  <div id="subscribers-portlet-spinner" style="text-align: center; display: none">
    <img src="/@@/spinner"></div>
  <script type="text/javascript">
    YUI().use('io-base', 'node', function(Y) {
      Y.on('domready', function() {
        Y.get('#subscribers-portlet-spinner').setStyle('display', 'block');

        function hide_spinner() {
          Y.get('#subscribers-portlet-spinner').setStyle('display', 'none');
        }

        function on_success(transactionid, response, arguments) {
          hide_spinner();
          var portlet = Y.get('#portlet-subscribers');
          portlet.set('innerHTML',
                      portlet.get('innerHTML') + response.responseText);
        }

        var config = {on: {success: on_success,
                           failure: hide_spinner}};
        var url = Y.get('#subscribers-content-link').getAttribute('href').replace('bugs.', '');
        Y.io(url, config);
      });
    });
  </script></div>

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

I think this is fixed in the attached branch, but I will need to do some additional testing tomorrow morning to ensure that this works on stable, edge and staging

Markus

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

I merged that branch into the apport retracer on ronne, and can confirm that it works well on production (it doesn't use edge).

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

------------------------------------------------------------
revno: 176
committer: Markus Korn <email address hidden>
branch nick: main
timestamp: Fri 2009-02-27 08:35:20 +0100
message:
  fixed parsing of subscriptions on edge.launchpad.net, edge is now using
  javascript requests to get the subscribers for a bug. This fix results
  in an additional HTTPS request by python-launchpad-bugs (LP: #327620)
    ------------------------------------------------------------

Changed in python-launchpad-bugs:
status: In Progress → Fix Committed
Markus Korn (thekorn)
Changed in python-launchpad-bugs:
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.