fix: stage uploads to temp before opening a db connection#65
Conversation
|
@greptile |
Greptile SummaryThis PR fixes a connection-pool pressure issue by staging file uploads to a temp path before opening a DB session in
Confidence Score: 5/5Safe to merge — the upload fix is well-scoped and the session lifecycle is correctly managed throughout The core upload change correctly delays DB connection acquisition until after the file is fully buffered to disk. No files require special attention Important Files Changed
Reviews (3): Last reviewed commit: "Update" | Re-trigger Greptile |
Greptile SummaryThis PR fixes a DB connection leak in
Confidence Score: 3/5The upload fix and backup removal are clean, but deploying as-is will leave existing webhooks subscribed to document events in a permanently broken state — active in the DB, empty via the API, and never firing — with no migration path to clean them up. The migration removes backup.* event subscriptions from webhooks and deletes newly empty webhooks, but performs no equivalent cleanup for document.* events (document.processing, document.ready, document.failed, document.deleted), which are also removed from VALID_EVENTS in this same PR. Webhooks that subscribed only to document events will appear active but show an empty events list and never deliver, with the stale data silently persisting in the database. api/alembic/versions/0004_remove_backups.py needs a follow-up block (mirroring the existing backup-event cleanup) that strips document.* events from the webhooks table and deletes any webhooks that become empty as a result. Important Files Changed
Reviews (2): Last reviewed commit: "Update" | Re-trigger Greptile |
No description provided.