dto-btn / ssc-assistant

Second iteration of the SSC chatbot/assistant
MIT License
0 stars 0 forks source link

Migrate azure func to create index from dev to prod (and activate) #133

Open GuillaumeTurcotte opened 2 weeks ago

GuillaumeTurcotte commented 2 weeks ago

Azure func currently lives in our dev we need to migrate it to prod-pilot. And then we need to automate the usage of it by the ssc-assistant

tasks

GuillaumeTurcotte commented 2 weeks ago

https://learn.microsoft.com/en-us/azure/search/search-what-is-data-import

this could be used to cut down on cost and remove the azure function that builds the index in dev, and instead just copy the prod index to dev from time to time.

GuillaumeTurcotte commented 2 weeks ago

TF states also now stored remotely.

GuillaumeTurcotte commented 1 week ago

ran indexer on prod, seems to work with manual trigger, will run auto this weekend.

Just need to create a function or trigger somewhere that restart the chatbot or updates the index named latest or add code functionality that uses the latest index.

kyleaitken commented 1 week ago

This might also work: https://learn.microsoft.com/en-us/azure/search/search-how-to-alias?tabs=rest

We can create an alias for an index called "latest" and then just point that alias to the most recent index after it's finished being created. Perhaps in another timer triggered function that also checks that the index was successfully populated after the build-index function is complete before switching the alias