feat: serve demo via /blob (lazy seed to S3)#58
Merged
Conversation
28a11a6 to
e73832a
Compare
Demo doesn't go through the worker, so the previous S3 PR (#57) didn't help it — /demo/data was still ~25s. - Move demo handling into /blob (the new endpoint), not /data (the endpoint we're deprecating). - /blob/demo: no auth, lazy-seeds S3 from generate_demo_database() on the first call after deploy, returns a presigned URL with iv=null. - /blob/<real-package>: unchanged (auth + DB row + presigned URL with iv). - /data left fully untouched. - blob_storage.upload() replaces the misleadingly-named upload_encrypted; worker call site updated.
e73832a to
3c0ae82
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The previous S3 PR (#57) only updated the worker code path. Demo doesn't go through the worker — it's generated lazily inside the API — so /demo/data was still hitting API Gateway's slow binary-response path (~25s for 370KB).
This PR puts demo handling in /blob (the new endpoint) instead of /data (the one we'll deprecate once the frontend migrates). First call to /blob/demo after a fresh deploy lazy-seeds S3 from generate_demo_database(); every call after that is just a presigned-URL lookup.
Changes
Test plan