Commit Graph

380 Commits

Author SHA1 Message Date
Max Brunsfeld
ed14fd6e0d Add setting to make projects online/offline by default 2022-06-03 17:01:15 -07:00
Max Brunsfeld
24aafde1e8 Avoid persisting project's state before it has been initialized 2022-06-03 16:40:16 -07:00
Max Brunsfeld
e18bc24989 Rename project's 'public'/'private' flag to 'online'/'offline' 2022-06-03 14:39:06 -07:00
Max Brunsfeld
b2aa831017 Store a FakeFs on TestClient 2022-06-03 13:49:47 -07:00
Max Brunsfeld
8bd4a0ab81 Don't store Project on TestClient in integration tests 2022-06-03 13:00:56 -07:00
Max Brunsfeld
db97dcd76f Don't update contacts when a project is first registered
Until the host has sent an UpdateProject message to populate the project's
metadata, there is no reason to update contacts.
2022-06-02 17:41:21 -07:00
Max Brunsfeld
f7e7a7c6a7 Use rocksdb to store project paths' public/private state 2022-06-02 17:38:33 -07:00
Max Brunsfeld
724affc442 Upgrade deps to avoid multiple versions of transitive deps
* env_logger
* prost-build
* bindgen
2022-06-02 17:38:33 -07:00
Max Brunsfeld
d11beb3c02 Change project registration RPC APIs to smooth out UI updates
* Make `UnregisterProject` a request. This way the client-side project can wait
  to clear out its remote id until the request has completed, so that the
  contacts panel can avoid showing duplicate private/public projects in the
  brief time after unregistering a project, before the next UpdateCollaborators
  message is received.
* Remove the `RegisterWorktree` and `UnregisterWorktree` methods and replace
  them with a single `UpdateProject` method that idempotently updates the
  Project's list of worktrees.
