eye-on-surveillance / sawt

https://sawt.eyeonsurveillance.org/
MIT License
16 stars 10 forks source link

Automate cloud functions deployment #45

Closed marvinmarnold closed 1 year ago

marvinmarnold commented 1 year ago

Notes

There are three servers:

Only the cloud functions are in scope. Additional notes:

gcloud functions deploy getanswer \
    --gen2 \
    --runtime=python310 \
    --memory=4GB \
    --region=us-east1 \
    --source=packages/googlecloud/functions/getanswer \
    --entry-point=getanswer \
    --trigger-http \
    --allow-unauthenticated \
    --set-env-vars OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}

Acceptance criteria

nikkag commented 1 year ago

Reactivated the workflow for staging: On a push to main, the code will deploy to getanswer-staging https://github.com/eye-on-surveillance/the-great-inquirer/commit/3974df964faff467ab5e351848b1f7754c3f1c95

nikkag commented 1 year ago

Build failed Will investigate more later on to see what went wrong. For now I redeployed the staging function using the zip.

nikkag commented 1 year ago

Moving cache files out of the repo and using dvc to manage them seems to have fixed the issue!

Will give ephemeral functions for PRs more thought.

marvinmarnold commented 1 year ago

Awesome. I'm not 100% sure but I think those large files will perpetually cause bloat in git history and increase the download size to clone. Created an issue to deal with that eventually.