Commit Graph
1610 Commits
Author SHA1 Message Date
Joseph Lyons d71d543337 Ensure that subsequent signup happens after initial
We can't rely on the fact that the test won't run fast enough such that both `created_at`s are the same time.  This ensures the subsequent signup happens after the initial one and that the database doesn't overwrite the initial one.
2022-12-07 08:15:01 -05:00
Antonio Scandurra 665219fb00 Fix inviting user that had already signed up via a different email 2022-12-07 14:07:01 +01:00
Antonio Scandurra 1b8f23eeed Add failing test showcasing inviting existing user via different email 2022-12-07 14:06:59 +01:00
Joseph Lyons 5f31907127 Clean up test 2022-12-07 07:12:27 -05:00
Joseph Lyons 97989b04a0 Remove comment 2022-12-06 17:18:54 -05:00
Joseph Lyons 694840cdd6 Allow overwriting signup data if a user signs up more than once with the same email address 2022-12-06 17:12:12 -05:00
Antonio Scandurra 3b5b48c043 Query project count as i64 instead of i32 when gathering metrics
Using the latter will cause a type mismatch when performing the query.
2022-12-06 15:00:32 +01:00
Antonio Scandurra fc7b01b74e Fix busy status when accepting a contact request
Previously, we would send an contact update when accepting a request
using the same `busy` status for both the requester and the responder.
This was obviously wrong and caused the requester to see their own
busy status as the newly-added responder contact's status.
2022-12-06 10:19:34 +01:00
Antonio Scandurra 744714b478 Remove unused UserId import from seed script 2022-12-06 09:07:25 +01:00
Antonio Scandurra 9a62150dce Merge branch 'main' into reconnections-2 2022-12-05 19:18:40 +01:00
Antonio Scandurra 7bbd97cfb9 Send diagnostic summaries synchronously 2022-12-05 19:07:06 +01:00
Antonio Scandurra 5443d9cffe Return project collaborators and connection IDs in a RoomGuard 2022-12-05 18:37:01 +01:00
Antonio ScandurraandNathan Sobo be3fb1e985 Update sea-orm to fix bug on failure to commit transactions
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-12-05 18:36:25 +01:00
Antonio Scandurra b97c35a468 Remove project_id foreign key from room_participants 2022-12-05 15:16:06 +01:00
Antonio Scandurra eec3df09be Upgrade sea-orm 2022-12-05 14:56:01 +01:00
Antonio Scandurra d3c411677a Remove random pauses to prevent the database from deadlocking 2022-12-05 12:03:45 +01:00
Antonio Scandurra d97a8364ad Retry transactions if there's a serialization failure during commit 2022-12-05 10:49:53 +01:00
Antonio Scandurra 0ed731780a Remove duplication between transaction and room_transaction 2022-12-05 09:46:03 +01:00
Julia 11c1254e71 Merge pull request #1924 from zed-industries/simon-says-dont-move
Do not reorder tab opened by follower to end of item list
2022-12-04 13:00:07 -05:00
Kay Simmons 1cc3e4820a working serialized writes with panics on failure. Everything seems to be working 2022-12-03 16:06:01 -08:00
Mikayla Maki 992b94eef3 Rebased to main 2022-12-03 16:06:01 -08:00
Kay SimmonsandMikayla Maki d20d21c6a2 Dock persistence working!
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-12-03 16:06:01 -08:00
Kay Simmons c1f7902309 wip 2022-12-03 16:06:01 -08:00
Mikayla Makiand 4798161118 Distributed database pattern built.
Co-Authored-By: kay@zed.dev
2022-12-03 16:06:01 -08:00
Mikayla Maki a5edac312e Moved to workspaces crate... don't feel great about it 2022-12-03 16:05:26 -08:00
Mikayla Makiand 3451a3c7fe Rebase - Got Zed compiling and fixed a build error due to conflicting dependencies that cargo didn't catch :(
Co-Authored-By: kay@zed.dev
2022-12-03 16:04:10 -08:00
JuliaandMax Brunsfeld 4bc1d77535 Fix tab following order test to wait for file open to propagate
Now it can actually repro the original bug

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-12-02 16:09:37 -05:00
Antonio ScandurraandMax Brunsfeld d96f524fb6 WIP: Manually rollback transactions to avoid spurious savepoint failure
TODO:
- Avoid unwrapping transaction after f(tx)
- Remove duplication between `transaction` and `room_transaction`
- Introduce random delay before and after committing a transaction
- Run lots of randomized tests
- Investigate diverging diagnostic summaries

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-12-02 20:36:50 +01:00
Antonio ScandurraandMax Brunsfeld 1c30767592 Remove stale Error variant
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-12-02 19:20:51 +01:00
Antonio Scandurra 969c314315 Merge branch 'main' into reconnections-2 2022-12-02 19:09:33 +01:00
Antonio Scandurra 568de814aa Delete empty rooms 2022-12-02 16:56:41 +01:00
Antonio Scandurra 27f6ae945d Clear stale data on startup
This is a stopgap measure until we introduce reconnection support.
2022-12-02 16:30:00 +01:00
Antonio Scandurra 1b46b7a7d6 Move modules into collab library as opposed to using the binary
This ensures that we can use collab's modules from the seed script
as well.
2022-12-02 14:37:52 +01:00
Antonio Scandurra 7502558631 Make all tests pass again after migration to sea-orm 2022-12-02 14:22:36 +01:00
Antonio Scandurra 48b6ee313f Use i32 to represent Postgres INTEGER types in Rust 2022-12-02 13:58:54 +01:00
Antonio Scandurra dec5f37e4e Finish porting remaining db methods to sea-orm 2022-12-02 13:58:23 +01:00
Julia 239a04ea5b Add test that should have exercised tab reordering while following
Except it doesn't, it passes both with and without the prior commit.
Investigate further
2022-12-02 00:31:16 -05:00
Antonio Scandurra 585ac3e1be WIP 2022-12-01 18:39:24 +01:00
Antonio Scandurra 29a4baf346 Replace i32 with u32 for database columns
We never expect to return signed integers and so we shouldn't use
a signed type. I think this was a limitation of sqlx.
2022-12-01 17:47:51 +01:00
Antonio Scandurra cfdf0a57b8 Implement Database::update_project 2022-12-01 17:36:36 +01:00
Antonio Scandurra 944d6554de Implement Database::unshare_project 2022-12-01 16:26:13 +01:00
Antonio Scandurra e3ac67784a Implement Database::project_guest_connection_ids 2022-12-01 16:23:29 +01:00
Antonio Scandurra 62624b81d8 Avoid using col_expr whenever possible
...and use the more type-safe `::set`.
2022-12-01 16:17:27 +01:00
Antonio Scandurra 256e3e8e0f Get basic calls working again with sea-orm 2022-12-01 16:17:24 +01:00
Antonio Scandurra aebc6326a9 Implement Database::create_room 2022-12-01 15:22:20 +01:00
Antonio Scandurra db1d93576f Go back to a compiling state, panicking on unimplemented db methods 2022-12-01 15:13:57 +01:00
Antonio Scandurra d2385bd6a0 Start using the new sea-orm backed database 2022-12-01 14:41:59 +01:00
Antonio Scandurra 19d14737bf Implement signups using sea-orm 2022-12-01 11:58:07 +01:00
Antonio Scandurra 4f864a20a7 Implement invite codes using sea-orm 2022-12-01 11:10:51 +01:00
Antonio Scandurra 2375741bdf Implement db2::Database::fuzzy_search_users 2022-12-01 10:09:53 +01:00