2022-06-02 17:32:43 -07:00
Max Brunsfeld
4d4ec793e2 Remove stray println 2022-06-02 17:32:43 -07:00
Max Brunsfeld
3ea061a11e Allow making projects private 2022-06-02 17:32:42 -07:00
Max Brunsfeld
8f676e76b3 Fix mismatched client/context in integration test 2022-06-02 17:29:11 -07:00
Max Brunsfeld
7ef9de32b1 Show private projects in the contacts panel
Introduce a ProjectStore that lets you iterate through all open projects.
Allow projects to be made public by clicking the lock.
2022-06-02 17:29:11 -07:00
Max Brunsfeld
a60fef52c4 Start work on private projects 2022-06-02 17:29:11 -07:00
Antonio Scandurra
6baf8b033b Don't reuse the same diagnostic group id across buffers
This lets us use the group id as the key for an `ElementState`, which
fixes a panic that would occur in project diagnostics when opening it
while there were multiple diagnostic groups with the same id.
2022-06-02 12:05:28 +02:00
Antonio Scandurra
1ce8682b94 Clear language server and worktree statuses when unsharing on server 2022-05-31 11:22:41 +02:00
Antonio Scandurra
339069b1d3 Cap MessageStream buffer size to 1MB
We temporarily let it grow when the message size exceed the limit,
but restore the buffer's capacity shortly after. This ensures that,
for each connection in its entire lifetime, we only ever use 1MB.
2022-05-31 11:16:32 +02:00
Antonio Scandurra
da46d78ea5
Merge pull request #1081 from zed-industries/project-panel-with-new-mouse-events
Introduce context menu to project panel
2022-05-31 10:40:42 +02:00
Antonio Scandurra
354488ebdf Don't eagerly populate copied subdirectory
This can race anyway with snapshot updates, so we just eagerly refresh
the root entry and wait for updates to come in to populate it.
2022-05-31 08:11:07 +02:00
Max Brunsfeld
365cda0fab Remove opentelemetry tracing subscriber
We'll see if this stops the server from leaking memory. We still
have spans in our logs.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-30 09:58:25 -07:00
Antonio Scandurra
20e1044d49 Merge branch 'main' into project-panel-with-new-mouse-events 2022-05-30 18:29:46 +02:00
Antonio Scandurra
51adc6517e WIP: start on an integration test for copy_entry 2022-05-30 14:53:10 +02:00
Antonio Scandurra
3336bc6ab3 Implement copy paste for ProjectPanel 2022-05-30 14:52:34 +02:00
Max Brunsfeld
bc6f8da029 Move integration tests into their own file 2022-05-27 17:20:05 -07:00
Max Brunsfeld
8393ae88b7 Clean up integration tests
* Use 'build_local_project' helper to reduce boilerplate
* Peform the setup steps in a consistent order
2022-05-27 17:10:45 -07:00
Max Brunsfeld
b2adff63e7
Merge pull request #1073 from zed-industries/window-menu
Add a Window application menu
2022-05-27 11:22:13 -07:00
Max Brunsfeld
23cd948b5f Adjust test to flush effects between splitting pane and following
Panes now emit an event when adding the first item, so we need to flush
effects between splitting and following in order to avoid accidentally
cancelling the follow.
2022-05-27 10:53:14 -07:00
Max Brunsfeld
a1a4c70845 Emit an event when adding a worktree to a project 2022-05-27 10:48:47 -07:00
Keith Simmons
125d83b3ec Fix failing seed bin build and add bin builds to ci pipeline 2022-05-26 15:41:24 -07:00
Antonio Scandurra
f403d87eff WIP 2022-05-26 09:59:25 +02:00
Antonio Scandurra
3ac6fc89c1 Pretty-print JSON of server snapshot 2022-05-26 09:34:39 +02:00
Nathan Sobo
742dd75041 Implement /rpc_server_snapshot endpoint
This returns a JSON snapshot of the state of the server
2022-05-25 17:42:25 -06:00
Antonio Scandurra
5c4bd9393f
Merge pull request #1050 from zed-industries/ignored-files
Show ignored entries in project panel
2022-05-24 10:57:16 +02:00
Antonio Scandurra
85f228dade Fix logic error when streaming ignored entries
We were calling `next` twice, which led us to skip every other entry.
This commit also enhances the `test_share_project` integration test
to exercise this new streaming logic.
2022-05-24 09:03:05 +02:00
Nathan Sobo
6ed503fe6e Implement get_invite_code_for_user on test db 2022-05-23 18:07:23 -06:00
Nathan Sobo
5c2fdc01ff Update foreign key constraints to allow users to be deleted
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-23 17:46:06 -06:00
Nathan Sobo
51a61cc485 Don't assign invite code when updating count from 0 to 0
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-23 17:28:05 -06:00
Nathan Sobo
4b8f24c84e Set INVITE_LINK_PREFIX in K8s 2022-05-23 15:49:51 -06:00
Nathan Sobo
d8dbbf1c05 Merge remote-tracking branch 'origin/main' into invite-codes-2 2022-05-23 15:46:39 -06:00
Antonio Scandurra
2af4bdef42 Broadcast proto::UnregisterProject when host closes a project 2022-05-23 15:38:01 +02:00
Nathan Sobo
7a8ff5abd7 Accept an optional email address when creating new users 2022-05-20 20:25:21 -06:00
Antonio Scandurra
b751156cd7 Rename first_connection to connected_once
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-20 17:35:00 +02:00
Antonio Scandurra
d8ee4378c9 Send a ShowContacts message the first time a user connects to collab 2022-05-20 15:47:14 +02:00
Antonio Scandurra
6f2c3f1e37 Update users and invite count after an invite gets redeemed 2022-05-20 12:02:31 +02:00
Nathan Sobo
eedb8ba59f Add affordance to copy user's invite link if they have a code
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-19 17:57:46 -06:00
Max Brunsfeld
c4554c1720 Replace build_workspace fn with an initialize function that takes a workspace
This makes it clearer that the function is not providing necessary
dependencies to a workspace, but rather configuring it with all of
the panels and widgets which are defined in downstream crates.
2022-05-19 16:50:22 -07:00
Max Brunsfeld
ef0b584532 Remove AppState from workspace actions
This allows those actions to be bound to keystrokes in the keymap.
Also, remove the WorkspaceParams struct, simplify how Workspaces are
constructed.
2022-05-19 14:37:26 -07:00
Nathan Sobo
a3bbabaaac Add ability to get the user for an invite code in collab API
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-19 12:35:07 -06:00
Nathan Sobo
3d7e912c6b Enable descriptive HTTP errors to be returned from DB layer
For now, we only use this when redeeming an invite code.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-19 11:55:55 -06:00
Nathan Sobo
d1b7a249b4 WIP 2022-05-19 11:09:44 -06:00
Nathan Sobo
51f9b915a0 WIP 2022-05-18 16:14:58 -06:00
Nathan Sobo
37fcfeab8d WIP 2022-05-18 11:51:47 -06:00
Nathan Sobo
b3038c2de9 Return 404 from API if no user is found
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-18 10:32:58 -06:00
Nathan Sobo
7e2d1fefc4 Add ability to update invite count to collab API
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-18 10:23:08 -06:00
Nathan Sobo
cfb31067a5 Add invite codes / counts to users table
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-18 09:56:37 -06:00
Nathan Sobo
fb246ac343 Log JSON in Kubernetes
If you set LOG_JSON=true, we'll output JSON from the tracing subscriber instead of pretty-printing trace output.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-17 11:05:22 -06:00
Antonio Scandurra
225536accc Merge branch 'main' into request-to-join-project 2022-05-17 14:55:20 +02:00
Antonio Scandurra
8393bfe032 Ensure join request reaches the server before disconnecting host in test 2022-05-17 14:50:28 +02:00
Antonio Scandurra
a828282771 Fix Store::remove_connection not removing guests from projects 2022-05-17 14:50:00 +02:00
Antonio Scandurra
7b161b81b5 WIP: accept to join requests if user is already participating
There's a panic caused by `Store::check_invariants` that we still
need to figure out.
2022-05-17 13:21:20 +02:00
Nathan Sobo
d821e7a4c1 Cancel join requests when the requester closes the window 2022-05-16 20:29:36 -06:00
Antonio Scandurra
ed6ed99d8f Show the reason why a join request was declined
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-16 19:57:50 +02:00
Antonio Scandurra
740ec3d192 WIP: decline pending join requests when project is unregistered 2022-05-16 17:46:08 +02:00
Antonio Scandurra
c2973f33c2 Uncomment randomized tests for contacts 2022-05-16 15:13:32 +02:00
Antonio Scandurra
576656ccf2 Delete commented-out code 2022-05-16 09:50:36 +02:00
Antonio Scandurra
bf638afac5 Initialize UserStore before client connects in integration tests
This fixes a failure in `test_contacts` where we were receiving the
initial `proto::UpdateContacts` message before `UserStore` had a chance
to register a message handler for it.
2022-05-16 09:48:24 +02:00
Keith Simmons
2f7eb6dbc5
Merge pull request #973 from zed-industries/selections-refactor
Pull selections out of editor into selections collection
2022-05-13 16:07:26 -07:00
Keith Simmons
c3a36e6d8a Rename selected_ranges and selected_display_ranges to remove redundant selected 2022-05-13 15:55:27 -07:00
Keith Simmons
de9dc27980 store buffer and display_map model handles on selections collection 2022-05-13 15:55:27 -07:00
Keith Simmons
db0a9114c2 Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections 2022-05-13 15:55:27 -07:00
Keith Simmons
c9dcfff607 Move selection helpers to SelectionCollection, add update_anchor_selections, add a number of invariant preserving mutation functions to the MutableSelectionCollection 2022-05-13 15:55:17 -07:00
Max Brunsfeld
f2eee6692b Send RemoveProjectCollaborator to host in addition to ProjectUnshared 2022-05-13 15:04:48 -07:00
Max Brunsfeld
1996b01a74 Tell host to unshare project when last guest leaves 2022-05-13 14:57:55 -07:00
Antonio Scandurra
5789aeea24 Fix randomized test failure caused by unsharing while guest was joining
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-13 17:39:13 +02:00
Antonio Scandurra
dd684d26a1 Make Project::share and Project::unshare private
This is still in-progress because randomized tests are failing.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-13 17:17:20 +02:00
Max Brunsfeld
be51a58311 Start work on requesting to join projects
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-12 17:53:11 -07:00
Nathan Sobo
7847707090
Merge pull request #990 from zed-industries/more-tracing
Improve tracing support
2022-05-12 14:45:50 -06:00
Nathan Sobo
451338061d Try to improve tracing messages when client disconnects 2022-05-12 13:05:05 -06:00
Nathan Sobo
a3b9ad75b0 Include login in connection-related tracing spans/events
Also, include metadata on more events and add an event called "signing out" with all this metadata to make it easier to search for.
2022-05-12 12:06:06 -06:00
Nathan Sobo
3226e07dcc Remove commented method 2022-05-12 11:37:33 -06:00
Nathan Sobo
e795a7a578 💄
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-12 10:16:50 -06:00
Nathan Sobo
9ca6e29a17 Use tracing instead of log in collab and rpc crates
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-12 10:05:49 -06:00
Nathan Sobo
9f6e82720d WIP: Enhance tracing in Peer
- Add a bunch of events to Peer's async connection handling logic
- Use an EnvFilter to allow more control over the verbosity level of tracing on a per-module basis
- Wire up logging to emit trace events (we actually probably want to do this the other way around)

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-05-12 09:58:17 -06:00
Max Brunsfeld
f54d74eda9 Merge branch 'main' into contact-panel-keyboard-nav 2022-05-11 17:45:44 -07:00
Max Brunsfeld
4739c683af Fix bug where Contacts included projects for which the use was a guest 2022-05-11 16:49:56 -07:00
Max Brunsfeld
3bc9b8ec85 Add notifications for accepted contact requests
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-11 11:39:01 -07:00
Antonio Scandurra
a5fd664b00 Add the ability to notify when a user accepts a contact request
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-05-11 18:51:40 +02:00
Antonio Scandurra
933a1f2cd6 Show badge when there are pending contact requests
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-11 17:39:03 +02:00
Antonio Scandurra
97d3616ed9 Show incoming request notification and implement dismissal 2022-05-11 15:13:37 +02:00
Max Brunsfeld
334f246df3 Include every user in their own list of contacts 2022-05-10 14:05:07 -07:00
Antonio Scandurra
b00338195e Make user fuzzy search case-insensitive
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-10 17:30:09 +02:00
Antonio Scandurra
d4e6ab4975 Seed first users from GitHub when running script/seed-db --github-users
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-10 17:19:39 +02:00
Antonio Scandurra
12783a588c Prevent users from fuzzy searching and adding themselves as contacts 2022-05-10 12:22:50 +02:00
Antonio Scandurra
52c36d3e3d Maintain online status in contacts panel 2022-05-10 10:33:57 +02:00
Max Brunsfeld
b8aba0972d Wait until contacts have been cleared when disconnecting
Also, use an mpsc for UpdateContacts messages, not a watch, since
the messages now represent changes instead of snapshots.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-09 17:23:39 -07:00
Max Brunsfeld
0533a0bd3c Allow users to remove contact relationships that they initiated 2022-05-09 16:31:30 -07:00
Max Brunsfeld
054d697fb7 Remove remaining code associated with .zed.toml files 2022-05-09 16:31:30 -07:00
Max Brunsfeld
2aec4ff234 Pick files directly from the Fs in simulate_host
Previously, the list of all existing files was maintained separately, but
it was not updated when a guest created a file.
2022-05-09 15:39:45 -07:00
Nathan Sobo
3d6db9083d Update a user's contacts when they connect; fix test failures
The test failure we fixed doesn't seem directly related to the contact update. Maybe it just caused a failure to occur earlier than it would have in the sequence of seeds.

