2179: post-review hangs when using "publish" flag.

stefan.lo*********@gmai***** (Google Code) (Is this you? Claim this profile.)
Jan. 21, 2014
What version are you running?
ReviewBoard 1.6 RC1, RBTools-dev (bf3a034)

What's the URL of the page containing the problem?
N/A

What steps will reproduce the problem?
1. Run post-commit tool with "--publish" and "--debug" flags.

What is the expected output? What do you see instead?
Debug output will hang indefinitely after ">>> Publishing; >>> HTTP PUTting to http://xxx/api/review-requests/yyy/draft/: {'public': 1}"

What operating system are you using? What browser?
Server: Ubuntu 10.04 32-bit Server Edition

Please provide any additional information below.
It looks like that after post-review makes a PUT request, sending {'public': 1} to /api/review-requests/yyy/draft/, that the API is waiting for a response from /draft/ but it no longer exists. A temporary fix includes changing the following in postreview.py (lines ~1020). Note the use of a timeout in urlopen() and running http_get on /api/review-requests/yyy/. This appears to work.

        try:
            r = HTTPRequest(url, body, headers, method='PUT')
            data = urllib2.urlopen(r, timeout=10).read()
            self.cookie_jar.save(self.cookie_file)
            return data
        except urllib2.HTTPError, e:
            # Re-raise so callers can interpret it.
            raise e
        except urllib2.URLError, e:
            if 'public' in fields.keys():
                return self.http_get(url[0:-6])
            try:
                debug(e.read())
            except AttributeError:
                pass
david
#1 david
  • +Component-RBTools
david
#2 david
This is a quite old bug, and -p definitely works in both post-review and rbt post.
  • +Fixed