Es search view 839214#923
Conversation
elasticutils tasks broken; add tasks in search app test
Code borrowed in large part from mozilla/fjord update elasticutils, using pyelasticsearch with updated requests library update test-utils library to eagerly test celery tasks
don't ignore settings_test
remove sphinx modules from search app
|
Think I have time to peek at this right now... |
|
Is this behind a feature flag, or will the view be entirely powered by Elastic Search once this lands? Just want to be sure we have high quality results before this becomes official, considering how important search is to the site. |
|
Yup, there's an 'elasticsearch' feature flag on the view |
|
There's also an ES_DISABLED setting that is set to True by default, which prevents any of the backend operations. We won't enable it in production until everything is configured; it looks like MDN already has flows to RabbitMQ on dev and to ES on dev, stage, and prod. |
|
Attempt #2 at finding time to look at this. First thing, the "my forcing the override of settings from test-utils" link in the description leads to an attempt to create a new pull request (ie. |
|
Okay, found the link for "my forcing the override of settings from test-utils", but not quite sure what's happening there. @ubernostrum might have something smarter to say about it, since I just basically stole the code from a django snippet and I'm not quite sure what UserSettingsHolder does. |
|
Tests seem to pass ok: Moving on to spot checking after getting some lunch... |
|
Working through spotcheck, getting an exception in kumascript execution that seems related to the Requests module upgrade in kuma-lib. Investigating how this might be happening. |
|
Yeah, looks like the Requests API has changed significantly from v0.6.1 (what MDN uses now) to v1.1.0 (what your kuma-lib uses), and that breaks in The fix is probably just one line, but I'm not sure what else might break with the Requests upgrade - especially since we try to avoid doing real HTTP requests in tests that would use Requests. |
|
Hmm ... that sounds familiar. I want to to say I fixed it already and maybe I have a kumascript commit to push for it? |
|
Updated kumascript tests to match response api from new version of requests library. All tests passed for me! |
|
So, tests all pass now, but:
Are these something that the test settings should be overriding? |
|
ARGH! Forcing into |
|
OMG finally fixed with help from @willkg ... And only the task test hits the ES index. |
|
none of the tests should hit a real es service though. there's no es on Jenkins and in general we need to mock out network services |
|
Just as a thing, Jenkins (ci.mozilla.org) does have an ES. We use this for kitsune, fjord, amo, etc. We sort of think of this like we think of the db. |
|
ah cool. then ignore my grumblings and I'll plan on giving this another look when I'm not on airport wifi |
|
Sport-check worked, tests passed for me. |
|
Ack! This really needed to be squashed! |
|
Also, did the kuma-lib change get merged too? Need to do that fast before things break |
(Would like to get @lmorchard and/or @ubernostrum to think about my forcing the override of settings from test-utils)
Supersedes #898. The same testing instructions apply, plus some new ones:
You'll need to fetch my kuma-lib repos, which means the leeroy/mdn-github jenkins build is going to fail.
git submodule update --init --recursivevagrant provisionTo spot-check, make sure you're running
./manage.py celeryd, then:mdn-main_indexfor the docTo spot-check the search view (wiring only, nothing fancy):
You should see a simple search result list matching the ES index.