owid-grapher icon indicating copy to clipboard operation
owid-grapher copied to clipboard

Automatically clean up unused Algolia staging indexes

Open larsyencken opened this issue 9 months ago • 6 comments

Context

When you do search work, and use -algolia in a branch name, you will get staging Algolia indexes created for your branch.

Problem

When you are finished with your branch, your staging server will get cleaned up, but the staging Algolia indexes will not be pruned -- they will linger on in Algolia.

Workaround

We periodically just go and click delete on a bunch of out of date indexes there.

larsyencken avatar May 02 '24 10:05 larsyencken

Matthieu said that there might be some automatic cleanup but it's not clear if this applies to staging servers

danyx23 avatar May 07 '24 15:05 danyx23

(yes that's true about apps, but not sure about indexes)

mlbrgl avatar May 07 '24 15:05 mlbrgl

@Marigold would it be easy to add deleting algolia indexes when the staging servers are deleted? That would probably be the best way of solving this.

danyx23 avatar May 14 '24 15:05 danyx23

@Marigold ping :)

danyx23 avatar Jun 05 '24 12:06 danyx23

Uh, where can I find these indexes, please? I've created a PR with name algolia-delete-index which should create algolia index, but I don't see any in Algolia UI (I even ran make reindex from the staging server). @marcelgerber what am I missing?

Marigold avatar Jun 06 '24 07:06 Marigold

@Marigold you need to be looking at the owid-staging Algolia application, not live. You have access to both under same account.

This link should bring you directly to it: https://dashboard.algolia.com/apps/74GKBOIDJQ/indices

marcelgerber avatar Jun 07 '24 11:06 marcelgerber

Fixed by https://github.com/owid/owid-grapher/pull/3777

Marigold avatar Jul 31 '24 13:07 Marigold