Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-19 Thread 'Rob Backhurst' via reviewboard
Just to add, the index completed on our test system - thanks all for you help with this. Christian, do you know when this fix will be in a released version? Also, this may need a separate case so please let me know if you would rather I do that... What is the intended behaviour of the search?

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-18 Thread 'Rob Backhurst' via reviewboard
Yep thanks, index looks to be running now. Hopefully it will get to the end this time - if so I'll make the same change on our live system. Cheers Rob On Wednesday, 18 October 2017 14:42:55 UTC+1, Erik Johansson wrote: > > I'm guessing the if statement should be "if not ..." (i.e. not is

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-18 Thread Erik Johansson
I'm guessing the if statement should be "if not ..." (i.e. not is missing). // Erik On Oct 18, 2017 12:44, "'Rob Backhurst' via reviewboard" < reviewboard@googlegroups.com> wrote: Hi Chris, Ah yes sorry missed that...I have added it in but I get the same error though. 81 #

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-18 Thread 'Rob Backhurst' via reviewboard
Hi Chris, Ah yes sorry missed that...I have added it in but I get the same error though. 81 # Check for `__` in the field for looking through the relation. 82 attrs = self.model_attr.split('__') 83 current_object = obj 84 85

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-18 Thread Christian Hammond
Hi Rob, That doesn't include the code I mentioned in my previous e-mail. Note the standalone 'hasattr' call on the line preceding the if statement. The workaround is to call that in a standalone way to prime a cache and avoid the error. Christian On Tue, Oct 17, 2017 at 1:17 AM, 'Rob Backhurst'

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-17 Thread 'Rob Backhurst' via reviewboard
77 # Give priority to a template. 78 if self.use_template: 79 return self.prepare_template(obj) 80 elif self.model_attr is not None: 81 # Check for `__` in the field for looking through the relation. 82

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-16 Thread Christian Hammond
Can you show me all the code within about 5 lines of your modification? Christian On Mon, Oct 16, 2017 at 18:01 'Rob Backhurst' via reviewboard < reviewboard@googlegroups.com> wrote: > Hi Christian, > > It crashes straight away with this error... > > Removing all documents from your index

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-16 Thread 'Rob Backhurst' via reviewboard
Hi Christian, It crashes straight away with this error... Removing all documents from your index because you said so. All documents removed. Indexing 558 users ERROR:root:Error updating auth using default Traceback (most recent call last): File

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-16 Thread 'Rob Backhurst' via reviewboard
Hi Christian, It crashes straight away with this error... Removing all documents from your index because you said so. All documents removed. Indexing 558 users ERROR:root:Error updating auth using default Traceback (most recent call last): File

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-16 Thread Christian Hammond
Hi Rob, Actually, this should function as a workaround for now. You can do this in that same Haystack file. Change the entirety of that previous code to: hasattr(current_object, attr) if hasattr(current_object, attr): raise SearchFieldError("The model '%s' does not have a

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-16 Thread 'Rob Backhurst' via reviewboard
Thanks Christian, is that something we’ll need to do directly to the database? I don’t suppose you have any info on what needs to be done? Our DBA is on leave at the mo. No probs, not always easy to get to the bottom of these things! Thanks Rob Sent from my iPhone > On 16 Oct 2017, at 19:15,

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-16 Thread 'Rob Backhurst' via reviewboard
Hi Christian, Here you go... ERROR:root:Error updating reviews using default Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 188, in handle_label self.update_backend(label, using) File

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-16 Thread Christian Hammond
Hi Rob, I think what's happening is that there's an exception being raised the first time this is accessed that is resulting in hasattr failing. One more check (I'm about to go to bed so I'll have to follow up in the morning). Before the "has_attr = ..." line, add: if attr == 'commit':

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-16 Thread 'Rob Backhurst' via reviewboard
Hi Chris, Certainly seems a bit weird - I appreciate all your efforts so far!. See the out put from the latest index below. If this doesn't tell you anything useful, perhaps we can try (on our test system) removing the review/record that seems to be causing this and re-run the index?

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-15 Thread Christian Hammond
Hi Rob, At this point, "Gremlins" appear to be the best answer from what I'm able to see right now. The output in that error is directly contradicting the conditional that allows the error to be shown, so something really bizarre is happening that absolutely should not be able to happen. It's not

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-13 Thread 'Rob Backhurst' via reviewboard
No probs - where do we go from here? Thanks Rob On Thursday, 12 October 2017 19:58:13 UTC+1, Stephen Gallagher wrote: > > Ok, I just wanted to rule out an easy solution. > On Thu, Oct 12, 2017 at 5:47 AM 'Rob Backhurst' via reviewboard < > revie...@googlegroups.com > wrote: > >> Just to add,

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-12 Thread Stephen Gallagher
Ok, I just wanted to rule out an easy solution. On Thu, Oct 12, 2017 at 5:47 AM 'Rob Backhurst' via reviewboard < reviewboard@googlegroups.com> wrote: > Just to add, the haystack version shown in the reviewboard shell is > looking better now though. > > >>> import reviewboard > >>> print

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-12 Thread 'Rob Backhurst' via reviewboard
Just to add, the haystack version shown in the reviewboard shell is looking better now though. >>> import reviewboard >>> print reviewboard.VERSION (2, 5, 16, 0, u'final', 0, True) >>> print reviewboard.__file__ /usr/lib/python2.7/site-packages/reviewboard/__init__.pyc >>> import haystack >>>

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-12 Thread 'Rob Backhurst' via reviewboard
Hi Stephen, I've installed that on our test system and re-run the index - unfortunately the same problem. Thanks Rob On Wednesday, 11 October 2017 19:21:22 UTC+1, Stephen Gallagher wrote: > > > > On Wed, Oct 11, 2017 at 7:40 AM 'Rob Backhurst' via reviewboard < > revie...@googlegroups.com >

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-11 Thread Stephen Gallagher
On Wed, Oct 11, 2017 at 7:40 AM 'Rob Backhurst' via reviewboard < reviewboard@googlegroups.com> wrote: > Hi Christian, > > Ok, lets hope this can tell you something useful... > > Rob, I just packaged up Haystack 2.4.1 (and did rudimentary testing to see that ReviewBoard still works). Would you

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-11 Thread 'Rob Backhurst' via reviewboard
Hi Christian, Ok, lets hope this can tell you something useful... ERROR:root:Error updating reviews using default Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 189, in handle_label

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-10 Thread Christian Hammond
Hmm, this is beyond bizarre. Note these lines: if not hasattr(current_object, attr): raise SearchFieldError("The model '%s' ('%s' -- %s) does not have a model_attr '%s' (%s)." % (repr(obj), repr(current_object), current_object.__class__.__name__, attr, hasattr(current_object,

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-10 Thread 'Rob Backhurst' via reviewboard
Here you go... # encoding: utf-8 from __future__ import unicode_literals import re from django.template import Context, loader from django.utils import datetime_safe, six from haystack.exceptions import SearchFieldError from haystack.utils import get_model_ct_tuple class NOT_PROVIDED:

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-09 Thread Christian Hammond
Can you send me the fields.py file as you now have it? That output contradicts the logic that should be in the code. Christian On Mon, Oct 9, 2017 at 03:29 'Rob Backhurst' via reviewboard < reviewboard@googlegroups.com> wrote: > Hi Christian, > > See the new output below... > > Removing all

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-09 Thread 'Rob Backhurst' via reviewboard
Hi Christian, See the new output below... Removing all documents from your index because you said so. All documents removed. Indexing 558 users Indexing 27878 review requests ERROR:root:Error updating reviews using default Traceback (most recent call last): File

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-06 Thread Christian Hammond
Hi Rob, Stephen and I dug into this a bit. Turns out the version discrepancy comes from an error in the upstream tarball's reported version. So you likely do have only one version of this installed. I'm going to give you some additional code to place in that fields.py file, so we can get more

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-06 Thread 'Rob Backhurst' via reviewboard
Hi Stephen, I did think that might be the case, but I have only installed using yum. I have a test system setup in the same way (and showing the same behaviour) and checked to see if any packages had been installed using pip, but they have not... I’m not not particularly savvy with

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-06 Thread 'Rob Backhurst' via reviewboard
Hi Christian, I’ll send the file to you asap. Thanks Rob Sent from my iPhone > On 6 Oct 2017, at 18:31, Christian Hammond wrote: > > Hi Rob, > > It was a couple e-mails ago, but can you actually just attach > /usr/lib/python2.7/site-packages/haystack/fields.py?

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-06 Thread Stephen Gallagher
Rob, did you install ReviewBoard using pip or using the EPEL 7 RPM? >From above, it looks like you may have two copies of Haystack on your system, one installed via RPM and the other possibly installed by pip/easy_install. You will need to clear out the 2.1.1dev version. On Fri, Oct 6, 2017 at

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-06 Thread Christian Hammond
Hi Rob, It was a couple e-mails ago, but can you actually just attach / usr/lib/python2.7/site-packages/haystack/fields.py? I'll see if that logic differs from what is in 2.3.1. Christian On Fri, Oct 6, 2017 at 12:25 AM, 'Rob Backhurst' via reviewboard < reviewboard@googlegroups.com> wrote: >

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-06 Thread 'Rob Backhurst' via reviewboard
Sorry, which one line? On Friday, 6 October 2017 00:59:12 UTC+1, Christian Hammond wrote: > > Hi Rob, > > That's the version listed in the source code for the version of Haystack > being run. Not sure if that indicates a packaging problem or what, but it's > very strange. > > Could you show me

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-05 Thread Christian Hammond
Hi Rob, That's the version listed in the source code for the version of Haystack being run. Not sure if that indicates a packaging problem or what, but it's very strange. Could you show me that one line in fields.py? Christian On Thu, Oct 5, 2017 at 13:22 'Rob Backhurst' via reviewboard <

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-05 Thread 'Rob Backhurst' via reviewboard
Hi Christian, We deinately only have version 2.3.1 installed. python-django-haystack 2.3.1-1.el7 Why would it think we're using 2.1.1 dev? Can we force it to look in the correct place? Thanks Rob On Tuesday, 3 October 2017 09:12:26 UTC+1, Rob Backhurst wrote: > > Hi, > > I upgraded our

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-05 Thread Christian Hammond
Hi Rob, Looks like the version of Haystack being run is claiming to be 2.1.1 dev. I don't know what this version might be doing for the attribute lookup, but I'd start by trying to solve the version issue, make sure you're running a 2.3.x release. I would be interested to find out what line 86

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-05 Thread 'Rob Backhurst' via reviewboard
Perhaps we're able to add some kind of debugging to the indexing to provide more info? Thanks Rob On Tuesday, 3 October 2017 09:12:26 UTC+1, Rob Backhurst wrote: > > Hi, > > I upgraded our ReviewBoard system from 2.5.10 to 2.5.16 - since then, > indexing doesn't seem to complete. > The index

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-05 Thread 'Rob Backhurst' via reviewboard
Here you go... >>> import reviewboard >>> print reviewboard.VERSION (2, 5, 16, 0, u'final', 0, True) >>> print reviewboard.__file__ /usr/lib/python2.7/site-packages/reviewboard/__init__.pyc >>> import haystack >>> print haystack.__version__ (2, 1, 1, u'dev') >>> print haystack.__file__

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-05 Thread Christian Hammond
Strange.. Okay, I want to run something else. $ rb-site manage /var/www/reviews shell import reviewboard print reviewboard.VERSION print reviewboard.__file__ import haystack print haystack.__version__ print haystack.__file__ That'll just help me verify that the versions and paths we're seeing

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-05 Thread 'Rob Backhurst' via reviewboard
Hi Chris, Yep, its True. # rb-site manage /var/www/reviews shell Python 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from reviewboard.reviews.models import

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-04 Thread Christian Hammond
Thanks Rob. Let me have you run a test: $ rb-site manage /path/to/sitedir shell from reviewboard.reviews.models import ReviewRequest r = ReviewRequest.objects.get(pk=1) print hasattr(r, 'commit') See what that says. It should be True. That's what Haystack is running to get its result.

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-04 Thread 'Rob Backhurst' via reviewboard
Hi Christian, Thanks for getting back to me. Is this what you're after? python-django-haystack.noarch 2.3.1-1.el7 Thanksl Rob On Tuesday, 3 October 2017 09:12:26 UTC+1, Rob Backhurst wrote: > > Hi, > > I upgraded our ReviewBoard system from 2.5.10 to

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-04 Thread Christian Hammond
Hi Rob, I haven't seen this before, and can't reproduce it. The error doesn't make sense, as review requests definitely have 'commit' as an attribute. Can you verify the version of haystack on the system? Christian On Wed, Oct 4, 2017 at 2:16 AM, 'Rob Backhurst' via reviewboard <

Re: Index failure after upgrade to ReviewBoard 2.5.16

2017-10-04 Thread 'Rob Backhurst' via reviewboard
As this happens during the index, it is preventing us from having full search results - any help would be much appreciated as this is causing quite a few issues for our development team. Please let me know if you need any more info. Thanks Rob On Tuesday, 3 October 2017 09:12:26 UTC+1, Rob

Index failure after upgrade to ReviewBoard 2.5.16

2017-10-03 Thread 'Rob Backhurst' via reviewboard
Hi, I upgraded our ReviewBoard system from 2.5.10 to 2.5.16 - since then, indexing doesn't seem to complete. The index starts OK, but after a while stops with this error... ERROR:root:Error updating reviews using default Traceback (most recent call last): File