zed/crates/collab
Antonio Scandurra d36a4888db Ensure worktrees have been sent before responding with definitions
Changing the frequency at which we update worktrees highlighted a
problem in the randomized tests that was causing clients to receive
a definition to a worktree *before* observing the registration of
the worktree itself. This was most likely caused by #1224 because
the scenario that pull request enabled was the following:

- Guest requests a definition pointing to a non-existant worktree
- Server forwards the request to the host
- Host sends an `UpdateProject` message
- Host sends a response to the definition request
- Server observes the `UpdateProject` message and tries to acquire
  the store
- Given that we're waiting, the server goes ahead to process the
  response for the definition request, responding *before*
  `UpdateProject` is forwarded
- Server finally forwards `UpdateProject` to the guest

This commit ensures that, after forwarding a project request and getting a
response, we acquire a lock to the store again to ensure the project still
exists. This has the effect of ordering the forwarded request *after* any
message that was received prior to the response and for which we are still
waiting to acquire a lock to the store.
2022-07-01 11:45:30 +02:00
..
k8s Move prometheus annotations from deployment to pod spec 2022-06-10 14:32:36 -07:00
migrations Register projects in the database and record worktree extensions 2022-06-21 10:29:26 +02:00
src Ensure worktrees have been sent before responding with definitions 2022-07-01 11:45:30 +02:00
.env.template.toml Add affordance to copy user's invite link if they have a code 2022-05-19 17:57:46 -06:00
basic.conf Rename zed-server to collab 2022-04-09 08:30:42 -06:00
Cargo.toml Accept a datetime range when querying project activity 2022-06-21 14:03:10 +02:00
Procfile Rename zed-server to collab 2022-04-09 08:30:42 -06:00
README.md Remove more files supporting the old web front-end 2022-04-21 09:06:34 -06:00

Zed Server

This crate is what we run at https://collab.zed.dev.

It contains our back-end logic for collaboration, to which we connect from the Zed client via a websocket after authenticating via https://zed.dev, which is a separate repo running on Vercel.