We fixed the test failure by responding to a user joining the project while holding the lock on the Store. This ensures that we don't send messages related to the project to that user until they've had a chance to setup event handlers after receiving the response.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-09 15:57:16 -06:00
Nathan Sobo
40f1427885 Show requests in contacts panel
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-09 12:48:07 -06:00
Nathan Sobo
e3ee19b123 Wire up UI for requesting contacts and cancelling requests
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-05-09 11:24:05 -06:00
Antonio Scandurra
e4f1952657 WIP 2022-05-09 17:06:21 +02:00
Antonio Scandurra
ca56b0d6d5 Forbid joining projects if users are not contacts 2022-05-09 15:51:54 +02:00
Antonio Scandurra
95d29c4a7b Update contacts when peers join/leave and when project status changes 2022-05-09 15:08:18 +02:00
Antonio Scandurra
3319e0a613 Implement contact rejection 2022-05-09 10:02:14 +02:00
Nathan Sobo
9b1b61355a Fully test contact request acceptance
* Be sure we send updates to multiple clients for the same user
* Be sure we send a full contacts update on initial connection

As part of this commit, I fixed an issue where we couldn't disconnect and reconnect in tests. The first disconnect would cause the I/O future to terminate asynchronously, which caused us to sign out even though the active connection didn't belong to that future. I added a guard to ensure that we only sign out if the I/O future is associated with the current connection.
2022-05-08 15:19:56 -06:00
Nathan Sobo
5d20338f69 Get basic test of accepting a contact request passing 2022-05-07 15:09:27 -06:00
Nathan Sobo
93dae88cac WIP: Fix compile errors by commenting stuff out 2022-05-07 14:04:13 -06:00
Nathan Sobo
4f06dca78b WIP: Update contacts based on deltas rather than snapshots 2022-05-06 20:50:59 -06:00
Max Brunsfeld
8a3425477f Start work on RPC endpoints for dealing with contact requests
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-06 15:44:47 -07:00
Max Brunsfeld
274c4c244c Implement persistence for contacts
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-06 13:33:23 -07:00
Antonio Scandurra
989b82d664 Refactor add_request_handler to respond via a Response struct
This also removes `add_sync_request_handler`.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-06 17:01:27 +02:00
Antonio Scandurra
9555b93bca Wait on RECEIVE_TIMEOUT in tests when testing disconnection
We were waiting for 3 seconds, but the timeout had changed in the meantime,
making some iterations of the tests fail.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-06 16:47:08 +02:00
Antonio Scandurra
44f37afa95 Define data types for the new contacts model
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-06 16:24:44 +02:00
Max Brunsfeld
ea81737a88 Allow fuzzy-search for potential contacts in the contacts panel
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-05 14:14:44 -07:00
Max Brunsfeld
35fea43089 Adjust fuzzy search to avoid filtering based on edit distance threshold 2022-05-05 12:43:38 -07:00
Nathan Sobo
6050e0ead7 Add fuzzy_search_users to Db trait, PostgresDb 2022-05-05 09:58:18 -06:00
Antonio Scandurra
2e6cf2011d When opening items via project panel, only focus them on double-click
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-05 15:27:27 +02:00
Antonio Scandurra
6b22c47d47 Introduce guest file creation in randomized collaboration test
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-05 14:54:35 +02:00
Antonio Scandurra
6212f2fe30 Wait for remote worktree to catch up with host before mutating entries
This ensures that entries don't randomly re-appear on remote worktrees
due to observing an update too late. In fact, it ensures that the remote
worktree has the same starting state of the host before preemptively applying
the fs operation locally.
2022-05-05 13:47:53 +02:00
Max Brunsfeld
4b1c46fa45 Allow deleting entries from the project panel 2022-05-04 18:00:23 -07:00
Max Brunsfeld
509ede0e80 Allow guests to create directories 2022-05-04 16:52:46 -07:00
Max Brunsfeld
40e0f10195 Allow creating directories from the project panel 2022-05-04 16:47:11 -07:00
Max Brunsfeld
a2c22a5e43 Prevent eager snapshot mutations from being clobbered by background updates
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-04 15:10:39 -07:00
Max Brunsfeld
438e4e7a19 Allow guests to rename stuff
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-05-04 10:28:44 -07:00
Max Brunsfeld
657ea264cc Allow guests to create files from the project panel
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-05-04 10:28:44 -07:00
Antonio Scandurra
875cb13e6d Rename "crash" to "panic"
We are not really sending crash reports but Rust panics, so might
as well be clear about that.
2022-05-02 17:36:56 +02:00
Antonio Scandurra
54a45095cd Retrieve app version from crash rather than from current binary
The crash might have been generated weeks before and the app may
have been updated since then.
2022-05-02 15:34:05 +02:00
Antonio Scandurra
09a8b8e675 Capture crash reports and upload them the next time Zed launches 2022-05-02 15:17:43 +02:00
Keith Simmons
d4bef67cf2
Merge pull request #929 from zed-industries/non-uniform-batched-edits
Allow batched edits where each range is associated with different insertion text
2022-04-29 16:14:38 -07:00
Antonio Scandurra
cddafa5fef
Merge pull request #940 from zed-industries/telemetry
Instrument the collab server with OpenTelemetry collecting into Honeycomb.io
2022-04-29 17:50:55 +02:00
Antonio Scandurra
003bbe9aab Serialize payload in "handle message" span
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-29 17:34:22 +02:00
Antonio Scandurra
f4e5cb14bf Remove collaborators_per_project from Metrics
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-29 17:19:14 +02:00
Antonio Scandurra
63e1845537 Revert "WIP"
This reverts commit 47e7d924b2.
2022-04-29 16:45:29 +02:00
Nathan Sobo
47e7d924b2 WIP 2022-04-29 08:23:23 -06:00
Antonio Scandurra
14b078dc0c Use f32s for metrics so that we can do aggregation math on honeycomb 2022-04-29 10:31:47 +02:00
Antonio Scandurra
6734793069 Start adding metrics to collab server 2022-04-29 10:25:20 +02:00
Antonio Scandurra
b51a53addb Replace log_err with trace_err on collab::rpc 2022-04-29 09:21:09 +02:00
Keith Simmons
b4b61b4bbc Consolidate edit and edit_batched functions 2022-04-28 16:52:04 -07:00
Nathan Sobo
1fe964ac16 Start moving from logging to tracing on collab server
Install some spans. Probably more work to do here.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-28 09:45:59 -06:00
Nathan Sobo
2d9d30f74a Set log level to info on Kubernetes
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-28 09:10:09 -06:00
Nathan Sobo
a3640eb8d4 Correctly trace async message handling
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-28 09:09:54 -06:00
Nathan Sobo
dc28305c9f Assign tracing-related environment variables in Kubernetes
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-28 08:48:57 -06:00
Keith Simmons
04fc1d5982 Building, but failing test WIP 2022-04-27 17:25:38 -07:00
Nathan Sobo
6ef2d0fbec Trace handling of messages 2022-04-27 15:27:01 -06:00
Nathan Sobo
2db670308b Allow tracing level to be customized 2022-04-27 15:26:54 -06:00
Max Brunsfeld
3ad13bdd4f Display buffers in order of their path in refactor multibuffers
Previously, they were non-deterministically ordered via a HashMap iterator.
This was causing integration tests to fail spuriously on PRs.
2022-04-27 14:01:37 -07:00
Nathan Sobo
6a21a0f6b8 Wire up tracing crate to opentelemetry
Still need to

- Set a trace level and target via environment to avoid massive noise from other libraries
- Trace the operations we care about
2022-04-27 11:48:43 -06:00
Nathan Sobo
36b462182b Send telemetry to Honeycomb via GRPC
We updated the core-foundation crates because Tonic (the GRPC crate) relies on a newer version of core foundation to find TLS root certificates.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-27 09:58:55 -06:00
Nathan Sobo
2db20c4364 Introduce opentelemetry to collab
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-27 17:01:20 +02:00
Nathan Sobo
1293b21b2d Get db tests passing with Tokio Postgres adaptor
We now run tests that interact with the real database under a Tokio reactor. We make the tests run multi-threaded so we can block on the main thread on database teardown and still make progress actually tearing down the DB.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-04-26 13:30:21 -06:00
Antonio Scandurra
b4ae2b20a0 Remove remaining async-std dependencies from collab 2022-04-26 19:47:40 +02:00
Nathan Sobo
2adb9fe472 Get zed.dev working with new collab backend
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-26 11:15:41 -06:00
Nathan Sobo
be040b60b7 WIP 2022-04-25 20:21:43 -06:00
Nathan Sobo
3938f7c364 Fix compile error 2022-04-25 20:12:32 -06:00
Nathan Sobo
2bd08a7b3f Validate API token for all API routes 2022-04-25 20:10:14 -06:00
Nathan Sobo
538fc23a77 WIP 2022-04-25 20:05:09 -06:00
Nathan Sobo
35bec69fa4 Finish adding API routes
We haven't tested them yet.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-04-25 17:51:13 -06:00
Nathan Sobo
cb9d608e53 WIP
Continue adding in more API routes
2022-04-24 18:02:14 -06:00
Nathan Sobo
e30a3956d6 WIP: Switch to axum 2022-04-24 11:08:25 -06:00
Nathan Sobo
62f7c858e3 WIP 2022-04-24 10:45:20 -06:00
Nathan Sobo
f7f4aad00f WIP 2022-04-22 18:46:31 -06:00
Nathan Sobo
447c1d2f71 WIP: Get compiling with Tokio by commenting almost everything
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-22 13:33:19 -06:00
Antonio Scandurra
a2279422f5 Fix rpc::tests::test_collaborating_with_renames 2022-04-22 16:29:28 +02:00
Nathan Sobo
e63ebc5b24 Drop signups table 2022-04-21 10:59:13 -06:00
Nathan Sobo
396e4ba17b Remove signups-related methods from Db trait 2022-04-21 10:55:32 -06:00
Nathan Sobo
0cf7bba483 Remove remaining bits of web front-end 2022-04-21 09:30:08 -06:00
Nathan Sobo
9f83417b58 Remove more files supporting the old web front-end 2022-04-21 09:06:34 -06:00
Nathan Sobo
9f0b044ba0 Remove more unused code related to GitHub auth and errors 2022-04-21 08:57:49 -06:00
Nathan Sobo
9150b77471 Remove some user-facing routes 2022-04-20 15:39:39 -06:00
Antonio Scandurra
01eb2dce24 WIP: Start on a new cli crate
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-20 17:15:45 +02:00
Antonio Scandurra
ef784cf21e Remove summaries that don't contain any errors or warnings
When opening a buffer, some language servers might start reporting
diagnostics. When closing a buffer, they might report that no diagnostics
are present for that buffer. Previously, we would keep an empty summary entry
which would cause us to open a buffer in the project diagnostics view, only to
drop it because it contained no diagnostics. However, the act of opening it
caused the language server to asynchronously report non-empty diagnostics.
We would therefore handle this as an update, but the previous closing of the
buffer would cause the language server to report empty diagnostics again. This
would cause the project diagnostics view to thrash infinitely between these two
states, pegging the CPU and constantly refreshing the UI.

