Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Migrate mimir to ElasticSearch7.x (#277) #279

Merged
merged 32 commits into from
Mar 16, 2022
Merged

Migrate mimir to ElasticSearch7.x (#277) #279

merged 32 commits into from
Mar 16, 2022

Conversation

sdrll
Copy link
Contributor

@sdrll sdrll commented Oct 29, 2021

Migration PR for ES7

@sdrll sdrll marked this pull request as draft October 29, 2021 15:20
@remi-dupre
Copy link
Contributor

@fatal69100 don't forget to rebase this on master to remove all the doc/lint diff :)

@sdrll
Copy link
Contributor Author

sdrll commented Nov 3, 2021

indeed, that the pain I have to endorse from the previous decision

sdrll and others added 7 commits December 8, 2021 16:35
* fix lint

* keep httpx 1.18 in master

* PoC: compatibility with es7

* tests migration from ES2 to ES7 for mimir

* fix lint

* fix linting warning of pylint 2.11

* black reformat

* update getting type with ES7

* only maintained ES7 for mimir

* fix linting test

* fix wiki tests

* Build docker image for es7 branch with github action

* remove encoding warning from lintage + weird import position

* disable='unspecified-encoding' for the lintage

* disable='unspecified-encoding' for the lintage

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
Co-authored-by: Adrien Matissart <a.matissart@qwantresearch.com>
* add hotel pricing tripadvisor api call endpoint

* limit docker elastic memory size + upgrade to latest elasticsearch version

* fix review (add todo cleanup endpoint and clean useless fixture)

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
* add tripadvisor feeds endpoint with categories

* fix fomat + add enum for type of POI called from mimir

* fix tests

* fix formatting

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
Co-authored-by: Aureliano Sinatra <a.sinatra@qwant.com>
* simply add tripadvisor trigger logic to suggest

* add tests for tripadvisor

* first version refacto datasources with factory pattern

* unravel circular depedencies : multiple utils module file were shared between multiples modules -> I migrate then to the utils module in a "half-dirty" way

* improve factory and clean `get_name` function that was in utils but only used once

* use classic factory instead to make test success

* divide `get_places_bbox_impl` into sub-functions

* create two functions to differentiate france and worldwide behavior for the datasource selection

* fix review

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
sdrll and others added 17 commits December 10, 2021 13:56
* add tests instant answer tripadvisor with intention detected

* create OSMPoi and TripadvisorPoi and rename index to poi-tripadvisor + tests

* fix previous behavior/tests. New feature test is still in red state

* fix new behavioral tests to fallback on pages if no hotel were fetched with tripadvisor for a single poi

* fix async task and trgger order between OSM and PagesJaunes

* reverse pagesjaunes and osm priority

* Update default argument with Optional type hint

Co-authored-by: Rémi Dupré <r.dupre@qwant.com>

* Make POI an abstract class

* add type source choice on Bragi init

* fix lint

* fix instantiate POI type depending on id

* Update idunn/places/poi.py

Co-authored-by: Rémi Dupré <r.dupre@qwant.com>

* convert poi-tripadvisor index to poi_tripadvisor + with review

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
Co-authored-by: Rémi Dupré <r.dupre@qwant.com>
* add MCID tripadvisor url in PlaceMeta object with source_url and contribute_url

* fix format

* fix review

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
* update bragi API model

* codes is optional with new Bragi

* geocoder/models/params: stops type is not used
* fix review

* fix consistent naming

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
* add rating url for tripadvisor

* fix lint

* fix tests

* format

* add review block for tripadvisor

* fix format

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
* add rating url for tripadvisor

* fix lint

* fix tests

* format

* add review block for tripadvisor

* fix format

* fix instant answer for the bragi version (#298)

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
* update dependencies

* disable failing pylint
* add heathcheck for all external sources

* use dict to display heathcheck

* fix lint

* fix tests

* add bragi healthcheck

* fix lint

* add tagger/classifier healthcheck and clean bragi healthcheck

* add redis heathcheck

* fix format

* remove print

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
* catch exception on healthcheck

* fix format

* log error

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
* dirty code to test now module tripadvisor priority

* fix tests

* add comment

* fix lint

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
* add TRIPADVISOR_ENABLED flag

* fix call hotel pj when tripadvisor is disabled

Co-authored-by: sdirollo <sebastien.dirollo@gmail.com>
* wrapping tripadvisor's ratings image in thumbr

* tripadvisor: fix rating url for full values

* add small comment
#309)

* image block: resize images images to fit what is displayed in erdapfel

Some images can get pretty big, especially when displaying several of
them in the list view.

If we want more granularity it could make sense to specify that as a
parameter, but I don't think this would make any improvement in our
current use.

* image block: fix broken tests due to Thumbr url change
pascaloliv
pascaloliv previously approved these changes Mar 8, 2022
@sdrll
Copy link
Contributor Author

sdrll commented Mar 9, 2022

I just wait to fully merge to ES7 before to merge it on master :)

* instant_answer: mix OSM and tripadvisor in direct query

As weights for TA POIs are rather high, they are already prioritized
compared to OSM POIs and this won't be too agressive by hiding potential
much more relevent OSM documents.

* instant_answer: we do not need to filter tripadvisor results
@sdrll sdrll marked this pull request as ready for review March 16, 2022 14:27
@sdrll sdrll merged commit f560d55 into master Mar 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants