Garden-AI / garden

https://garden-ai.readthedocs.io
MIT License
20 stars 4 forks source link

Search index migration #503

Closed OwenPriceSkelly closed 2 months ago

OwenPriceSkelly commented 3 months ago

closes #502

Overview

At last! This is the script which re-populates the search index via the new backend API. It also hardcodes the _IS_DISABLED constants to True for the next release.

Testing

UPDATE: flipping the switch broke a lot of tests. Also, a significant portion of our test code just revolves around mocking local_data, our best-tested module by far. I spent some time fiddling with the broken tests, but the core problem of the Garden class lazy-importing local data (and/or a GardenClient while we're still in migration limbo) was making it far more effort than it's worth, especially when that's a hack we're about to remove entirely in #504. I also think that a "test suite overhaul" is frankly overdue for the sdk and I think it makes more sense to scope that out into its own story (perhaps for a testing-inclined intern?) than it does to block the migration until the tests have been reworked. But I'm open to pushback on this!

Manually tested on dev against both the actual dev API and a local instance of the API which points at the dev search index. I tested both because it was easier to wipe a the local postgres instance completely, which more accurately reflects the (still empty) prod DB than the dev DB does.

As of https://github.com/Garden-AI/garden-frontend/issues/152 fixing the display issues this caused on the staging frontend, the migration was successful on dev 🥳

Discussion

Steps remaining before declaring final victory on the migration:

Documentation

No docs


📚 Documentation preview 📚: https://garden-ai--503.org.readthedocs.build/en/503/

codecov-commenter commented 2 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.35%. Comparing base (fb27abf) to head (2b88b2f).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

:exclamation: There is a different number of reports uploaded between BASE (fb27abf) and HEAD (2b88b2f). Click for more details.

HEAD has 1 upload less than BASE | Flag | BASE (fb27abf) | HEAD (2b88b2f) | |------|------|------| ||3|2|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #503 +/- ## ========================================== - Coverage 74.67% 67.35% -7.32% ========================================== Files 56 53 -3 Lines 3771 3517 -254 ========================================== - Hits 2816 2369 -447 - Misses 955 1148 +193 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.