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
Max Brunsfeld
51cea1b1fb
Merge branch 'main' into randomized-tests-operation-script
2023-02-20 10:39:00 -08: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
Max Brunsfeld
9c25d37dfc
Merge branch 'main' into randomized-tests-operation-script
...
In randomized integration test, incorporate random updates of existing
files into the test's new structure.
2023-01-24 12:39:24 -08: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
Mikayla Maki
203f569f2e
collab 0.5.3
2023-01-18 12:52:58 -08:00
Antonio Scandurra
8ca0f9ac99
Fix compile errors
2023-01-18 13:58:01 +01:00
Max Brunsfeld
8651320c9f
Make workspace items expose their underlying models, remove file-related methods
2023-01-17 17:21:06 -08:00
Joseph T. Lyons
c3b102f5a8
Add users to mailing list when using an invite link
2023-01-17 16:46:01 -05:00
Antonio Scandurra
dc88a67f50
Fix assertions
2023-01-17 18:09:45 +01:00
Antonio Scandurra
cc788dc5f7
Verify saved_version
, saved_version_fingerprint
and saved_mtime
2023-01-17 16:46:06 +01:00
Antonio Scandurra
2cd9db1cfe
Ensure Buffer::{is_dirty,has_conflict}
converge in randomized test
2023-01-17 16:32:51 +01:00
Max Brunsfeld
2c84b74126
Avoid retaining project in randomized test while LSP request is outstanding
2023-01-16 09:48:54 -08:00
Max Brunsfeld
1a9ff2420e
Clean up how applications are marked as inapplicable
2023-01-12 22:09:36 -08:00
Max Brunsfeld
e04d0be853
Remove unneeded log messages in randomized test
2023-01-12 14:30:53 -08:00
Max Brunsfeld
00e8625037
Simplify management of entity ids for different app contexts in randomized test
2023-01-12 14:30:10 -08:00
Max Brunsfeld
a3c7416218
Don't include user ids with MutateClients ops in serialized test plans
2023-01-12 14:28:31 -08:00
Max Brunsfeld
02f6928328
collab 0.5.2
2023-01-11 14:00:44 -08:00
Max Brunsfeld
74f8b493b2
collab 0.5.1
2023-01-11 13:25:28 -08:00
Max Brunsfeld
49379924cb
Avoid dropping is_complete column for backward compatibility
...
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-01-11 13:25:02 -08:00
Mikayla Maki
048da9ddce
collab 0.5.0
2023-01-11 10:50:16 -08:00
Mikayla Maki
a3da41bfad
Fix test failures due to dependency on Settings global in client for telemetry
...
co-authored-by: kay <kay@zed.dev>
2023-01-10 16:39:03 -08:00
Max Brunsfeld
576a9bb92c
Drop project's buffers when closing a remote project
2023-01-09 14:49:36 -08:00
Max Brunsfeld
5a4fa4b11e
Merge branch 'main' into randomized-tests-operation-script
2023-01-09 12:26:11 -08:00
Max Brunsfeld
3e3a703b60
Skip inapplicable operations when running an edited test plan
2023-01-09 11:36:53 -08:00
Antonio Scandurra
529ccbda3a
Introduce git index mutations to randomized collaboration test
...
The test now fails at the following seed:
```bash
SEED=850 ITERATIONS=1 OPERATIONS=131 cargo test --package=collab random
```
2023-01-08 08:52:16 -07:00
Max Brunsfeld
c503ba00b6
Add env vars to store and load test plan from JSON files
2023-01-06 17:51:25 -08:00
Nathan Sobo
213658f1e9
Fix tests that failed due to defaulting the grouping interval to zero in tests
2023-01-06 17:56:21 -07:00
Max Brunsfeld
2351f2bd0c
Tolerate failure to join remote projects in randomized test
2023-01-06 15:40:42 -08:00
Max Brunsfeld
99390a7237
Represent all randomized test actions as operations
2023-01-06 15:32:11 -08:00
Max Brunsfeld
210286da48
Make operations for all buffer manipulations
2023-01-06 15:32:11 -08:00
Max Brunsfeld
f1b3692a35
Tweak operation rates
2023-01-06 15:32:11 -08:00
Max Brunsfeld
f243633f3e
Set up flow for mutating clients via explicit operation values
2023-01-06 15:32:11 -08:00
Max Brunsfeld
ce8dd5a286
wip
2023-01-06 15:32:11 -08:00
Max Brunsfeld
a74c5073a4
Start work on allowing random collab test to be minimized
...
Represent operations as an explicit enum.
2023-01-06 15:32:11 -08:00
Antonio Scandurra
8487ae77e7
Share new worktrees when resharing project
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-01-06 12:58:19 -07:00
Nathan Sobo
1006ada458
Update scan_id on worktree entries when there is a conflict
...
Forgetting to do this meant we were unable to sync changes with reconnecting
guests in some cases.
2023-01-04 13:59:16 -07:00
Nathan Sobo
789bbf15b7
Update buffer files when synchronizing buffers
...
It's possible that the host was disconnected when attempting to notify
guests of a file save, so we need to transmit this in order to correctly
update the file's mtime.
Next failing seed OPERATIONS=200 SEED=6894
2023-01-04 12:33:48 -07:00
Nathan Sobo
1dd085fc92
Introduce completed_scan_id to worktree
...
We need to know the most recent scan id we have actually completed. This is to
handle the case where a guest disconnects when we're in the middle of streaming
worktree entries to them. When they reconnect, they need to report a scan_id
from before we started streaming the entries, because we have no record of when
the stream was interrupted.
Next failure:
SEED=5051 ITERATIONS=1 OPERATIONS=200 cargo test --release --package=collab random -- --nocapture
2023-01-03 18:26:57 -07:00
Nathan Sobo
90fb9b53ad
WIP
2023-01-03 13:30:14 -07:00
Nathan Sobo
8d70a22fa3
Record failing seed
2023-01-02 21:12:39 -07:00
Nathan Sobo
273988b8d5
Set transaction group interval to ZERO by default in tests
...
We were seeing non-deterministic behavior in randomized tests when
generating backtraces took enough time to cause transactions to group
in some cases, but not group in others.
Tests will need to explicitly opt into grouping if they want it by
setting the interval explicitly. We have tests in the text module that
currently test the history grouping explicitly, but I'm not sure
it's needed elsewhere.
2022-12-27 16:47:28 -07:00
Max Brunsfeld
599acf0daa
WIP - Panic immediately when detecting non-determinism via a change to the execution trace
2022-12-23 17:34:13 -08:00
Max Brunsfeld
42e74e7eef
Excluded deleted entries when initially sending worktrees to guests
...
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-22 11:18:10 -08:00
Antonio Scandurra
738e161bc6
WIP: failing test
...
SEED=882 RUST_LOG=collab::tests::randomized_integration_tests=info MAX_PEERS=2 ITERATIONS=1 OPERATIONS=49 cargo test --package=collab random -- --nocapture
2022-12-22 18:32:21 +01:00
Antonio Scandurra
559e14799c
Restructure randomized test to be a bit clearer and test more stuff
2022-12-22 17:54:25 +01:00
Max Brunsfeld
c321f5d94a
Assert that buffers' file state matches in randomized collab test
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-12-21 15:38:44 -08:00
Max Brunsfeld
89da738fae
In randomized test, open remote projects via the room
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-12-21 14:13:43 -08:00
Max Brunsfeld
8cd94060bb
💄 Avoid referring to all clients as guests in random integration test
2022-12-21 11:37:18 -08:00
Max Brunsfeld
d8ccdff9fc
Move randomized integration test into its own file
2022-12-21 11:26:24 -08:00
Antonio Scandurra
47348542ef
Synchronize buffers when either the host or a guest reconnects
2022-12-21 14:20:56 +01:00
Antonio Scandurra
b0336cd27e
Add failing test for buffer synchronization after disconnecting
2022-12-21 11:56:15 +01:00
Antonio Scandurra
ecd80c553c
Verify removing worktrees while host is offline
2022-12-21 11:47:01 +01:00
Max Brunsfeld
15f666a50a
Refresh project collaborator connection id for rejoined projects
2022-12-20 18:03:33 -08:00
Max Brunsfeld
213be3d6bd
Delete stale projects after cleanup interval, via server foreign key cascade
2022-12-20 17:27:42 -08:00
Max Brunsfeld
55800fc696
💄 Avoid repeated sql condition in rejoin_room
2022-12-20 17:23:52 -08:00
Max Brunsfeld
6a2066af6c
💄 Reduce indentation in Database::rejoin_room
2022-12-20 17:16:56 -08:00
Max Brunsfeld
cb8962691a
Remove unnecessary UnshareProject message sent to clients leaving a project
2022-12-20 16:58:44 -08:00
Max Brunsfeld
bb00134f5f
Clean up projects when leaving a room
2022-12-20 16:44:57 -08:00
Max Brunsfeld
21d6665c37
Merge branch 'main' into project-reconnection
2022-12-20 15:50:09 -08:00
Max Brunsfeld
6542b30d1f
Implement rejoining projects as guest when rejoining a room
...
Co-authored-by: Julia Risley <julia@zed.dev>
2022-12-20 15:02:26 -08:00
Max Brunsfeld
55ebfe8321
Handle unshared projects when rejoining a room
...
Also, construct remote projects via the room, to guarantee
that the room can manage the projects' sharing lifecycle.
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-20 11:10:46 -08:00
Antonio Scandurra
d31fd9bbf2
Support adding worktrees to project while host is offline
2022-12-20 17:42:08 +01:00
Antonio Scandurra
52babc51a0
Make host reconnection test pass when mutating worktree while offline
2022-12-20 17:30:58 +01:00
Antonio Scandurra
1a3940a12e
Fix project reconnection test to ensure rooms actually reconnects
2022-12-20 14:51:46 +01:00
Antonio Scandurra
1aec691b35
Sketch out project reconnection routine on the server
2022-12-20 12:03:43 +01:00
Max Brunsfeld
af85db9ea5
WIP - Retain hosts' project state when they disconnect
2022-12-19 11:38:08 -08:00
Max Brunsfeld
67b265b3d5
Add failing integration test for resharing projects on reconnect
2022-12-19 11:37:28 -08:00
Max Brunsfeld
c8b209306e
collab 0.4.2
2022-12-19 11:29:22 -08:00
Antonio Scandurra
0ede89d82a
WIP
2022-12-19 20:05:00 +01:00
Julia
de9c58d216
Merge pull request #1983 from zed-industries/multi-buffer-git-gutter
...
Multi buffer git gutter
2022-12-19 10:53:42 -05:00
Antonio Scandurra
a5f624203e
collab 0.4.1
2022-12-16 12:02:03 +01:00
Antonio Scandurra
aa44de3d16
Fix test ensuring room is left when disconnected from LiveKit
2022-12-16 10:52:32 +01:00
Max Brunsfeld
ad37034960
Identify LiveKit room participants by user id, not peer id
...
This way, their participant id can remain the same when they reconnect.
2022-12-15 17:19:32 -08:00
Antonio Scandurra
c2f5381e5a
collab 0.4.0
2022-12-15 19:37:53 +01:00
Antonio Scandurra
2679e245a5
Minor stylistic change
2022-12-15 16:40:16 +01:00
Antonio Scandurra
5a334622ea
💄
2022-12-15 16:34:59 +01:00
Antonio Scandurra
5720c43fe7
Merge branch 'main' into fix-reconnects-after-deploy
2022-12-15 15:32:05 +01:00
Antonio Scandurra
5fb522a9b1
collab 0.3.14
2022-12-15 11:31:51 +01:00
Antonio Scandurra
86e5ae1f2e
Allow nulls in projects.host_connection_{id,server_id}
...
The server version on stable won't be able to fill values for those
columns when we deploy the migration to preview.
With this commit we're also dropping the unused `worktree_extensions`
and `project_activity_periods` tables. The last version of the server
on stable (0.2.6) doesn't contain any code that accesses those tables.
2022-12-15 11:30:51 +01:00
Antonio Scandurra
aadd7f2886
collab 0.3.13
2022-12-15 10:53:17 +01:00
Antonio Scandurra
067a19c971
Avoid logging an error when user who hasn't joined any room disconnects
2022-12-15 10:45:03 +01:00
Antonio Scandurra
688f179256
Use "id" nomenclature more consistently
2022-12-15 10:15:59 +01:00
Antonio Scandurra
af77f1188a
Re-add server_id indices for room_participants/project_collaborators
2022-12-15 09:58:25 +01:00
Julia
0dedc1f3a4
Get tests building again
2022-12-15 00:17:28 -05:00
Max Brunsfeld
6c58a4f885
Fix stale server queries, use foreign keys from connectionsn to servers
2022-12-14 17:34:24 -08:00
Max Brunsfeld
e08d6cd6de
Merge pull request #1921 from zed-industries/multibuffer-following
...
Allow following collaborators into editors with multi-excerpt buffers (refactors + find-all-refs)
2022-12-14 15:33:11 -08:00
Max Brunsfeld
954c9ac3fd
Add integration test coverage for following into multibuffers
2022-12-14 15:28:58 -08:00
Max Brunsfeld
e4c5dfcf6c
Use run_until_parked instead of 'condition' in all integration tests
2022-12-14 15:05:35 -08:00
Antonio Scandurra
363e3cae4b
WIP
2022-12-14 19:25:07 +01:00
Antonio Scandurra
930be6706f
WIP
2022-12-14 18:02:39 +01:00
Antonio Scandurra
05e99eb67e
Introduce an epoch to ConnectionId
and PeerId
2022-12-14 15:55:56 +01:00
Antonio Scandurra
9bd400cf16
collab 0.3.12
2022-12-14 11:43:33 +01:00
Antonio Scandurra
674fddac87
Instrument rpc::Server::start
and reduce cleanup timeout again
2022-12-14 11:42:12 +01:00
Antonio Scandurra
63e7b9189d
collab 0.3.11
2022-12-14 11:25:04 +01:00
Antonio Scandurra
9530976f61
Try using a longer timeout for cleaning up stale rooms
2022-12-14 11:24:36 +01:00
Antonio Scandurra
02c30b0091
collab 0.3.10
2022-12-14 09:35:52 +01:00
Antonio Scandurra
b9c7796547
Reduce readiness probe delay and period
2022-12-14 09:35:36 +01:00
Antonio Scandurra
e00cb6b074
collab 0.3.9
2022-12-14 09:05:19 +01:00
Antonio Scandurra
dc47552180
Fix kubernetes configuration for readiness probe
2022-12-14 08:58:19 +01:00
Antonio Scandurra
98a593b263
collab 0.3.8
2022-12-14 08:56:02 +01:00
Antonio Scandurra
897506c797
Define readiness probe to know when the new server can accept traffic
2022-12-14 08:54:46 +01:00
Antonio Scandurra
59c9a57570
collab 0.3.7
2022-12-14 08:43:18 +01:00
Antonio Scandurra
dde6cf596e
Don't wait for stale project deletion before listening for connections
2022-12-14 08:42:34 +01:00
Antonio Scandurra
2596fefa04
collab 0.3.6
2022-12-13 23:09:02 +01:00
Antonio Scandurra
34b69896e4
Listen to SIGTERM in addition to ctrl-c for graceful shutdown
2022-12-13 23:08:43 +01:00
Antonio Scandurra
7824ace58b
collab 0.3.5
2022-12-13 22:40:55 +01:00
Antonio Scandurra
b150efbd96
Set log level to debug for preview deployment
...
Also, add a log statement when we receive the interrupt signal.
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-12-13 22:38:55 +01:00
Max Brunsfeld
c20204d269
collab 0.3.4
2022-12-13 11:17:37 -08:00
Max Brunsfeld
45bfcfc3b8
Fix excessive delay before clearing stale room data
...
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-13 11:17:20 -08:00
Max Brunsfeld
5218a2f966
collab 0.3.3
2022-12-13 10:17:01 -08:00
Max Brunsfeld
95748123b5
Merge remote-tracking branch 'origin/collab-0.3.x'
2022-12-13 10:16:25 -08:00
Max Brunsfeld
6ad326ac58
Wait longer before deleting outdated rooms from the database
...
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-13 10:14:43 -08:00
Antonio Scandurra
99c5f8c713
collab 0.3.2
2022-12-13 15:16:41 +01:00
Antonio Scandurra
073a2988e6
Move creation of room_id index into its own migration
2022-12-13 13:57:41 +01:00
Antonio Scandurra
70aac75dd5
Run until parked before asserting about participants in restart test
2022-12-13 13:53:51 +01:00
Antonio Scandurra
4dc838fbb7
Reset connection pool when tearing down the server in tests
2022-12-13 13:51:25 +01:00
Antonio Scandurra
d4c8fa3090
Use a synchronous mutex for ConnectionPool
2022-12-13 13:50:51 +01:00
Antonio Scandurra
a594ba8f8a
Simulate server restarts in randomized test
2022-12-13 12:18:38 +01:00
Antonio Scandurra
417db95693
Fix typo in index name
2022-12-13 11:44:48 +01:00
Antonio Scandurra
0220d7ba5d
Include room_id
in CallCanceled
message
...
This ensures we don't accidentally cancel old calls.
2022-12-13 11:43:09 +01:00
Antonio Scandurra
e2b132ef23
💄
2022-12-13 11:37:39 +01:00
Antonio Scandurra
7e8d9d52d3
Delete stray debug statement
2022-12-13 11:36:40 +01:00
Antonio Scandurra
6a6a032f1f
Delete stale rooms/participants after RECONNECT_TIMEOUT
2022-12-13 11:32:37 +01:00
Antonio Scandurra
beea9b68ff
Allow re-joining room after server restarts
2022-12-12 16:03:21 +01:00
Antonio Scandurra
3cd77bfcc4
Always cast connection ids to i32
...
Postgres doesn't support unsigned types. This also adds indices to
support querying `project_collaborators` and `room_participants`
by connection id.
2022-12-12 11:43:08 +01:00
Antonio Scandurra
456396ca6e
Rename connection_lost
to answering_connection_lost
2022-12-12 11:43:08 +01:00
Antonio Scandurra
26b5653427
Delete hosted projects from database when connection is lost
2022-12-12 11:43:08 +01:00
Antonio Scandurra
895c365485
Introduce random reconnections in the randomized test
2022-12-12 11:43:08 +01:00
Antonio Scandurra
8fa26bfe18
Fix test_calls_on_multiple_connections
after adding room reconnection
2022-12-12 11:43:08 +01:00
Antonio Scandurra
aca3f02590
Re-join room when client temporarily loses connection
2022-12-12 11:43:08 +01:00
Antonio Scandurra
d74fb97158
Remove Executor
trait from collab
and use an enum instead
...
This will let us save off the executor and avoid using generics.
2022-12-12 11:43:08 +01:00
Antonio Scandurra
0366d725ea
collab 0.3.1
2022-12-09 08:19:41 +01:00
Antonio Scandurra
2697112a8a
Don't drop unregistered
column in reconnection support migration
...
We don't use this column anymore because, when a project is unshared, we
simply remove it from the `projects` table. However, this column is expected
in the stable version of the server and the database is shared between stable
and preview. If we dropped it, stable would start throwing errors.
2022-12-09 08:11:18 +01:00
Mikayla Maki
925c9e13bb
Remove terminal container view, switch to notify errors
2022-12-08 20:21:00 -08:00
Joseph Lyons
ab978ff1a3
collab 0.3.0
2022-12-08 16:35:13 -05:00
Joseph T. Lyons
dcd4b8f7db
Merge pull request #1941 from zed-industries/Allow-overwriting-signup-data
...
Allow overwriting signup data if a user signs up more than once with the same email address
2022-12-08 16:11:28 -05:00
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 Scandurra
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 Simmons
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 Maki
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 Maki
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
Julia
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 Scandurra
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 Scandurra
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
Max Brunsfeld
d70996bb99
collab 0.2.5
2022-11-30 14:10:10 -08:00
Antonio Scandurra
4c04d512db
Implement db2::Database::remove_contact
2022-11-30 17:39:17 +01:00
Antonio Scandurra
d1a44b889e
Implement contacts using sea-orm
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-30 17:36:25 +01:00
Antonio Scandurra
04d553d4d3
Implement db2::Database::get_user_metrics_id
2022-11-30 15:06:04 +01:00
Antonio Scandurra
2e24d128db
Implement access tokens using sea-orm
2022-11-30 14:47:03 +01:00
Antonio Scandurra
9e59056e7f
Implement db2::Database::get_user_by_github_account
2022-11-30 14:18:46 +01:00
Antonio Scandurra
d9a892a423
Make some db tests pass against the new sea-orm implementation
2022-11-30 12:13:16 +01:00
Joseph T. Lyons
3a1cd6ed3a
Merge pull request #1913 from zed-industries/Add-column-to-signups-for-added-to-mailing-list
...
Add "added_to_mailing_list" column on signups table
2022-11-29 19:30:11 -05:00
Antonio Scandurra
b7294887c7
WIP: move to a non-generic test database struct
...
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
Co-Authored-By: Julia Risley <julia@zed.dev>
2022-11-29 19:20:11 +01:00
Joseph Lyons
049c0f8ba4
Order invites by creation time
2022-11-29 12:57:51 -05:00
Antonio Scandurra
11a39226e8
Start on a new db2
module that uses SeaORM
2022-11-29 16:49:04 +01:00
Antonio Scandurra
ac24600a40
Start moving towards using sea-query to construct queries
2022-11-29 13:55:08 +01:00
Antonio Scandurra
d525cfd697
Increase probability of creating new files in randomized test
2022-11-29 11:02:14 +01:00
Joseph Lyons
4436ec48eb
Add "added_to_mailing_list" column on signups table
2022-11-29 02:13:13 -05:00
Antonio Scandurra
0a565c6bae
💄
2022-11-28 17:44:18 +01:00
Antonio Scandurra
cd0b663f62
Introduce per-room lock acquired before committing a transaction
2022-11-28 17:00:47 +01:00
Antonio Scandurra
b0e1d6bc7f
Fix integration test incorrectly assuming a certain ordering
2022-11-28 13:57:15 +01:00
Antonio Scandurra
ae11e4f798
Check the correct serialization failure code when retrying transaction
2022-11-28 13:56:03 +01:00
Antonio Scandurra
4c1b4953c1
Remove version from Room
...
We won't need it once we add the per-room lock.
2022-11-18 20:18:48 +01:00
Antonio Scandurra
c3d556d9bd
Don't take an Arc<Server>
in message handlers
2022-11-18 11:45:42 +01:00
Max Brunsfeld
5020c70a04
collab 0.2.4
2022-11-17 11:44:29 -08:00
Antonio Scandurra
44bb2ce024
Rename Store
to ConnectionPool
2022-11-17 19:03:59 +01:00
Antonio Scandurra
6c83be3f89
Remove obsolete code from Store
2022-11-17 18:46:39 +01:00
Antonio Scandurra
0a4517f97e
WIP: Introduce a db
field to Session
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-17 17:30:26 +01:00
Antonio Scandurra
c34a5f3177
Introduce a new Session
struct to server message handlers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-17 17:11:06 +01:00
Antonio Scandurra
4f39181c4c
Revert "Don't replace newer diagnostics with older ones"
...
This reverts commit 71eeeedc05
.
2022-11-17 16:57:40 +01:00
Antonio Scandurra
e7e45be6e1
Revert "Wait for previous UpdateFollowers
message ack before sending new ones"
...
This reverts commit fe93263ad4
.
2022-11-17 16:57:32 +01:00
Antonio Scandurra
8621c88a3c
Use int8 for scan_id
and inode
in Postgres
2022-11-17 16:56:43 +01:00
Antonio Scandurra
7dae21cb36
🎨
2022-11-17 15:35:18 +01:00
Antonio Scandurra
0f4598a243
Fix seed script
2022-11-17 15:34:35 +01:00
Antonio Scandurra
6415809b61
Fix errors in Postgres schema
2022-11-17 15:34:12 +01:00
Antonio Scandurra
fe93263ad4
Wait for previous UpdateFollowers
message ack before sending new ones
2022-11-17 14:12:00 +01:00
Antonio Scandurra
3b34d858b5
Remove unwrap from Server::share_project
2022-11-17 13:33:26 +01:00