tldraw/packages
Mitja Bezenšek ddebf3fc5c
Move storing of snapshots to R2 (#3693)
Instead of storing them in supabse we will store them in r2.

I have already created `room-snapshots` and `room-snapshots-preview`
buckets on cloudflare.

We could also migrate all the data from supabase, but it seems we
haven't done so for the rooms, so I also didn't look into doing it for
snapshots.

One slight drawback of moving to R2 is that it's harder to query data by
parent slug. So answering questions like which room is the parent to the
most snapshots is a bit harder to answer. Instead of just a simple query
we'd need to do some custom logic to go through the bucket. Not sure if
have ever needed this info though.

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

Existing snapshots:

1. Load an existing snapshot. It should still load correctly. The best
way to do that is probably to generate a few of them in advance.

New snapshots:
1. Create a new room.
2. Create a few snapshot links.
3. They should work.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Move storing of snapshots to cloudflare R2.
2024-05-08 09:06:02 +00:00
..
assets Fix missing icons (#3654) 2024-04-30 10:39:53 +00:00
dotcom-shared Move storing of snapshots to R2 (#3693) 2024-05-08 09:06:02 +00:00
editor Camera options followups (#3701) 2024-05-07 10:06:35 +00:00
namespaced-tldraw Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00
state [signia] perf thing again (#3645) 2024-04-30 13:44:52 +00:00
store Automatic undo/redo (#3364) 2024-04-24 18:26:10 +00:00
tldraw Add asset pruning when importing files (#3689) 2024-05-07 14:48:01 +00:00
tlschema Camera options (#3282) 2024-05-04 17:39:04 +00:00
tlsync Allow clients to gracefully handle rejection (#3673) 2024-05-02 13:54:21 +00:00
utils Camera options followups (#3701) 2024-05-07 10:06:35 +00:00
validate Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00