With this commit we won't maintain empty summary entries for files that contain
no diagnostics, which fixes the above issue.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-19 15:30:46 +02:00
Antonio Scandurra
4e057da69b Update contacts list when a project is shared 2022-04-12 11:41:20 +02:00
Antonio Scandurra
71beebc913 Fix warning 2022-04-12 10:52:16 +02:00
Antonio Scandurra
1d84876cfd Adjust distribution in randomized test 2022-04-12 10:15:38 +02:00
Antonio Scandurra
3e4bc75160 Merge branch 'main' into randomized-test-improvements 2022-04-12 10:14:08 +02:00
Nathan Sobo
d8e4e924cc Merge branch 'main' into collab-renames 2022-04-11 19:07:07 -06:00
Nathan Sobo
5a5506ae1d Update certificate 2022-04-11 18:33:55 -06:00
Nathan Sobo
3b852ee2bd Update Kubernetes manifest to refer to "collab" instead of "zed" 2022-04-11 18:15:41 -06:00
Nathan Sobo
ab8204368c Rename zed-server to collab
Over time, I think we may end up having multiple services, so it seems like a good opportunity to name this one more specifically while the cost is low. It just seems like naming it "zed" and "zed-server" leaves it a bit open ended.
2022-04-09 08:30:42 -06:00