TODO:
- [x] Double check strange PHP env detection
- [x] Clippy & etc.
Release Notes:
- Added support for extension languages on the remote server
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This contains the main changes to the extensions crate from #20049. The
primary goal here is removing dependencies that we can't include on the
remote.
Release Notes:
- N/A
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
Closes #ISSUE
This refactors SSH installation to require less shell stuff. We'd like
to
support arbitrary remote hosts, and unfortunately csh/tcsh have quoting
rules
that make it impossible to run multi-line scripts.
The primary changes are:
* The target path now contains the version:
`./zed_server/zed-remote-server-{release_channel}-{version}`
* We do all our processing in a temporary file and `mv` it into place.
* We do fewer calls to `ssh_command` overall. With the previous two
changes we can avoid lock files, and fuser calls. Instead cleanup of old
binaries now happens in `execute_run`.
* We only try to install the remote server when the connection is
established, not on each project open.
This should also put us in a good position if we want to pre-emptively
install new versions when the auto-updater detects an update for the
running version of zed (but that's not wired up yet)
Release Notes:
- Remoting: Fixed remoting when the remote runs `tcsh`
- Remoting: Improved latency of connecting
This also cleans up logic for deciding how to do things.
Release Notes:
- Remoting: If downloading the binary on the remote fails, fall back to
uploading it.
---------
Co-authored-by: Mikayala <mikayla@zed.dev>
Closes#19976Closes#19972
We now prefer curl to wget (as it supports socks5:// proxies) and pass
-f to
curl so it fails; and use sh instead of bash, which should have more
consistent
behaviour across systems
Release Notes:
- SSH Remoting: make downloading binary on remote more reliable.
---------
Co-authored-by: Will <will@zed.dev>
This ensures that we detect if a new nightly version of the remote
server is available.
Previously we would always mark a version as matching if they had the
same semantic version.
However, for nightly versions we also need to check if they have the
same commit SHA.
Co-Authored-by: Thorsten <thorsten@zed.dev>
Release Notes:
- N/A
---------
Co-authored-by: Thorsten <thorsten@zed.dev>
This removes the old `remote_server { "download_binary_on_host": bool }`
field and replaces it with a `upload_binary: bool` on every
`ssh_connection`.
@ConradIrwin it compiles, it connects, but I haven't tested it really
yet
Release Notes:
- N/A
---------
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This changes the download logic to not fetch the latest version, but to
fetch the version matching the current version of Zed.
Release Notes:
- Changed the update logic of the SSH remote server to not fetch the
latest version for a current channel, but to fetch the version matching
the current Zed version. If Zed is updated, the server is updated too.
If the server is newer than the Zed version an error will be displayed.
Release Notes:
- Changed the update process of the remote server binary to not attempt
an update if we can detect that the current binary is used by another
process.
- Changed the update process of the remote server binary to mark the
lock file as stale in case the SSH connection of the process that
created the lock file isn't open anymore.
Just polishing the UI a bit more. One drawback of this, though, is that
if you _do_ have a big nickname or server name, with this current
solution, you won't be able to see it. Ideally, we should be able to
hover over it and see it in a tooltip, but the `div` still doesn't
support that out of the box.
| Main modal | Modal header |
|--------|--------|
| <img width="1136" alt="Screenshot 2024-10-23 at 12 49 18"
src="https://github.com/user-attachments/assets/ed5f0222-faa1-49bd-b249-2f22497566d8">
| <img width="1136" alt="Screenshot 2024-10-23 at 12 49 23"
src="https://github.com/user-attachments/assets/5a464b12-99e8-4934-aa6a-c9c4c40ea4d4">
|
Release Notes:
- N/A
This adds the following optional setting:
```json
{
"remote_server": {
"download_on_host": false
}
}
```
Right now, it's **off by default** because I haven't tested it enough.
Release Notes:
- N/A
This PR main relevant change is removing the logic we had inserted for
keyboard nav scroll as that was unreliable; we need to figure out a
better solution still. I'm also removing the visible on hover behavior
for the scrollbar as that was making us lose the click and drag feature
the component has. Lastly, I added a bit of right-margin in the delete
icon button so that's not too crammed with the scrollbar.
Release Notes:
- N/A
This creates a `<binary_path>.lock` file and checks for it whenever
uploading a binary.
Parameters:
- Wait for other instance to finish: 10m
- Mark lockfile as stale and ignore it after: 10m
- When waiting on another process, check every 5seconds
We can tweak all of them.
Ideally we'd have a value in the lockfile, that lets us detect whether
the other process is still there, but I haven't found something stable
yet:
- We don't have a stable PID on the server side when we run multiple
commands
- The `ControlPath` is on the client side
Release Notes:
- N/A
This contains a bunch of smallish but nasty fixes:
- Heartbeat timer was never reset after first heartbeat
- Use same return value when stderr is closed as when stdout is closed
- Always check proxy process status since it should also be done when we
get to this point (either it died and our task stopped, or our task
stopped and we dropped the process handle and it was killed on drop)
- make error messages less wrongly-specific
Release Notes:
- N/A
Co-authored-by: Bennet <bennet@zed.dev>
Before this change we sometimes showed errors inline, sometimes in
alerts.
Sometimes we closed the window, someimtes we didn't.
Now they always show as prompts and we never close windows.
Co-Authored-By: Mikayla <mikayla@zed.dev>
Release Notes:
- SSH Remoting: Improve error handling
Before this change messages could be lost on reconnect, now they will
not be.
Release Notes:
- SSH Remoting: make reconnects smoother
---------
Co-authored-by: Nathan <nathan@zed.dev>
Fixes a bug due to the `select!` macro tossing futures that had
partially read messages, causing us to desync our message reading with
the input stream.
Release Notes:
- N/A
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: conrad <conrad@zed.dev>
I suspect that this might have something to do with saving files not
being possible after a while.
I want to merge this and bump nightly.
Release Notes:
- N/A
Ran into this this morning. At least I suspect I ran into it. In any
case: we need to reset the missed hearbeats to 0 in case we got any
connection activity.
Release Notes:
- N/A
This is useful for passing a custom identity file, jump hosts, etc.
Unlike with the v1 feature, we won't support `gh`/`gcloud` ssh wrappers
(yet?). I think the right way of supporting those would be to let
extensions provide remote projects.
Closes#19118
Release Notes:
- SSH remoting: restored ability to set arguments for SSH
Before this, if no project paths were opened you were in a wierd UI
state where
most things didn't work because the project was ssh, but no
files/folders were open.
Release Notes:
- Fixed error handling when no project paths could be opened
This restores the change from #19193 that I erroneously reverted in
#19234.
I think the bug in #19275 got in my way when testing.
With that bug fixed, the changes in here also work fine.
Release Notes:
- N/A
When the SSH command dies or the server, the channel gets dropped and
the heartbeat method went into an infinite loop causing a hang.
Oversight from yesterday. Fixed now.
Release Notes:
- N/A
Supersedes https://github.com/zed-industries/zed/pull/19166
TODO:
- [x] Update basic zed paths
- [x] update create_state_directory
- [x] Use this with `NodeRuntime`
- [x] Add server settings
- [x] Add an 'open server settings command'
- [x] Make sure it all works
Release Notes:
- Updated the actions `zed::OpenLocalSettings` and `zed::OpenLocalTasks`
to `zed::OpenProjectSettings` and `zed::OpenProjectTasks`.
---------
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Richard <richard@zed.dev>
This does two things.
Important one: it reverts #19193, which lead to our whole process
handling breaking. When the `proxy` process was killed, it apparently
didn't close the stdout/stderr anymore, which meant we would not detect
when it died. (Watching its `status()` in the io loop also didn't work!)
We should figure out how to keep our process handling working before we
make this change in #19193, which sounds reasonable.
Second, less important thing: I think we should treat the process being
killed from a signal as non-zero, as an error.
Release Notes:
- N/A