Commit Graph

726 Commits

Author SHA1 Message Date
Antonio Scandurra
3daeabc1d6 collab 0.7.0 2023-03-09 09:30:04 +01:00
Antonio Scandurra
9328bb0153 Introduce Kubernetes liveness probe to ensure database works 2023-03-09 09:17:55 +01:00
Antonio Scandurra
89c283ecf0
Merge pull request #2252 from zed-industries/limit-messages-processed-in-parallel
Prevent collab server from being overwhelmed with messages
2023-03-09 08:51:48 +01:00
Max Brunsfeld
14497027d4 collab 0.6.2 2023-03-08 12:22:16 -08:00
Antonio Scandurra
b4561b848d Limit the number of parallel messages handled for any given connection 2023-03-08 17:04:01 +01:00
Julia
d173b1d412 Update db followers table when user leaves a project
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-03-07 18:56:03 -05:00
Julia
1e5aff9e51 Update collab integration test to new reconnect timeout 2023-03-07 12:23:18 -05:00
Julia
b9110c9268 Increase reconnect timeout
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-03-03 13:10:08 -08:00
Max Brunsfeld
e7b56f6342 adjust buffer-formatting assertion to reflect final newline addition 2023-02-28 21:52:00 -08:00
Max Brunsfeld
e910fd8493 collab 0.6.1 2023-02-24 09:44:23 -08:00
Julia
465d8cc2ff Differentiate between follow state on a per-project basis 2023-02-24 00:07:17 -05:00
Antonio Scandurra
bbeb33bc7e Fix error when deleting rooms containing projects on refresh
A foreign key violation was causing the server to never delete stale
rooms during `Database::refresh_room` due to having one or more project
records referencing the room.
2023-02-23 15:54:35 +01:00
Antonio Scandurra
74e0bed38f Fix compilation errors after restructuring room_transaction 2023-02-23 15:17:22 +01:00
Antonio Scandurra
832549f1a3 Merge branch 'main' into call-ui-follow-up 2023-02-23 15:15:46 +01:00
Antonio Scandurra
9334267bd0 Tear down peer when signing out 2023-02-23 14:47:02 +01:00
Antonio Scandurra
1c636500de
Merge pull request #2200 from zed-industries/fix-slow-project-join
Hold room lock through the entirety of a `room_transaction`
2023-02-23 09:11:58 +01:00
Max Brunsfeld
111aff29cc collab 0.6.0 2023-02-22 12:35:15 -08:00
Julia
0324ca3b08 Be more specific about clearing (leader, follower) row
Previously anyone unfollowing someone would clear all other rows for
other followers leading to an incorrect state, fix and test

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-02-22 15:29:20 -05:00
Max Brunsfeld
0dc92bec5c Retrieve room id from the project when following/unfollowing
Previously, we were accidentally using the project id as the room id.
2023-02-22 11:34:55 -05:00
Julia
e403b868b7 Add followers table to sqlite scheme for tests
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-02-22 11:22:37 -05:00
Julia
4513c40993 Following face piles finally take their first breath 2023-02-22 11:21:23 -05:00
Julia
4ffc8cd9fd Fix deadlock in db get_room
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-02-22 11:21:23 -05:00
Julia
2592ec7265 Initial tracking of unfollows on collab server 2023-02-22 11:21:23 -05:00
Julia
d6462c611c Begin tracking follow states on collab server
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-02-22 11:21:23 -05:00
Antonio Scandurra
8dd249a7cd Hold room lock through the entirety of a room_transaction
Previously, when the host repeatedly sent `UpdateWorktree` messages,
new guests attempting to join a project would observe a severe slowdown
caused by a database serialization error (e.g., the coherence of the data
would get violated midway through `Database::join_project` due to worktree
entries being mutated as the user joined). Writing entries is pretty fast,
whereas reading all of them for a project can take more than 100ms.
Transactions that failed due to a serialization error are retried, but the guest
would keep retrying until the host finished writing because the guest's read
was slow.

