URGENT - new issues after installing Changelog 0087

Hey Ed!

I went through the details you have shared but I was unable to figure out how did you end up in this state.

I had a discussion with Ethan and we agreed that best path forward would be fix your mappings for all the indices to ensure that your ES state is in sync with what HQ expects.

Would you be be able to run the following snippet in the django-manage shell of the system which has improper mapping configuration?

from corehq.apps.es.migration_operations import UpdateIndexMapping
from corehq.apps.es.transient_util import iter_doc_adapters

for adapter in iter_doc_adapters():
    print(adapter.index_name, adapter.type)
    UpdateIndexMapping(name=adapter.index_name, type_=adapter.type, properties=adapter.mapping['properties'], es_versions=[6]).run()

After running this you can try to run migrate again -

./manage.py migrate

If this runs without any issues your deploy should go fine after that.

Feel free to reach out if you face any issues.

Thanks for your patience.

1 Like