-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Potential Migration to GCP Cloud Functions 2nd Gen
Background
The current Gen 1 implementation requires maintaining three separate instances of the same repository to handle:
handle_form_submithandle_email_queuehandle_flush_gradescope
These functions are stateless and are invoked by a Google Sheets App Script using function signatures.
Current Gen 1 functions only support pulling code from Cloud Source Repository or from the inline editor. While it is **possible** for Cloud Source repo to mirror GitHub repository (which could potentially in roadmap to synchronize the codebases), there is no support for continuous deployment, which means we still have manually re-deploy 3 functions to run latest code after sync.
Proposed Migration
Migrating to Cloud Functions 2nd Gen, which supports HTTP server frameworks, would allow us to consolidate all three functions into a single long-lived service container. Key benefits include:
- Single Service: Maintain one deployment instead of three separate instances.
- Docker Support: Enables continuous build & deployment on new commits to GitHub repository.
Non-Exhaustive To-Do List
- Implement a global HTTP listener to handle all three function requests.
- Modify the Google Sheets App Script to call the new HTTP endpoints correctly.
- Explore making the code stateful while ensuring isolation between function calls from different spreadsheets.
- Create a
Dockerfileto enable continuous deployment.