Garden-AI / garden-frontend

Web UI for thegardens.ai
MIT License
4 stars 2 forks source link

fix: schema changes for search index migration #152

Closed OwenPriceSkelly closed 3 months ago

OwenPriceSkelly commented 3 months ago

When we migrate the current contents of the search index, we're going to be effectively overwriting each entry in place with the same content in a slightly updated schema. Testing on dev/staging revealed that this was indeed a breaking change (sorry!)

The important change is that entrypoints no longer have a steps field, but we didn't lose any information (since none of the existing entrypoints had more than one step), it's just at the top level of the entrypoint schema. gardens didn't lose any fields.

For reference, the old schema for search index entries was the one used for the now-deprecated POST /garden-search-record route (docs) and the new schema is the one returned by the GET /gardens/{doi} route (docs)

There were a couple of additive changes to the schemas too (id and owner_identity_id fields for gardens and entrypoints), but those aren't likely to be the problematic ones