1091: Removing the bug tracker URL for a repository can break existing review requests

keithho*******@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
May 1, 2009
What version are you running?
1.02Beta5

What's the URL of the page containing the problem?
Click through a review from the dashboard

What steps will reproduce the problem?
1.  Create trac site
2.  Create a review that references (via bug #) that site
3.  Move the trac site to a new server (e.g. change the url)
4.  Click through the dashboard to the review.  
5.  Implode.

What is the expected output? What do you see instead?
The usual review.
The attached error report.

What operating system are you using? What browser?
Irrelevant.

Please provide any additional information below.
Abbreviated error report attached.

FYI, if you use sqlite on the command line to hack out the bug reference 
(UPDATE reviews_reviewrequest SET bugs_closed = '' WHERE id = something)
then the review works again (without the bug reference obviously).
chipx86
#1 chipx86
So your repository entry no longer includes any bug tracker URL? Is that the problem?

The failure is this:

     return review_request.repository.bug_tracker % bug_id
 TypeError: not all arguments converted during string formatting


So there's no longer a %s in the bug tracker field. We should probably catch this and
fail gracefully, but it could just represent a config error on your end.
  • +Confirmed
  • -Priority-Medium
    +Priority-Low
    +Milestone-Release1.0
    +Component-Reviews
    +EasyFix
  • +Removing the bug tracker URL for a repository can break existing review requests
#2 keithho*******@gmai***** (Google Code) (Is this you? Claim this profile.)
I guess I wasn't specific enough about what I thought should happen.

If via config error, relocating the bug tracker or whatever, a review's bug entry
gets corrupted, the review should still load.  E.g. fail gracefully.  I shouldn't
have to use sqlite on the command line to modify the database to get the review to
load again.  

BTW, we are enjoying using reviewboard but hope it continues to get better.
chipx86
#3 chipx86
Right. The breakage was just because the bug tracker URL in the Repository settings
in the admin UI was broken. It doesn't include the %s used to represent the bug
number. If you were to fix that entry, all the review requests would work again.

We can work around this error so you'll at least not get a crash, but it's a
configuration error on your end. There's nothing really tying a review request to a
bug tracker aside from that Bug Tracker URL field with the %s.
#4 keithho*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Hmm, not conveying my error very well.

Here's what happened:
1.  Set up reviewboard on ubuntu server.
2.  Pointed RB at separate SVN/Trac server
3.  Created some reviews and configured RB correctly to point at SVN/Trac server
4.  Used without problems.
...
5.  For unrelated reasons, moved SVN and Trac to RB server.
6.  Updated Admin config settings
7.  All existing reviews with bug tracker references broke.

...

I'm a moron.  I just figured out what you are saying.  When I updated the repository
references, I forgot to put %s on the end.  I'm opening a new bug to make that
textbox bigger :)  And closing this one.
#5 keithho*******@gmai***** (Google Code) (Is this you? Claim this profile.)
I guess I can't close this but you can go ahead.
chipx86
#6 chipx86
Fixed in r1942. We don't show exceptions in this case anymore.
  • -Confirmed
    +Fixed
  • +chipx86