Dev setup needs tweaking
bensteinberg opened this issue · 4 comments
bensteinberg commented
In the instructions, this sequence is not correct:
fab init_dev_db
fab ingest_fixtures
fab import_web_volumes
fab refresh_case_body_cache
fab rebuild_search_index
Specifically, fab rebuild_search_index
fails with
File "/app/capapi/documents.py", line 209, in prepare_casebody_data
cites_by_id = {k: list(v) for k,v in groupby(sorted(outbound_cites, key=lambda c: c.opinion_id), lambda c: c.opinion_id)}
TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'
This sequence works:
fab init_dev_db
fab ingest_fixtures
fab import_web_volumes
fab rebuild_search_index # this fails fast!
fab refresh_case_body_cache
fab rebuild_search_index
but the first index rebuild fails.
bensteinberg commented
That is, 473f4ef was not correct.
bensteinberg commented
@jcushman does it make sense that dropping and recreating the index in the first (failing) fab rebuild_search_index
is necessary?
lizadaly commented
"Helpfully", this didn't happen to me and stepping through the original order worked fine.
root@4e0ab80e23c8:/app# fab rebuild_search_index
Really delete and recreate cases? [y/N] y
Deleting cases
Creating cases
Scheduling tasks to reindex volumes
Done.
matteocargnelutti commented
Mystery solved this week: It was likely Docker running out of resources.
I added a note to README.md
with recommended settings.