1401: Creating new review requests does not work

rud***@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Jan. 9, 2010
What version are you running?
1.1 alpha 2 (just upgraded from 1.0.5.1)

What's the URL of the page containing the problem?
https://*.com/r/new/

What steps will reproduce the problem?
1. Click on "New Review Request"
2. Select repository, base directory and diff
3. Click "Create Review Request"

What is the expected output? What do you see instead?
Expected: 
Once "Create Review Request" is clicked, I will be brought to the Review
summary screen. The diff should be uploaded and attached to my review request.

What I'm seeing:
Once "Create Review Request" is clicked, I am immediately redirected to the
"New Review Request" page (/r/new/, the page that I'm currently at). This
redirect happens immediately, it doesn't look like any communication is
happening with my SVN server. Following this, if I click on "All Review
Requests", I'll see that I just created a blank draft review. This review
has no diff attached. If I choose to attach a diff to that draft review,
everything works as expected.

What operating system are you using? What browser?
Repro'ed on OSX Firefox 3.0.14, Safari 4.0.3. Repro'd on Windows XP,
Firefox 3.0.14, IE7. All caches

Please provide any additional information below.
-Repository uses svn+ssh://
-lighttpd
-memcached
-sqlite3
-No email, LDAP set up.
#1 cama*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I'm also experiencing the same thing.  1.0alpha5, from Debian experimental.  Repo is
CVS.  Apache2's error log doesn't mention any problem that seems related:

/usr/lib/pymodules/python2.5/pygments/plugin.py:39: UserWarning: Module _mysql was
already imported from /usr/lib/pymodules/python2.5/_mysql.so, but
/usr/lib/pymodules/python2.5 is being added to sys.path
  import pkg_resources
WARNING:root:Generating diff file info for diffset id 36, filediff 542 took 12.525475
seconds
#2 rud***@gmai***** (Google Code) (Is this you? Claim this profile.)
I'm also not seeing anything in my log files.

Also, in the "What operating system" section above, I meant to say "All browser
caches were cleared after the RB upgrade".
chipx86
#3 chipx86
camaronut: 1.0 alpha 5 is quite ancient now, so we can't do any sort of support for it.

ruddct: Does post-review work? It's important to know if it's just the web UI, or
something more fundamental.

More than likely, it's related to svn+ssh. Did you set up this repository for svn+ssh
on 1.1 alpha 2, or 1.0.x?
  • +NeedInfo
#4 ramji******@gmai***** (Google Code) (Is this you? Claim this profile.)
Chirstian,

I am also getting the same error in my upgraded reviwboard. Mine is also 1.1 alpha 2
(upgraded from 1.0.5.1) and I have a huge data in the reviewboard server (since
reviewboard initial stages inception).

Once "Create Review Request" is clicked, I will be brought to the same New Review
Request screen with the Diff: column alone cleared value. This
redirect happens immediately. Following this, if I click on "My Dashboard", I'll see
that I just created a blank draft review in the outgoing request. When I click the
blank draft, there is no diff attached and I couldn't see any button where I could
click to see the view diff.


My suspicion:
Some database schema change may have resulted during upgrade which has impacted the
behaviour. Something is missing during the upgrade. 

Can you check and let me know how to fix this issue. Need help **urgent**
#5 ramji******@gmai***** (Google Code) (Is this you? Claim this profile.)
Attaching the schema for the comment #4 issue.
-Repository uses https:// (no auth required)
-lighttpd
-memcached
-mysql
-Email
-OS is opensuse 11.0
  • +
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    DROP TABLE IF EXISTS `accounts_profile`;
    CREATE TABLE IF NOT EXISTS `accounts_profile` (
      `id` int(11) NOT NULL auto_increment,
      `user_id` int(11) NOT NULL,
      `first_time_setup_done` tinyint(1) NOT NULL,
      `collapsed_diffs` tinyint(1) NOT NULL,
      `wordwrapped_diffs` tinyint(1) NOT NULL,
      `syntax_highlighting` tinyint(1) NOT NULL,
      `show_submitted` tinyint(1) NOT NULL,
      `sort_review_request_columns` varchar(256) NOT NULL,
      `sort_dashboard_columns` varchar(256) NOT NULL,
      `sort_submitter_columns` varchar(256) NOT NULL,
      `sort_group_columns` varchar(256) NOT NULL,
      `review_request_columns` varchar(256) NOT NULL,
      `dashboard_columns` varchar(256) NOT NULL,
      `submitter_columns` varchar(256) NOT NULL,
      `group_columns` varchar(256) NOT NULL,
      PRIMARY KEY  (`id`),
      UNIQUE KEY `user_id` (`user_id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=131 ;
    DROP TABLE IF EXISTS `accounts_profile_starred_gr
#6 ramji******@gmai***** (Google Code) (Is this you? Claim this profile.)
Any updates to this defect? Please look into this as this is an upgrade issue and
needs to be taken care. 

Tried clearing browser cache. Not working as expected.
#7 rud***@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86: I will check post-review and update the ticket with my results. I set up the
svn+ssh repository in a pre-1.0 build; it was not set up in 1.1
chipx86
#8 chipx86
Sorry, for whatever reason, we're no longer seeing e-mails on updates to tickets.

ramjisriram: Did you run `rb-site upgrade` on the new site?

Keep in mind that 1.1 alpha is an alpha version, and as such it may be prone to
problems like this. It's really best to make sure you've completely backed up your
database beforehand and are not using it for production servers.

If you use post-review to upload a diff, do you have the same problem?

Is there anything in the log files?
#9 rud***@gmai***** (Google Code) (Is this you? Claim this profile.)
Sorry it's taken me so long to get around to trying this using post-review. Results
are the same when using it. Nothing shows up in the logs.

desktop% post-review --server=https://localhost:8080
--repository-url=svn+ssh://SERVER/cpp/trunk/ --revision-range=1000:HEAD
==> Review Board Login Required
Enter username and password for Review Board at https://localhost:8080/
Username: USERNAME
Password: 
Error uploading diff: The file was not found in the repository (207)
Your review request still exists, but the diff is not attached.
chipx86
#10 chipx86
The key part is that the file wasn't found in the repository.

So, the problem you're hitting is that the repository URL is wrong. You don't want to
point it to trunk. It needs to point to the very root of the SVN server. Otherwise,
invalid path names will be generated.

When sending a diff, a base path (the path between the root of the repository and
current directory within the repository) is computed and sent along with the diff.
This is appended to the repository URL, and the filename in the diff is then appended
to this. If the repository URL is pointing to a subdirectory within the server, you
will hit these errors.
#11 rud***@gmai***** (Google Code) (Is this you? Claim this profile.)
The root of my svn server is "svn+ssh://svn@SERVER/cpp/". Is the "/cpp/" going to
cause problems?
chipx86
#12 chipx86
If that's the top level of the SVN repository, then that's fine. It's the top-level
of the repository that matters, not the website.
#13 rud***@gmai***** (Google Code) (Is this you? Claim this profile.)
Also, in what might be a related issue, any attempt to add or modify an svn+ssh
server results in the error "(110, 'Connection timed out')". Operations with this
server from other tools (command-line svn, etc) work as expected.

Is there some way I can manually override the server path without making a network
connection?
chipx86
#14 chipx86
No, there's no way to bypass this. We need to figure out why it's timing out.

One of the leading causes of support issues we encounter is people setting up their
repository wrong and not catching it until later. We added repository verification in
order to get around this. However, this is an alpha release, and isn't meant for
production servers yet, so it's quite possible to hit problems.

In particular, the SSH verification is absolutely essential, as we need to detect if
the host key has changed and to allow verification of the key. Otherwise, the SSH
operations would not work.
#15 rud***@gmai***** (Google Code) (Is this you? Claim this profile.)
Ahah. Other operations involving my svn server are working (uploading diffs, viewing
context, etc), so I don't think it's a configuration problem.

Latency to my SVN server is quite high (due to physical distance), and the server has
a large number of branches/revisions. When you add/edit a repository in RB, is there
some kind of scan of all revision numbers or branches that is done? Might the
combination of this in addition to high latency be the cause of my timeouts?
chipx86
#16 chipx86
Nope, all we do is attempt to make an SSH connection in order to check the key so
that we can verify it, and do an svn info on the repository. Both should work. I
don't know off-hand what's causing the timeout.

If you upgrade to last night's nightly, the log file should contain some more
information on the verification attempt.
#17 ramji******@gmai***** (Google Code) (Is this you? Claim this profile.)
Chipx86: I have done the upgrade steps as  mentioned in the admin guide. rb-site
upgrade was sucessful and the site was up and running. Was able to browse the old
review or add additional difs. 

The only number one blocking issues is that new-review request doesn't work as
expected (***AS THE WAY IT WORKS PRIOR TO UPGRADE****) I had a backup of DB and had
taken a PartImage of the machine before the upgrade. I had to restore back the image
and restore the db. There is no clue in the log file and right now I don't have one
since I restored the image. But from what I remember, when I posted a new review
request, it never redirected to the summary page, instead it had been on the same
page giving an illusing that nothing is working, but on the backend empty draft
reviews were getting generated without any diff files attached.
#18 ramji******@gmai***** (Google Code) (Is this you? Claim this profile.)
My repositories points till the trunk or till a branch, it is working well with
1.0.5.1, then why not in this 1.1 alpha 2?
chipx86
#19 chipx86
Without knowing what the failure is exactly, it's hard to say why. However, we never
officially supported pointing to anything but the top of the repository, and have
always advised people not to point to a branch or trunk. In the future we'll likely
explicitly tell the user it must be the root of the repository, or change it for
them. I'm surprised it ever worked for you if you pointed to trunk or a branch.

Keep in mind that the alphas are just that, alphas. They're not ready for production
usage yet.
#20 cmoh****@gmai***** (Google Code) (Is this you? Claim this profile.)
I'm experiencing the same problem. I changed my repository setting to point the root
of the repository, but still not working.
#21 cmoh****@gmai***** (Google Code) (Is this you? Claim this profile.)
I drilled down to reviewboard/reviews/forms.py, and found helpfull note from
stackoverflow.com. Check
http://stackoverflow.com/questions/1941812/django-error-got-multiple-values-for-keyword-argument.

A patch that works for me. It works with non-root repository setting, too.
---------------------------------------------------
*** forms.py.old        Sat Jan  9 03:07:30 2010
--- forms.py.new        Sat Jan  9 03:15:02 2010
***************
*** 211,218 ****
      requests.
      """
      def __init__(self, review_request, form_data=None, *args, **kwargs):
!         super(UploadDiffForm, self).__init__(review_request.repository,
!                                              form_data, *args, **kwargs)
          self.review_request = review_request
  
          if ('basedir' in self.fields and
--- 211,222 ----
      requests.
      """
      def __init__(self, review_request, form_data=None, *args, **kwargs):
!         if not form_data:
!             super(UploadDiffForm, self).__init__(review_request.repository,
!                                                  *args, **kwargs)
!         else:
!             super(UploadDiffForm, self).__init__(review_request.repository,
!                                                  form_data, *args, **kwargs)
          self.review_request = review_request
  
          if ('basedir' in self.fields and

---------------------------------------------------
chipx86
#22 chipx86
Hmm, is this against git master? Or a release? Because this should be fixed in the
nightlies.
#23 cmoh****@gmai***** (Google Code) (Is this you? Claim this profile.)
Against a release(1.1 alpha2).
chipx86
#24 chipx86
Sorry, I had forgotten previously that this bug was present in 1.1 alpha 2 and fixed.
Closing. A beta will be out before too long, but you can upgrade to the nightlies.
  • -NeedInfo
    +Fixed
  • -Priority-Medium
    +Priority-Critical
    +Milestone-Release1.5
    +Component-Reviews
  • +chipx86