This commit changes the semantics of `room_transaction` to acquire a room
lock before even starting the transaction and holding it all the way after
commit (storing it, as before, in the `RoomGuard`). This ensures that a fast
writer (the host) can't starve a slow reader (the guest), allowing the latter
to make progress by temporarily pausing writes by the former.
2023-02-22 16:04:29 +01:00
Julia
bda37ffb9c Enforce rustfmt on CI & clean up some let-else format errors 2023-02-20 13:27:35 -05:00
Max Brunsfeld
010eba509c Make Project::save_buffer and ::save_buffers into methods 2023-02-20 09:42:44 -08:00
Max Brunsfeld
cdf64b6cad Unify save and save_as for local worktrees
This fixes state propagation bugs due to missing RPC calls in save_as.
2023-02-17 17:21:48 -08:00
Max Brunsfeld
3a7cfc3901 Move the save and save_as code paths close together 2023-02-17 17:21:48 -08:00
Max Brunsfeld
eebce28b32 Respect UpdateBufferFile messages on guest buffers without file
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-02-17 12:38:04 -08:00
Antonio Scandurra
7be868e372 Avoid creating more than one room when inviting multiple people at once
Previously, when initiating a call by calling multiple people, only
the first person would get the call while all the others would briefly
show a "pending" status but never get the call.

This would happen because `ActiveCall` was trying to a create a different
room for each person called, because the original room creation hadn't finished
and so a `ModelHandle<Room>` wasn't being store in the active call.

With this commit, only one room can be created at any given time and further
invites have to wait until that room creation is done.
2023-02-14 12:03:30 +01:00
Antonio Scandurra
087d51634d Fix test that wasn't properly verifying disconnection from livekit 2023-02-14 10:46:29 +01:00
Mikayla Maki
ea39983f78 Removed old experiments settings and staff mode flag, added new StaffMode global that is set based on the webserver's staff bit 2023-01-27 15:43:12 -08:00
Kay Simmons
ea0dd8972f
Merge pull request #2090 from zed-industries/workspace-window-position-persistence
Workspace window position persistence
2023-01-27 15:24:01 -08:00
Kay Simmons
a1308d20ce
Merge pull request #2105 from zed-industries/fix-focus-stealing-when-collaborating
Limit focus grabbing in followed pane
2023-01-27 15:23:43 -08:00
Kay Simmons
0f93386071 Add run until parked to test_fs_operations to ensure both update chunks are completed before asserting the changes 2023-01-27 15:07:51 -08:00
Kay Simmons
77a4f907a0 removed invalid focus assertion 2023-01-27 13:43:36 -08:00
Antonio Scandurra
5431488a9a collab 0.5.4 2023-01-27 11:07:12 +01:00
Antonio Scandurra
ac7618da17
Merge pull request #2103 from zed-industries/connection-staleness
Fix connection staleness issues
2023-01-27 11:01:24 +01:00
Max Brunsfeld
1b45911857 Omit hidden worktrees when showing projects in collaboration UI 2023-01-26 14:47:37 -08:00
Petros Amoiridis
73af155dd6
Refactor Database::remove_contact
Refactor it to avoid sending irrelevant messages to update the UI.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-01-26 19:01:51 +02:00
Antonio Scandurra
74aeec360d Cancel pending call when participant leaves room after a reconnection
Previously, if a user temporarily disconnected while there was a pending
call, we would fail to cancel such pending call when the caller left the
room. This was due to the caller reconnecting and having a different connection
id than the one originally used to initiate the call.
2023-01-26 16:44:55 +01:00
Kay Simmons
5eac797a93 mostly working now 2023-01-25 11:36:38 -08:00
Kay Simmons
15799f7af6 wip 2023-01-25 11:32:19 -08:00
Petros Amoiridis
e928c1c61e
Test removing a contact
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-01-25 17:31:42 +02:00
Petros Amoiridis
5d4eb2b7ae
Push responder and requester to remove_contacts
When we ask the server to remove a contact we need to push the requester and responder ids to `remove_contacts` so that when the UI updates, the correct contacts will disappear from the list.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-01-25 13:10:29 +02:00
Mikayla Maki
d060114f00 Added complete scripts for generating third party license files 2023-01-23 12:47:12 -08:00
Max Brunsfeld
2f42af2ac3 Add confirm_quit setting 2023-01-20 13:02:38 -08:00
Antonio Scandurra
a58b39f884 Merge branch 'main' into optimize-large-multi-buffers 2023-01-19 16:18:21 +01:00
Max Brunsfeld
17b4bfdf98
Merge pull request #2045 from zed-industries/fewer-unsaved-prompts
Avoid prompting to save when closing an untitled buffer that is still open elsewhere
2023-01-18 15:10:19 -08:00